silius-rs / silius Goto Github PK
View Code? Open in Web Editor NEWERC-4337 (Account Abstraction) - modular and efficient bundler implementation in Rust.
Home Page: http://silius.rs/
License: Apache License 2.0
ERC-4337 (Account Abstraction) - modular and efficient bundler implementation in Rust.
Home Page: http://silius.rs/
License: Apache License 2.0
This issue tracks work related to sanity checks of user operations. All sanity checks are described here: https://eips.ethereum.org/EIPS/eip-4337#client-behavior-upon-receiving-a-useroperation
Rust cache stopped working for some reason.
Implement all necessay steps as defined here.
Currently, there are only tests for parsing json rpc error.
It would be good to have some tests for parsing the data into validation result also.
As discussed some time ago, showcase a minimal example of bundler with single entry point running in one process.
Implement all the necessary steps as defined here.
Reth could probably be used for that, look at: https://fiber.chainbound.io/blog/reth-p2p/
The approach above is not very stable at the moment. We should listen for new blocks over websockets (connected with Ethereum execution client).
Currently, we got everything in the aa-bundler
crate.
Maybe we could separate these bundler, mempool and rpc into 3 crates and publish it for other rust developers to depend on.
Generally I am talking to change Cargo.toml into
[workspace]
members = [
"bundler",
"mempool",
"rpc",
]
@Vid201 It is more like a discussion now and I am curious how you think about it.
Shortcoming:
A lot of code changes.
This issue tracks work on simulation of user operations. Everything is explained here: https://eips.ethereum.org/EIPS/eip-4337#simulation
JS Tracer is needed to perform simulation.
Alternative mempools (that is not canonical mempool) can use only subset of all sanity check and simulation rules, e.g., only forbidden opcodes. They can also introduce new custom rules that are specific to them.
We should have a way modular way of enabling/turning on certain rules and add way to write custom rules and include them in the verification/validation workflow.
When bundler will received user operation, it will have to match to which alt mempool the user operation should be passed.
Currently the ci is running so slow. It took about 17 mins to complete the ci.
We could accelerate it by introducing the github cache which could save a lot of time on network downloading.
Some guides:
debug_traceCall
sometimes returns empty response - in that case, request should be repeated after some timeout.
Bundlers will form P2P network to exchange user operations (similar to P2P tx pool in the normal Ethereum network).
There will be official spec test released by eth-infinitism that the bundler MUST pass.
Compute hash of user operation (which is ID), used in user operation pool (#7)
Bundler must be able to conect to the EntryPoint smart contract and make calls.
Use ethers-rs
.
I want to continue the question #43 (comment) here.
Currently, our debug API is config with a compiling flag #[cfg(debug_assertions)] which means the debug api would be there only when we build with cargo build
. If we want to build with release version cargo build --release
with compiler optimization, there are no debug apis.
I suggest we using the method like geth does providing a flag like --api debug
to enable debug api instead of put it as a compilation flag. In that way, we could use release version to run tests especially for https://bundler-test-results.eip4337.com/. (BTW, @Vid201 very great job on it.) I want to see whether we could beat stackup-bundler on performance.
@Vid201 What do you think?
Currently we have 4 executables bundle-rpc
, bundler-uopool
, bundler
, create-wallet
.
We could create a big binary executable like aa-bundler
and put the 4 above into subcommand
We need a local Ethereum network tool like Hardhat tests. They should provide enough gRPCJSON endpoint and correct EVM execution. The bundler could be able to integrate with the local test network.
I suggest we used the anvil tool. It is written in Rust and it is light enough for tests.
@Vid201 Please let me know if you have some other options to choose.
The goal here is to achieve 1 and 2.
Currently the validating test is not enable because https://github.com/Vid201/aa-bundler/blob/398d24623db5021906c556de9daede998af5f051/tests/validate_tests.rs#L192-L195 isn't implemented.
We need to enable the test after the validation is completed #47.
Received user operations are persisted in memory untill they are included in the bundle.
Some tests will rely on local geth node, would be useful to have this in github action
In the first version, constructed bundles will be sent to public mempool of Ethereum node.
Improve error handling and make it consistent throughout the codebase
Currently, the bundler binary accepts a mnemonic folder or mnemonic file for the bundler's account. This can be confusing and should always be the same.
First step to modular repo, create primitives crate
Use mdbx.
The UserOperation simulation needs Geth debug_traceCall js tracer to collect custom evm operations.
And we need to implement this tracer logic for the simulations.
Here are some other implementations for reference:
Push automatically on each PR to main branch.
Sending bundles (txs) to the public mempool can result in front-running, which leads to loss for bundlers.
Add bundler mode in bundler for testing
@zsluedem I merged the PR for removing JsonRpcError and created this ticket for throwing this error when execution is reverted (and fixing the test).
Would you mind taking this one?
There are some undone todo in codes:
Set up github flow to run test, lint, etc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.