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
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 1 addition & 3 deletions docs/ethsimulatev1-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Unlike `eth_call`, `eth_simulateV1`'s calls are conducted inside blocks. We don'
| gasLimit | The same as the base block defined as the second parameter in the call |
| hash | Calculated normally |
| parentHash | Previous blocks hash |
| timestamp | The timestamp of previous block + 1 |
| timestamp | The timestamp of previous block + `network block time` (12s on mainnet) |
KillariDev marked this conversation as resolved.
Show resolved Hide resolved
| baseFeePerGas | When validation mode is true, baseFeePerGas is calculated on what it should be according to Ethereum's spec. When validation mode is false, the baseFeePerGas is set to zero |
| sha3Uncles | Empty trie root |
| withdrawals | Empty array |
Expand All @@ -30,8 +30,6 @@ Unlike `eth_call`, `eth_simulateV1`'s calls are conducted inside blocks. We don'
| gasUsed | Calculated normally |
| stateRoot | Calculated normally |

An interesting note here is that we decide timestamp as `previous block timestamp + 1`, while `previous block timestamp + 12` could also be an assumed default. The reasoning to use `+1` is that it's the minimum amount we have to increase the timestamp to keep them valid. While `+12` is what Mainnet uses, there are other chains that use some other values, and we didn't want to complicate the specification to consider all networks.

## Default values for transactions
As eth_simulate is an extension to `eth_call` we want to enable the nice user experience that the user does not need to provide all required values for a transaction. We are assuming following defaults if the variable is not provided by the user:
| parameter name | description |
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/execute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ EthSimulateBlockResultInvalid:
- code: -38020
message: Block number in sequence did not increase
- code: -38021
message: Block timestamp in sequence did not increase
message: Block timestamp in sequence did not increase or stay the same
- code: -38022
message: MovePrecompileToAddress referenced itself in replacement
- code: -38023
Expand Down