Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_multicall , support array of eth_call for simulation across multiple blocks #383
Add eth_multicall , support array of eth_call for simulation across multiple blocks #383
Changes from 61 commits
5556499
95822af
602d2bf
6ce85e2
2fcbf1d
046502a
e4ec926
0fbdf40
ccfc70b
7590b80
bbf34e8
c147f92
23ef5b8
73897a7
152cf09
c8abc82
14e9b35
94786e2
4b63f49
dc38150
9463ba6
51fad35
1802812
6bd8e50
2cf1b8e
ff39b4a
81e6730
4a42aa2
7d159f8
7787ce8
d8ca0a4
90016c0
d596116
0f8426a
6928d24
9528d89
c6a3397
b587f7f
818ef4a
3c7c14e
1814075
c3999c2
1a92538
41213eb
e785349
024958c
385791c
557038a
e2ae78f
d1cce31
dfdab76
2dde369
dd0fe15
6cde1ab
62ab430
bde1830
8d8725a
dc4017b
a3f89ad
28d995f
50c09b8
be26261
0630df2
e861a4a
cba6d4e
2196a29
40daadb
d831c5f
995acb2
88f1f7b
235c40c
e817b74
78b3a92
cb5d419
8d3b4d4
5f09367
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we decided to ignore phantom blocks. I.e. in the base fee calculation the parent is the last simulated or real block.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend just having block numbers 100 and 200 in the JSON example rather than having sequential numbers and then using text to describe how you might have something different.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like RLP encoding these is unnecessarily complex. Why not just
keccak(hash_of_previous_non_phantom_block, phantom_block_number_as_bytes)
? Like many hashing algorithms,keccak
can hash arbitrary byte array sequences, and you can do it in series with almost all libraries. No need to use RLP to first combine the two byte arrays.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think solidity's keccac supports that for example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, you are correct. However you can easily just concatenate the two prior to handing it over to keccak in such cases. Getting an RLP encoder into Solidity is significantly harder than getting a byte concatenator. If we want to optimize for Solidity simplicity, we could change the 142 to be 32-byte padded with zeros as that is the easiest thing to get into memory in Solidity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest something like: "block gas limit subtracted by amount of gas used in the block so far"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"we also allow one to send a direct transaction from a contract." why do we allow this in the strict mode again? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eth_multicall
wide, not per-transaction, and one may have one transaction in the middle of a sequence of transactions that is meant to simulate some contract action, while the rest of the transactions are normal EOA sourced transactions that you want to fully validate.