espresso-sequencer's People
Forkers
omahs iprotoni nyakiomaina mattsse cspannos gooddaisy unicornn1 manipulation44 deegiimurun ai-chef kozmendo narniec p10node aakash4dev shazib083 muhtasimtanmoy 0xmbl tiggerland pepper-research ranconnex noooblien kongtoubaofu dabao8888 miles-six wnhedaxx pinyonet light328 mikeminer red-haze-dev socialsister hodlzk emrahfc mihaimindrutescu diahpradana aileenpaulahtmm makhialexkixc nurulwahyunikyq luishassanah7 ganjarananggrai almirasusanti4 ekasusantif7ll ghanimarbun tropicaldog17 smartcontractcodes amunracode sengulatik66 srdrxatk exo9planet wpwhite93 calindra etherscaleapps tudorpintea999 riskrose nnsw3 0xsomehoe emnul mmyyrroonn cratiu222 commonprefix shangchenglumetro osrmespresso-sequencer's Issues
`Transaction`: Implement `commit`
Needed to satisfy Committable
trait for Transaction
Implement REST API to submit transactions
Dependencies
Implement HotShot-Hermez Adapter
Implement HotShot traits for State type
HotShot-Hermez Adapter: receive QCs, order commit and block/batch from zkEVM app events
Add crate for zkEVM application
Integrate rollup contract: Post block commitments + QCs to rollup contract
Implement HotShot trait for opaque transaction type
Skeleton: define types required for zkevm application
Design rollup contract
`State`: Implement `commit`
Needed to satisfy Committable
trait for State
Define transaction type (Hermez-compatible)
Run sequencer locally with modified zkevm-node in end-to-end test
`State`: Implement `next_block`
Needed to satisfy HotShotState
trait for State
Create smart contract with interface that accepts QCs
Decide on frequency of transactions sent to rollup contract
Integrate rollup contract: Subscribe to block commitment updates from the framework
`Block`: Implement `commit`
Needed to satisfy Committable
trait for Block
`State`: Implement `append`
Needed to satisfy HotShotState
trait for State
Test infrastructure for contract development
We can borrow from CAPE. If we do write our own rollup contract it may be worth it to invest a bit of extra time to use foundry-rs.
Note that the zkevm-node test infrastructure already runs a local geth client for testing. The testing infrastructure mentioned here is only used for contract development, not for testing the integration with the zkevm-node (for which we will use the zkevm-node test infrastructure).
Tasks
Add crate for transaction ordering application
No dependencies.
Create main entrypoint with CLI/env etc.
- Add clap argument parser.
- Set reasonable, working defaults for arguments, where possible.
- Initialize the zkEVM app.
`Block`: Implement `add_transaction_raw`
Needed to satisfy HotShotBlock
trait for Block
Initialize the VM agnostic framework with the Hermez application
Transaction ordering application
Initialize HotShot
Interface to subscribe for events (finalized block commitments and then full blocks) for a particular VM
HotShot-Hermez Adapter: write finalized batch to zkevm-node DB (for Aggregator to pick up)
Dependencies
Adapt zkevm-node Etherman to work with modified rollup contract (if changes necessary).
Diagram plugin architecture (VM-agnostic framework interacting with a specific zkEVM application layer, including RPC, prover, and rollup contract)
`State`: Implement `validate_block`
Needed to satisfy HotShotState
trait for State
-
validate_block
needs to check that the parent state commitment of the block matches the current state commitment of the state. - check that view number is greater than current view number
- check that the first block only contains a genesis transaction.
- check that no genesis transaction (except for in the first block).
Execute committed blocks
Interface to register a VM
As long as it's possible to integrate an app with the sequencer we can consider this done. We currently don't plan on having multiple VMs.
Experiment: zkevm-node Sequencer bypass
- Run the zkevm-node locally
- Insert a batch with one EVM transaction into the corresponding zkevm-node database
- Check if the Aggregator can compute the proof
- Document what happens
Define opaque transaction with application tag
This type should be an enum with 2 variants, one being a special type of genesis transaction the other one being the regular transaction type the sequencer processes.
- Add
Genesis
transaction variant containingChainVariables
. - Add regular transaction variant, name suggestion:
Wrapped
- #48
Script to run espresso sequencer with zkevm-node
Skeleton: define types required for sequencer application
See description of types here.
- NodeTypes
- Block
- Transaction
- State
- Committable
- for State
- for Transaction
- for Block
- TestableState
- TestableBlock
Estimate gas cost of verifying a QC
Dependencies
- Exact definition of QC
- #5
zkEVM Application
Sequencer integration with Polygon Hermez
Interface to take an application-specific transaction, wrap it in the opaque transaction type, and submit it to the HotShot layer
More granular tests for `State` validation
Could be worthwhile to make sure we can trip each failure case.
`Block`: Implement `contained_transactions`
Needed to satisfy HotShotBlock
trait for Block
Rust test code to deploy the mock HotShot contract
Dependencies
A rust function to deploy the HotShot contract. We can extent deploy
to also deploy the HotShot contract.
Pass execution results to JSON-RPC
Implement HotShot traits for block type
Implement RPC dispatch to forward EVM transactions and queries
No dependencies.
- The RPC dispatch needs to inspect the
method
of the Ethereum JsonRPC request. - If the method is
eth_sendRawTransaction
the request needs to be send to the zkEVM apps Submit API. - Requests with other methods need to be sent to the zkevm-node RPC.
Subscribe to block updates from the framework
`State`: Implement `on_commit`
Needed to satisfy HotShotState
trait for State
Disable unused services/components of Polygon Hermez (Sequencer, mempool)
No dependencies.
This is not a high priority task because as long as we don't make any requests with method eth_sendRawTransaction
to the zkevm-node JsonRPC they shouldn't really do anything. I still think it would be nicer for testing locally if we can do so without running the zkevm-node Sequencer.
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.