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

Access list API #144

Open
Tracked by #126
sideninja opened this issue Mar 6, 2024 · 6 comments
Open
Tracked by #126

Access list API #144

sideninja opened this issue Mar 6, 2024 · 6 comments
Assignees

Comments

@sideninja
Copy link
Contributor

No description provided.

@m-Peter
Copy link
Collaborator

m-Peter commented Apr 23, 2024

After going through the relevant source code on Geth (https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1545-L1549), we will need to expose this method through the EVM contract.

Context:

// Apply the transaction with the access list tracer
tracer := logger.NewAccessListTracer(accessList, args.from(), to, precompiles)
config := vm.Config{Tracer: tracer.Hooks(), NoBaseFee: true}
vmenv := b.GetEVM(ctx, msg, statedb, header, &config, nil)
res, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(msg.GasLimit))

The EVM Gateway does not have access to the Geth VM, so I think this is something that should be exposed as a Cadence function from the EVM contract. In turn, the EVM Gateway should call this new Cadence function, through a Cadence transaction.

@sideninja
Copy link
Contributor Author

The implementation of this optimization feature should be done in the next phase.

@sideninja
Copy link
Contributor Author

@m-Peter after we build local state will this be doable?

@m-Peter
Copy link
Collaborator

m-Peter commented Jul 30, 2024

@sideninja Good question, I need to do some exploration on this, and see what needs to be done in order to support this.

@m-Peter
Copy link
Collaborator

m-Peter commented Aug 5, 2024

@sideninja After checking this again, it seems that having a StateDB in EVM Gateway won't be enough to support the eth_createAccessList endpoint. We still need an instance of *gethVM.EVM, to be able to apply the message from the given transaction arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants