forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 5
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
AA-405: Perform multiple static validations on an RIP-7560 transaction #42
Merged
forshtat
merged 1 commit into
RIP-7560-revision-2
from
AA-405-static-validation-tx-fields
Sep 25, 2024
Merged
AA-405: Perform multiple static validations on an RIP-7560 transaction #42
forshtat
merged 1 commit into
RIP-7560-revision-2
from
AA-405-static-validation-tx-fields
Sep 25, 2024
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
shahafn
approved these changes
Sep 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note missing test
shahafn
added a commit
that referenced
this pull request
Jan 7, 2025
…port (#49) * WIP: manually bring over RIP-7560 related code; compiles but does not run * TMP: check in commands to run the validator and beacon chain node * TMP: check in ignored files * Create a separate 'cleanup.sh' command * Set slot time to 3 seconds; check in "--dev" mode idea command * Remove code related to EOA-based RIP-7560 transactions * Remove BigNonce and NonceManager logic as it has moved to separate RIP * Fix issue: charging 'from' address (EntryPoint) for inner frames gas * remove expectedRevenue * remove StateTransition rip7560Frame bool is msg.isRip7560Frame, which allows usage of plain ApplyMessage * add paymaster, deployer optional params (#4) * Remove unused EOA-era function * Fix comment * Test ApplyRip7560ValidationPhases (#5) * initial UT for ApplyRip7560ValidationPhases test ./tests/rip7560/ * refactor test context * add some error tests * returnData helper * github actions for rip7560 tests * update path * refactor test utils * refactor textContextBuilder * remove prestate json. * pr comments * merge master (#6) * initial Process test (#7) initial test for the full "Process" call, to handle mixed legacy and AA transactions * remove stub message (#8) * remove stub message was created just to create the vm.Txontext * update * WIP: create the 'debug_traceRip7560Validation' API * WIP: Execute 'ApplyRip7560ValidationPhases' with 'rip7560Validation' tracer * refactor dev genesis (#10) * check error * update tests, match return values to RIP * refactor: test HandleRip7560Transactions (instead of individual validation methods) * test nonce * added time-range tests * pr issues * initial paymaster test flows * returnWithData, revertWithData arbitrary-length return or revert (currently, can't test it, since we check "error", and actual revert data is hidden. will be probably needed when testing paymaster.) * test paymaster validations * paymaster time-range checking * pr reviews * test deployer flows * initial paymaster test flows * returnWithData, revertWithData arbitrary-length return or revert (currently, can't test it, since we check "error", and actual revert data is hidden. will be probably needed when testing paymaster.) * test paymaster validations * paymaster time-range checking * pr reviews * AA-247: Implement tracer (#11) * WIP: bring in old 4337 Bundler Collector Tracer code (compiles) * Fix runtime errors (WIP) * Adding missing fields, using OnEnter hook * Fix using [0:20] bytes of "PaymasterData" instead of the new "Paymaster" field * Fix banned opcode checks for Factory frame * Add 'nil' check --------- Co-authored-by: shahafn <[email protected]> * Fix syntax error * I don't understand why would we need & 0xFF here, please elaborate * Fixing validationData packing * Fix: do not lose the AA tx application error; fix lost 'nonce' value * Move the 'TraceRip7560Validation' API to the 'eth' namespace, from the 'debug' * check gas, nonce form ApplyRip7560ValidationPhases (#16) move validations into the validation phase. note that it breaks some tests which rely on wrong nonce. * fix nonce, entrypoint (#17) - add correct sender address for AA transactions (AA_ENTRY_POINT, and AA_CREATOR for the deployment frame) - disable nonce increment in TransitionDb if the sender is either of these magic addresses - add AA-specific nonce increment for the transaction sender. * AA-403: Fix RIP-7560 transaction hash calculation (#19) * AA-378: Completing native tracer (#15) * Renaming, Adding tstore/tload support * Fixing tracer wip * Adding handling of value, onExit * Removing method id * Fix abi encoding of nil fields * typo * Removing logs * AA-394 receipt fields (#21) * handle transaction receipt status effectiveGasUsed refund excess to account/paymaster * AA-381: Create a "pull bundle" block building mode and a 'getRip7560Bundle' method (#18) * Fix crash * getTransaction (#24) * AA-257: Return useful errors and on-chain revert reasons to the RPC response message (#22) * Propagate validation on-chain revert reasons to the RPC response message * Explicit error for missing both deployed code and factory * Bubble up the real 'RevertReason' through the 'TraceRip7560Validation' API * AA-411: Parse calls to EntryPoint address for account/paymaster 'acceptance' (#23) * AA-411: Parse calls to EntryPoint address for account/paymaster 'acceptance' * Extract ABI encoding&decoding into file; use ABI instead of manual bit parsing * Remove rudimentary mentions of "magic" in RIP-7560 related code * Copy the "evm.Config.Tracer" instead of overriding the original object * Remove depth check, compare addresses instead * AA-336 Revert excution when postOp reverts (#29) * Revert excution when postOp reverts * Fixing execution,postOp * Adding statedb access list functions to be able to snapshot/revert * AA-412: Implement RIP-7712 NonceManager support (#27) * Add RIP-7712 nonce field to the RIP-7560 transaction type * Do not increment legacy nonce for RIP-7712 transactions * Handle on-chain NonceManager revert * AA-419: "signature" -> "authorizationData" & "calldata" -> "executionData" (#30) * AA-419: "signature" -> "authorizationData", "calldata" -> "executionData" * AA-417: Fix ignored paymaster revert (#31) * AA-419: "signature" -> "authorizationData", "calldata" -> "executionData" * AA-422: Fix transaction hash function - add all missing fields (#32) * AA-422: Fix transaction hash function - add all missing fields * AA-425: Directly execute call frames without "ApplyMessage" wrapper & AA-432: Penalization gas postOp observability (#33) * CallFrame * move checkNonce * refactor Nonce handling * execution phase * refactor prepare-msgs * refactor json-abi * fix errors * Make 'sumGas' accept vararg inputs * Extract 'performNonceCheckFrameRip7712' function * Update comment * Remove rudimentary modifications to the original ApplyMessage flow * Account for CallDataGas in 'postOp'; move code to Tx type interface --------- Co-authored-by: Alex Forshtat <[email protected]> * AA-344: During block building simply skip invalid RIP-7560 transactions (#35) * AA-344: (WIP) During block building simply skip invalid RIP-7560 transactions * Create 'eth_getRip7560TransactionDebugInfo' API to observe late invalidation * Remove unnecessary override * AA-382: Inject system events (#34) * WIP: Inject system events * WIP: Encode the event correctly and pass relevant data * Implement revert reason system events * Fix crash * Fix unhandled error * Remove unncecessary gas fields, expose failure type in status * Add 'ExecutionStatusExecutionAndPostOpFailure' status * Add 'RIP7560AccountDeployed' event; add 'nonceKey' event parameter; cleanup * AA-402: 'CallDataGasCost' is not a separate component of 'TotalGasLimit' (#36) * AA-402: (WIP) 'CallDataGasCost' is not a separate component of 'TotalGasLimit' * Remove * Fix 'CumulativeGasUsed' not being calculated correctly (#38) * Fix 'CumulativeGasUsed' not being calculated correctly * call Prepare to initialize warm addresses * remove prints --------- Co-authored-by: Dror Tirosh <[email protected]> * AA-445: Charge validation gas for calldata and repurpose 'CallDataUsedGas' as 'PreTransactionGasCost' (#39) * AA-408 deduct gas for aatx (#28) * AA-408 deduct gas, pay coinbase * Fix 'CumulativeGasUsed' not being calculated correctly * call Prepare to initialize warm addresses * remove prints * reformat * PR comments --------- Co-authored-by: Alex Forshtat <[email protected]> * AA-414: Consume block gas limit for RIP-7560 transactions * Remove unused function; extract 'validationPhaseUsedGas' * Expose gas limit reached error through the debug API * AA-405: Perform multiple static validations on an RIP-7560 transaction (#42) * Remove print and comment * Rename * AA-446: Separate 'nonce' into two 256-bit values 'nonceKey' and 'nonceSequence' (#40) * AA-446: Separate 'nonce' into two 256-bit values 'nonceKey' and 'nonceSequence' * Fix nonce manager address * Print nonce manager address --------- Co-authored-by: shahafn <[email protected]> * Include ERC-7562 tracer Remove checking the 'OnlyTopCall' as it doesn't fit the use-case Remove most of the string-based opcode manipulation Fix Construct the correct tracer object Bring in 'OnTxEnd' and 'GetResult' functions Missing 'OnOpcode' hook native bundlerCollectorTracer Rename to erc7562Tracer Fixing tracer wip WIP: Make 'allowed opcodes' a configurable parameter with a hex string input WIP: Remove all inefficient code working with opcodes as strings erc7562 tracer wip Fixing pointer Fixing contract size type Fixing handleExtOpcodes Fixing stack pointers Changing UsedOpcodes type Fixing ignoredOpcodes Adding isCall(), fixing PR comments Remving callTracer, callTracerConfig, adding erc7562TracerConfig Detecting OOG in OnExit instead of OnOpcode Removing unused function Removing unused Changing Keccak member from array to mapping Replacing lastSeenOpcodes for lastOpWithStack --------- Co-authored-by: Alex Forshtat <[email protected]> Co-authored-by: Dror Tirosh <[email protected]> Co-authored-by: Dror Tirosh <[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.
No description provided.