Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't bundle AfterSignature and ApplySignature instructions in single transaction #1531

Closed
garious opened this issue Oct 17, 2018 · 9 comments
Assignees

Comments

@garious
Copy link
Contributor

garious commented Oct 17, 2018

Problem:
Can't currently implement multisig in a single transaction.

Proposed solution:
Change Transaction's signature: Signature to signatures: Vec<Signature>. Sigverify should use the first signatures.len() of account_keys for the respective pubkeys.

TODO: Decide if the signed data should be the same for all signatures, or if all signatures after the first simply sign the first signature. I don't have a strong opinion, but signing the first signature is what Budget's ApplySignature currently expected.

TODO: Does that rule about the first signatures.len() keys being signed create any problems? Does it alleviate the need for an instruction to specify signed_account_keys?

@garious
Copy link
Contributor Author

garious commented Oct 17, 2018

@aeyakovenko, @mvines, comments on the TODOs?

@sakridge, once we have the details pinned down, would you mind making the change to sigverify for us?

@aeyakovenko
Copy link
Member

aeyakovenko commented Oct 17, 2018

@garious that works! Since instruction accounts are just offsets you can mix and match whichever you want.

@sakridge can you generalize the interface to the gpu to take a blob of data and arrays of sigs and key and data offsets into the blob?

We might need to “type” the signatures eventually. BLS signatures combine the data into one sig to save space

@garious
Copy link
Contributor Author

garious commented Oct 18, 2018

Regarding the second TODO, I think we only need to add a signed field to KeyedAccount.

@garious
Copy link
Contributor Author

garious commented Oct 18, 2018

Regarding the first TODO, we're leaning toward signing the same data in every signature and not signing the first signature (or any sort of stacking). That way all signatures can be generated concurrently.

@mvines
Copy link
Member

mvines commented Oct 23, 2018

Assigning to @sakridge as it seems like generalizing the sigverify interface is the next step here.

@sakridge - is this something doable this week, or should we punt this issue from v0.10?

@sakridge
Copy link
Member

@mvines it should be doable, let me prioritize this work.

@mvines mvines modified the milestones: v0.10 Pillbox, v0.11 Tabletops Oct 25, 2018
@garious
Copy link
Contributor Author

garious commented Nov 1, 2018

@sakridge, how's this one looking? Can we plan for it coming in sooner than later or is back on the back burner?

@sakridge
Copy link
Member

sakridge commented Nov 6, 2018

@garious @mvines Should the keys argument to Transaction::new_with_instructions be a slice of Keypair then? keys: &[Keypair] and then it signs with all those keys in the slice?

@garious
Copy link
Contributor Author

garious commented Nov 6, 2018

@sakridge, yes, exactly

sakridge added a commit to sakridge/solana that referenced this issue Nov 6, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 6, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 8, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 8, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 8, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 11, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 11, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 12, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 12, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 12, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 12, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 14, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 14, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 14, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 14, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 14, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 14, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 15, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
mvines pushed a commit that referenced this issue Nov 16, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes #1531
sakridge added a commit to sakridge/solana that referenced this issue Nov 16, 2018
With multiple instructions in a TX may need
multiple signatures.

Fixes solana-labs#1531
vkomenda pushed a commit to vkomenda/solana that referenced this issue Aug 29, 2021
willhickey pushed a commit that referenced this issue May 31, 2024
…ort of #1531) (#1535)

* scheduler optimization - worker precompile verification (#1531)

(cherry picked from commit 0d34a1a)

# Conflicts:
#	core/src/banking_stage/consumer.rs

* resolve conflicts

---------

Co-authored-by: Andrew Fitzgerald <[email protected]>
jeffwashington pushed a commit to jeffwashington/solana that referenced this issue Jun 1, 2024
…ort of solana-labs#1531) (solana-labs#1535)

* scheduler optimization - worker precompile verification (solana-labs#1531)

(cherry picked from commit 0d34a1a)

# Conflicts:
#	core/src/banking_stage/consumer.rs

* resolve conflicts

---------

Co-authored-by: Andrew Fitzgerald <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants