-
Notifications
You must be signed in to change notification settings - Fork 11
Introduce native rpc support for witness generation #51
Conversation
Hey @frisitano this is such a useful change, i guess zero-bin would consume any evm based rpc request after ? (geth/erigon) |
@daniel-bcw That's correct, although initially the code @frisitano migrated isn't fully complete so may fail at generating some blocks, unlike the @frisitano Given that the |
Hey @daniel-bcw, yes that is correct. Following this change As an aside I've just stumbled upon the work your team have done producing helm templates for zero-bin - https://github.com/BCWResearch/zero-bin-bcw/tree/develop/deploy/helm/zero-bin. Would love to talk more about this and explore ways to collaborate. Whats the best way to get in touch? |
I used |
@frisitano Probably a good call to move away from it and implement a clean solution directly, thank you for this! |
hey @frisitano , sure we can definitely get in touch and share some of the work done on that end or other collaborations. You can reach out to me at [email protected] and we can hook up a meeting later down the week/next week. |
@frisitano I ran your branch on a 100 random blocks on Ethereum mainnet, between blocks I got 34/100 ❌, 66/100 ✅
I've attached my logs if this helps (though info is minimal as I didn't want them to take hours or clog my disk space). |
Thank you! I'm working through this now. Out of interest, is there a public RPC endpoint that supports the |
Hmm I don't think there's any public RPC endpoint, as you need to have access to |
* feat: provide IR for debugging upon failure * fix: fix clippy issues * fix: fix pr comments * fix: make evm_arithmetization non optional for ops * fix: fix pr comments * fix: fix clippy issues * fix: fix clippy issue * fix: fix pr comment * fix: fix clippy issue * fix: fix cargo lock * fix: fix pr comments * fix: fix format issues * fix: fix save input on error for test-only * fix: fix pr comments * fix: fix * fix: fix clippy issue * fix: fmt fix --------- Co-authored-by: Vladimir Trifonov <[email protected]>
I was hoping that someone (potentially within the team) may have synced the I've fixed one of the issues which was related to empty storage tries, however I'm still experiencing more issues. Something I'm a little confused about when inspecting logs for the following transaction. In the logs we can see the following:
which suggests (from my understanding of the kernel) we are trying to read the account data for account
I believe there are two possible explanations for this:
transaction logs: |
* fix: fix circuit version consistency check * fix: fix clippy issues * fix: update deps --------- Co-authored-by: Vladimir Trifonov <[email protected]> Co-authored-by: Robin Salen <[email protected]>
So I've been investigating this issue and I suspect the following is happening. When the call to the
Relevant logs:
I'm not sure on the specifics of why this is tripping up in the kernel but I suspect it may be something along these lines. |
Similar situation with the following transaction - relating to a |
@@ -13,6 +13,9 @@ pub(crate) enum Commands { | |||
/// The RPC URL | |||
#[arg(short = 'u', long, value_hint = ValueHint::Url)] | |||
rpc_url: String, | |||
/// The RPC Tracer Type | |||
#[arg(short = 't', long, default_value = "jerigon")] |
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.
nit: you could define an enum to avoid panicing on unexpected string:
#[derive(ValueEnum)]
pub enum RpcType {
Jerigon,
Native
}
...
#[arg(short = 't', long, default_value_t = RpcType::Jerigon)]
rpc_type: RpcType,
.then(|tx_hash| { | ||
let accounts_state = accounts_state.clone(); | ||
let provider = Arc::clone(&provider); | ||
let code_db = Arc::clone(&code_db); | ||
async move { | ||
super::txn::process_transaction(provider, tx_hash, accounts_state, code_db).await | ||
} | ||
}) |
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.
q: does the order in which we update the accounts state matter? if not we could use FuturesOrdered
instead to execute the processing of transaction concurrenltly for a better performance.
if the order matters, I'm curious why can't we fetch_tx_data
here instead and update the accounts_state synchronously to avoid using arc/lock as we have to process the txs sequentially anyway?
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've got a change locally which changes this logic. I'll push them shortly.
pub(crate) struct RpcBlockMetadata { | ||
pub(crate) block_by_number: EthGetBlockByNumberResponse, | ||
pub(crate) chain_id: EthChainIdResponse, | ||
prev_hashes: Vec<H256>, | ||
checkpoint_state_trie_root: H256, | ||
} |
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.
Fairly minor, but it may be cleaner to have this struct (and EthGetBlockByNumberResponse
/ EthChainIdResponse
along with it) be defined in a common
module, as it is being used both by jerigon
and native
modules.
Closing as replaced by #81. |
Work in progress