-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Handle event signatures consistently #251
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is as much as can be done without deleting event.rs, so would like to merge it before moving on. The next commit is more invasive and will require tweaks to the offsets. |
aeyakovenko
approved these changes
May 24, 2018
vkomenda
pushed a commit
to vkomenda/solana
that referenced
this pull request
Aug 29, 2021
Bumps [rollup](https://github.com/rollup/rollup) from 2.23.0 to 2.23.1. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](rollup/rollup@v2.23.0...v2.23.1) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
apfitzge
referenced
this pull request
in apfitzge/agave
Mar 15, 2024
…-xyz#199) (anza-xyz#251) Add in metrics for detecting Redundant Pulls (anza-xyz#199) (cherry picked from commit d49ceb0) Co-authored-by: Greg Cusack <[email protected]>
willhickey
pushed a commit
that referenced
this pull request
Mar 16, 2024
#251) Add in metrics for detecting Redundant Pulls (#199) (cherry picked from commit d49ceb0) Co-authored-by: Greg Cusack <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently we have an Event enum type that is either a Transaction or a Witness that a previously submitted smart contract is waiting on. In each field (Transaction, Timestamp, Signature), we see duplicate information, a
from
PublicKey and asig
Signature, but those signatures are not handled consistently by the SigVerifyStage or the BankingStage. Rather than handling those individually, as well as each new Event type that we add, we need the top-level data type to be astruct
containing the PublicKey, Signature, and the signed data. This PR gets most of the way there by reducing Event to an enum with a single field, Transaction, and then replacing Transaction'scontract
field with a newinstruction
field containing a newInstruction
enum with fields for spinning up a smart contract or applying a witness. It means that Transaction now has a clear definition, "an atomic client-defined set of instructions," and one that is consistent with both Distributed Systems and Bitcoin terminology.The next step is to remove the Event enum, which after this patchset, only exists as a shim to minimize churn. Once removed, we'll see Entries containing a list of Transactions, not a list of Events. To extend the contract language, you'll add a field to the Instruction enum, and handle it in the Bank's
process_verified_transactions()
method. Duplicates will automatically be discarded and you can be certain thefrom
PublicKey was from the entity that sent the message.Fixes #236