-
Notifications
You must be signed in to change notification settings - Fork 38
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 zeth support in rpc type #803
base: develop
Are you sure you want to change the base?
Conversation
41abea4
to
7a2d98b
Compare
85e11ab
to
c5d07a1
Compare
c5d07a1
to
cce32b1
Compare
uses: actions/checkout@v4 | ||
with: | ||
repository: 0xPolygonZero/zeth | ||
ref: "arpit/1" |
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.
When do we plan to merge your work to the main branch?
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.
PR - 0xPolygonZero/zeth#5
Whenever this is merged
- name: Generate txn | ||
run: | | ||
cast send --async --legacy \ | ||
--from "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" \ | ||
--private-key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" \ | ||
--rpc-url http://localhost:8545 --gas-limit 100000 --value 1 "0x852DA15b70a3e197d1D668a9a481B1F4c2168a5D" |
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.
You could probably use polycli loadtest
to generate multiple blocks. As this integration test is about witness extraction, probably few different kind of transactions and blocks would be great.
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.
This is just a demo integration to kick things off. Issue for improvement:
#806
let block_trace = cached_provider | ||
.get_provider() | ||
.await? | ||
.raw_request::<_, BlockTrace>("zero_getBlockTraceByNumber".into(), vec![block_number]) |
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.
Isn't there a same standard API in zeth
, debug_traceBlockByNumber
?
https://github.com/paradigmxyz/reth/blob/main/crates/rpc/rpc-api/src/debug.rs#L73
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.
zeth is a wrapper over reth. This was done by Francesco earlier. We can name this API whatever we want
0xPolygonZero/zeth#9
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 think we should stick with the standard API. It is not about renaming, reth
already implements debug_traceBlockByNumber
. Just the zero
tracer option should be added to that one when you specify type of the tracer.
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.
Ya cool. Created task above to handle this in future
{ | ||
let block_number = match target_block_id { | ||
BlockId::Number(block_number) => block_number, | ||
_ => return Err(anyhow::anyhow!("block number expected")), |
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 handle case where block hash is provided in the CLI
for other blockchain clients, could we do the same for zeth? In the worst case that zeth
api does not support hashes, we could get the block header by hash and learn the block number.
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.
0xPolygonZero/zeth#1