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

add eth_simulateV1 #484

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
31fcbe5
eth_multicallv1
KillariDev Nov 4, 2023
8b020ce
fix some issues with the spec
KillariDev Nov 20, 2023
aaab3f8
Merge remote-tracking branch 'upstream/main' into eth_multicallv1
KillariDev Nov 20, 2023
8ab6539
fix refs, fix styling
KillariDev Nov 20, 2023
61fb231
Update docs/multicall-notes.md
KillariDev Nov 27, 2023
45313dd
Update docs/multicall-notes.md
KillariDev Nov 27, 2023
d9411e0
feedback according to comments, and a 30mb limit
KillariDev Nov 27, 2023
06d27bd
Merge branch 'eth_multicallv1' of https://github.com/DarkFlorist/exec…
KillariDev Nov 27, 2023
b4ce098
use 0xee.. address instead of 0x0 address for eth transfer logs
KillariDev Dec 12, 2023
0043e12
add withdrawals to input and output
KillariDev Dec 12, 2023
3095c08
add support for EIP-4844
KillariDev Dec 19, 2023
c7ec336
rename eth_multicallV1 to eth_simulateV1
KillariDev Jan 11, 2024
c20052c
update according to meeting (nonce calculation, blobBaseFee, gasLimit…
KillariDev Jan 21, 2024
7aee5b3
add note that when targeting non-precompiles with MovePrecompileToAdd…
KillariDev Feb 1, 2024
8996847
rename focument to be eth simulate related because of the name change
KillariDev Feb 26, 2024
e76cb57
add transaction hash and index to the logs
KillariDev Feb 26, 2024
dde3124
Update docs/ethsimulatev1-notes.md
KillariDev Mar 5, 2024
db721c4
fix blobgasPrices
KillariDev Mar 7, 2024
aef37eb
use blobBaseFee for now
KillariDev Mar 8, 2024
85ad1a4
remove blobBaseFee, not part of header
KillariDev Mar 20, 2024
21c6dfa
blobBaseFee to uint64 and validator_index -> `validatorIndex`
KillariDev Mar 20, 2024
e27cf9a
Merge remote-tracking branch 'upstream/main' into eth_multicallv1
KillariDev Mar 20, 2024
b597a7f
Merge remote-tracking branch 'upstream/main' into eth_multicallv1
KillariDev Apr 24, 2024
1ccfd37
remove phantom blocks :(
KillariDev Apr 24, 2024
f297b4f
rename multicall stuff to ethsimulate stuff. Add `returnFullTransacti…
KillariDev May 29, 2024
e3332ea
use `allOf`
KillariDev May 29, 2024
e913466
when validation mode is false, baseFeePerGas and blobBaseFee are set…
KillariDev Jun 4, 2024
8141886
multicall -> eth_simulate, add chain id, add default rsv values, add…
KillariDev Jun 12, 2024
2ee9fc2
add rationale for pre-computed calls
s1na Sep 17, 2024
42d1249
update with flexibility
s1na Sep 17, 2024
55f657c
Merge pull request #3 from s1na/eth_multicallv1
KillariDev Sep 18, 2024
0256a4b
added removed field to logs which should have been there
KillariDev Sep 25, 2024
de3e3f5
make "removed" an optional field
KillariDev Oct 7, 2024
d7b4616
relax time requirement so that time can stay still
KillariDev Oct 7, 2024
3324ce9
increase timestamp by +12 (on mainnet) instead of +1
KillariDev Dec 23, 2024
e56d320
Update docs/ethsimulatev1-notes.md
KillariDev Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/ethsimulatev1-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,14 @@ Clients may introduce their own limits to prevent DOS attacks using the method.
- How many blocks can be defined in `BlockStateCalls`. The suggested default for this is 256 blocks
Copy link
Member

Choose a reason for hiding this comment

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

I would also argue that there is a max number, because if one allows to create only one block, then one can still request block very high number and this would impose a lot of phantom block hashings.

- A global gas limit (similar to the same limit for `eth_call`). The eth_simulate cannot exceed the global gas limit over its lifespan
- The clients can set their own limit on how big the input JSON payload can be. A suggested default for this is 30mb

## Rationale

### Pre-computed calls

When it comes to contract override behavior, specifically precompile override, there were two approaches:

1. As specified above to allow replacement of precompiles by EVM code and to allow those same precompiles to be relocated to another access for fallback behavior.
2. Allow users to pass in a set of pre-computed calls for an address, i.e. direct mapping of input to output.

The second approach has better UX for simple use-cases such as faking a signature via ecrecover. It also allows for getting the same gas usage as a real precompile execution. The simpler UX comes at cost of flexibility. Overriding with EVM code is general. It also imposes changes to the EVM interpreter code, which has been otherwise avoided, without enabling new features. Hence the spec proposes the first alternative.