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

JSON-RPC: Add eth_createAccessList RPC call #197

Closed

Conversation

MariusVanDerWijden
Copy link
Member

@MariusVanDerWijden MariusVanDerWijden commented May 27, 2021

WIPPPPP! @timbeiko :D, replaces #196

@MariusVanDerWijden
Copy link
Member Author

@lightclient asked

Is this field optional? If an error is returned, is accessList and gasUsed omitted?

No, this field is not optional. If an error is returned the accessList and gasUsed are still returned. Only if the method creates a real error (state not available, block in the future, ...) then nothing is returned.
Returning the vmErr and the accessList and gasUsed together is still useful in some cases.

@MariusVanDerWijden
Copy link
Member Author

The implementation in geth for this call can be found here:
ethereum/go-ethereum#22550
(Interesting part: https://github.com/ethereum/go-ethereum/pull/22550/files#diff-c426ecd2f7d247753b9ea8c1cc003f21fa412661c1f967d203d4edf8163da344R1332)

Basically we implement the following algorithm:

al <- tx.AccessList // Take the current accesslist 
for {
   al2 <- execute(tx, al) // execute the transaction
   if al == al2 {
      return al // nothing changed between runs 
   }
   al = al2
}

@fvictorio
Copy link

This feels inconsistent with the result of debug_traceTransaction, which has the failed and returnValue properties. Would it make sense to use those properties instead?

@lightclient
Copy link
Member

@MariusVanDerWijden is this something you're still working on or can it be closed?

@MariusVanDerWijden
Copy link
Member Author

@lightclient I'm not sure, did someone port this to the new spec already? If not I would like to keep it open as a reminder that this RPC call exists

@lightclient
Copy link
Member

@MariusVanDerWijden I see this was supposed to replace #196, but that was merged. So I'm not sure this is still a WIP or if #196 adequately describes the method?

I will port any new methods merged to this repo into the eth1-apis repo after London.

@MariusVanDerWijden
Copy link
Member Author

Yeah Tim merged #196 pretty quickly. but I wasn't really finished with the discussions yet, so he reverted the change. The codebase doesn't contain the eth_createAccessList RPC yet.

@lightclient
Copy link
Member

@MariusVanDerWijden ah right, I remember now. Should this PR be merged then (i.e. does it accurately describe the endpoint)? I can port it to the new spec once it's merged here.

@SamWilsn SamWilsn added the A-rpc Area: JSON RPC label Aug 5, 2021
@SamWilsn
Copy link
Contributor

Should be migrated to https://github.com/ethereum/eth1.0-apis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Area: JSON RPC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants