Comments (9)
great!
this doesn't require any offchain components, I think we can start with type bindings for the endpoint, then the trait function and then try to implement the described logic. the pr has a few test cases, we can use the objects to generate bindings: https://transform.tools/json-to-rust-serde
So do we end up with the following somewhere?
use serde_derive::Deserialize;
use serde_derive::Serialize;
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Root {
pub jsonrpc: String,
pub id: i64,
pub method: String,
pub params: (Params, String),
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Params {
pub block_state_calls: Vec<BlockStateCall>,
pub trace_transfers: bool,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BlockStateCall {
pub state_overrides: StateOverrides,
pub calls: Vec<Call>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct StateOverrides {
#[serde(rename = "0xc000000000000000000000000000000000000000")]
pub n0xc000000000000000000000000000000000000000: n0xc000000000000000000000000000000000000000,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct n0xc000000000000000000000000000000000000000 {
pub balance: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Call {
pub from: String,
pub to: String,
pub value: String,
}
from reth.
Apologies for delay as I had issues running reth on limited specs laptop and thanks @rupam-04 for reaching out.
This is a correct description of traits although what I also added is to develop the traits while taking also the pre implemented types (i.e reth_trie::StateRoot
, so as to have consistent API ). if possible we can have a joint PR for this one and I will work on the side of writing the structures for the parameters along with the API method.
from reth.
hey, If you are interested in joining eth_simulatev1:s implementers call, we have a meeting every Monday. You can find the meeting in the Ethereum Protocol Calls calendar
from reth.
Hey, I am interested to try my luck creating PR on this issue . I wanted to understand various things :
-
in terms of the specification regarding the transaction batching and merging the arbitrary blocks : do we need to maintain the sliding window in order to manage the state of the n blocks which are parsed .
-
also the use of the ExEx executors for composing the transactions as the offchain hooks is required in this case ?
Thanks
from reth.
great!
this doesn't require any offchain components, I think we can start with type bindings for the endpoint, then the trait function and then try to implement the described logic.
the pr has a few test cases, we can use the objects to generate bindings: https://transform.tools/json-to-rust-serde
from reth.
Apologies for delay and thanks @rupam-04 for reaching out.
This is a correct description of traits although what I also added is to develop the traits while taking also the pre implemented types (i.e
reth_trie::StateRoot
, so as to have consistent API ). if possible we can have a joint PR for this one and I will work on the side of writing the structures for the parameters along with the API method.
feel free to continue your work on this, I just subscribed to this issue as it looked interesting to me. I am looking forward to how you implement the whole thing.
from reth.
Thanks @KillariDev I will be there to resolve my queries.
from reth.
Hey @dhruvmalik007 have you made any progress on this / do you have any questions?
from reth.
Hey @dhruvmalik007 have you made any progress on this / do you have any questions?
Hi , I am kind of stuck in the progress due to personal workload last 3 weeks and was just able to define the traits on personal branch dhruvmalik007/simulate_v1 till now.
on the side of questions its fine as already the eth_multicall group has answered the call during one of the monday call. I can try to put effort from this week to finish the methods simulate_many
or else I will let people know to either implement their version or use my code.
from reth.
Related Issues (20)
- Tracking: eth_simulateV1
- not announcing peering/discovery on correct ports when using --discovery.port HOT 1
- remove test-vectors command
- failed to open the database HOT 1
- failed to commit transaction changes HOT 1
- ethereum-forks no-std support HOT 1
- reth-revm no-std support HOT 7
- clippy: add `clippy::needless_pass_by_value` warn rule
- document zstd feature in primitives
- Switch feature logic from `zstd-codec` to `no-zstd-codec` HOT 1
- move calculate_intrinsic_gas_after_merge to txpool eth validator HOT 2
- Move displayHardforks to ethereum-forks crate
- Remove Optimism feature from chainspec
- Implement ots_getTransactionBySenderAndNonce HOT 1
- Library build fails due to ENR-related errors HOT 2
- ExEx pipeline batch ETL HOT 1
- disable enr workspace default features HOT 1
- Update book with latest audit state HOT 1
- chainspec no-std support HOT 1
- op-reth dev mode: Failed to insert downloaded block: receipt root mismatch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reth.