Skip to content

Comments

Implement RIP-7560 (revision 2) on top of "release/1.14"#2

Open
forshtat wants to merge 81 commits intomasterfrom
RIP-7560-revision-2
Open

Implement RIP-7560 (revision 2) on top of "release/1.14"#2
forshtat wants to merge 81 commits intomasterfrom
RIP-7560-revision-2

Conversation

@forshtat
Copy link
Member

No description provided.

_, validatedTxsReceipts, validateTxsLogs, err := HandleRip7560Transactions(tmpTxs[:], 0, statedb, &context.Coinbase, header, gp, p.config, p.bc, cfg)
receipts = append(receipts, validatedTxsReceipts...)
allLogs = append(allLogs, validateTxsLogs...)
if err != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move err handling before appends.

initialGas uint64
state vm.StateDB
evm *vm.EVM
rip7560Frame bool

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use msg.rip7560Frame instead of new var.


aatx := tx.Rip7560TransactionData()
statedb.SetTxContext(tx.Hash(), index+i)
err := BuyGasRip7560Transaction(aatx, statedb)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we abort with error if we can't buy gas?

@drortirosh drortirosh force-pushed the RIP-7560-revision-2 branch from ee387d8 to 507f472 Compare June 3, 2024 16:59
initial test for the full "Process" call, to handle mixed legacy and AA
transactions
forshtat and others added 28 commits August 5, 2024 17:21
…esponse 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
…ptance' (#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
* Revert excution when postOp reverts

* Fixing execution,postOp

* Adding statedb access list functions to be able to snapshot/revert
* 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
…Data" (#30)

* AA-419: "signature" -> "authorizationData", "calldata" -> "executionData"
* AA-419: "signature" -> "authorizationData", "calldata" -> "executionData"
* AA-422: Fix transaction hash function - add all missing fields
… 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 <forshtat1@gmail.com>
…ns (#35)

* AA-344: (WIP) During block building simply skip invalid RIP-7560 transactions

* Create 'eth_getRip7560TransactionDebugInfo' API to observe late invalidation

* Remove unnecessary override
* 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
…it' (#36)

* AA-402: (WIP) 'CallDataGasCost' is not a separate component of 'TotalGasLimit'

* Remove
* Fix 'CumulativeGasUsed' not being calculated correctly

* call Prepare to initialize warm addresses

* remove prints

---------

Co-authored-by: Dror Tirosh <dror.tirosh@gmail.com>
* 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 <forshtat1@gmail.com>
…imit

AA-414: Consume block gas limit for RIP-7560 transactions
…eSequence' (#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 <shahaflol@gmail.com>
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
@shahafn shahafn force-pushed the RIP-7560-revision-2 branch from e4ce654 to 27459c9 Compare January 2, 2025 14:44
shahafn pushed a commit that referenced this pull request May 19, 2025
This PR is #2 of a 3-part series that implements the new log index
intended to replace core/bloombits.
Based on ethereum#31079
Replaces ethereum#30370

This part replaces the old bloombits based log search logic in
`eth/filters` to use the new `core/filtermaps` logic.

FilterMaps data structure explanation:
https://gist.github.com/zsfelfoldi/a60795f9da7ae6422f28c7a34e02a07e

Log index generator code overview:
https://gist.github.com/zsfelfoldi/97105dff0b1a4f5ed557924a24b9b9e7

Search pattern matcher code overview:
https://gist.github.com/zsfelfoldi/5981735641c956afb18065e84f8aff34

Note that the possibility of a tree hashing scheme and remote proof
protocol are mentioned in the documents above but they are not exactly
specified yet. These specs are WIP and will be finalized after the local
log indexer/filter code is finalized and merged.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
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

Successfully merging this pull request may close these issues.

3 participants