Skip to content
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

release taiko reth v1.0.0, draft PR #58

Closed
wants to merge 148 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
8ee7b80
init commit
johntaiko Mar 12, 2024
2209fb4
Update t8n command arguments and parsers
johntaiko Mar 13, 2024
2195995
Refactor t8n command arguments and execution
johntaiko Mar 13, 2024
d139b4d
Refactor t8n command and provider module
johntaiko Mar 13, 2024
7ec3960
Refactor t8n command and update visibility of utility functions
johntaiko Mar 13, 2024
f9c6c8c
feat: Add is_anchor field and functions
petarvujovic98 Mar 13, 2024
04f026d
feat: Add taiko block attributes builder
petarvujovic98 Mar 13, 2024
9009c5a
[WIP]: Start work on Taiko block builder
petarvujovic98 Mar 13, 2024
8fe5634
Add thiserror crate to dependencies
johntaiko Mar 14, 2024
b5624c2
Add rlp crate and implement StateAccount struct
johntaiko Mar 14, 2024
0062b0d
Merge branch 'feat/support_t8n_and_taikop' of gh_work:taikoxyz/reth i…
johntaiko Mar 14, 2024
138e603
Remove unused dependencies and dead code
johntaiko Mar 14, 2024
ab178d6
[WIP]: Make progress on block building
petarvujovic98 Mar 14, 2024
d3da37b
Fix serialization issue and update dependencies
johntaiko Mar 14, 2024
955f5e9
Merge branch 'feat/support_t8n_and_taikop' of gh_work:taikoxyz/reth i…
johntaiko Mar 14, 2024
dd15fd2
[WIP]: Configure payload builder for Taiko node
petarvujovic98 Mar 14, 2024
72c2e52
feat: Add TaikoExecutionPayload export
petarvujovic98 Mar 15, 2024
f78b1e5
feat: Add anchor validation after block building
petarvujovic98 Mar 15, 2024
c57446a
feat: Add TaikoExecutionPayload as payload for on_new_payload handler
petarvujovic98 Mar 15, 2024
dbcfc28
feat: Allow same timestamp as parent
petarvujovic98 Mar 15, 2024
c925049
fix: Fix compiler errors
petarvujovic98 Mar 19, 2024
54a9783
chore: Rename node
petarvujovic98 Mar 20, 2024
4b6a2bc
refactor: Move block metadata and l1 origin structs into primitives
petarvujovic98 Mar 20, 2024
fc73efa
feat: Add stub implementations for taiko extended API
petarvujovic98 Mar 20, 2024
3a67414
fix: Enhance the EthApi trait with Taiko APIs
petarvujovic98 Mar 20, 2024
8cd32bc
feat: Add TxPoolContent API handler
petarvujovic98 Mar 20, 2024
382010d
feat: Add Taiko genesis and chain spec
petarvujovic98 Mar 20, 2024
3564fd1
fix: Put taiko features behind compilation flags
petarvujovic98 Mar 20, 2024
8197581
chore: Rename structs and update export from payload builder
petarvujovic98 Mar 21, 2024
a9ca112
feat: Add consts to finalize anchor validation
petarvujovic98 Mar 22, 2024
a5692d1
refactor: Update transaction iteration
petarvujovic98 Mar 22, 2024
6e0abb2
fix: Fix compile errors
petarvujovic98 Mar 22, 2024
b5928a9
feat: Update attributes definition
petarvujovic98 Mar 27, 2024
02c6277
feat: Add taiko related tables to database
petarvujovic98 Mar 27, 2024
1cbc438
feat: Add L1 Origin writing and reading
petarvujovic98 Mar 27, 2024
cf82cce
feat: Implement L1 origin related API handlers
petarvujovic98 Mar 27, 2024
060538d
feat: Handle L1 origin tables
petarvujovic98 Mar 28, 2024
b352771
chore: Remove unused imports
petarvujovic98 Mar 28, 2024
847e1eb
feat: Use bytes to store L1 origin
petarvujovic98 Mar 28, 2024
b6a8954
feat: Implement L1 origin traits for tests
petarvujovic98 Mar 28, 2024
b449c18
fix: Map errors to correct type
petarvujovic98 Mar 28, 2024
153a80f
chore: Remove contractName field from json
petarvujovic98 Mar 29, 2024
d100cfd
feat: Expose chain specs
petarvujovic98 Mar 29, 2024
a6eef4c
feat: Add taiko payload and taiko-reth binary
petarvujovic98 Mar 29, 2024
60073ef
chore: Remove tx_pool_content function until clear
petarvujovic98 Apr 2, 2024
9037ef4
refactor: Add get_txs closure
petarvujovic98 Apr 2, 2024
c4517c0
Merge branch 'taiko' into feat/support_t8n_and_taikop
petarvujovic98 Jun 11, 2024
b485e2e
chore: Update code based on upstream changes
petarvujovic98 Jun 12, 2024
04096c8
Merge branch 'taiko' into feat/support_t8n_and_taikop
petarvujovic98 Jun 12, 2024
41823f0
feat: Move taiko features to separate rpc module
petarvujovic98 Jun 12, 2024
786c58b
Merge branch 'v1.0.0' of gh_work:taikoxyz/taiko-reth into HEAD
johntaiko Jul 3, 2024
eb55ad2
fix: taiko features
johntaiko Jul 3, 2024
191e810
feat: Add reth-chainspec and reth-rpc-types-compat as optional depend…
johntaiko Jul 3, 2024
816207f
chore: add a taiko specify crate
johntaiko Jul 4, 2024
d34e437
feat: Add reth-chainspec and reth-rpc-types-compat as optional depend…
johntaiko Jul 4, 2024
1a6f6c1
feat: add taiko feature in revm crate
johntaiko Jul 5, 2024
272cf6e
feat: support taiko evm executor
johntaiko Jul 5, 2024
c0e85e3
improve: relocate the L1Origin codes
johntaiko Jul 5, 2024
b8c1cd0
feat(chainspec): add mainnet and hekla
johntaiko Jul 5, 2024
6c825b0
improve: relocate taiko payload codes
johntaiko Jul 5, 2024
0f58177
improve(primitives): relocate taiko codes
johntaiko Jul 5, 2024
4e22b21
fix: add missing dependencies
johntaiko Jul 5, 2024
1e843a4
improve(storage): relocate l1 origin database codes
johntaiko Jul 5, 2024
7362cab
fix: remove optimistic mode in taiko executor
johntaiko Jul 6, 2024
77bcd40
Relocate taiko payload codes
johntaiko Jul 6, 2024
fbcdcfd
Relocate taiko payload codes
johntaiko Jul 6, 2024
29148d2
Relocate taiko payload codes
johntaiko Jul 6, 2024
775ef32
Relocate taiko payload codes
johntaiko Jul 6, 2024
112e21e
Relocate taiko payload codes
johntaiko Jul 8, 2024
9cb3c13
Relocate taiko payload codes
johntaiko Jul 8, 2024
0588b68
Relocate taiko payload codes
johntaiko Jul 8, 2024
e4f0def
Relocate taiko payload codes
johntaiko Jul 8, 2024
a40de63
chore: Update imports in blockchain_test.rs
johntaiko Jul 8, 2024
82299e7
Refactor execution payload validator to improve code readability and …
johntaiko Jul 8, 2024
e637753
chore: Remove unused dependencies in Cargo.toml
johntaiko Jul 8, 2024
0b9a76d
chore: Remove unused dependencies and update imports
johntaiko Jul 8, 2024
8fa22e9
Remove reth-payload-builder from dependencies
johntaiko Jul 8, 2024
050dfd9
chore: Refactor execution payload validator for improved readability …
johntaiko Jul 8, 2024
84f3b78
Refactor ProviderError to remove unused Serde variant
johntaiko Jul 8, 2024
7b132ea
chore: Update dependencies and remove unused dependencies in Cargo.toml
johntaiko Jul 8, 2024
e3973e6
Refactor TransactionsProvider for improved code readability and maint…
johntaiko Jul 8, 2024
0074414
Refactor transaction module for improved code readability and maintai…
johntaiko Jul 8, 2024
9af48a3
Refactor Taiko specific re-exports for improved code readability and …
johntaiko Jul 8, 2024
6f1219b
Refactor Taiko specific re-exports for improved code readability and …
johntaiko Jul 8, 2024
cad6c53
Refactor Taiko specific re-exports for improved code readability and …
johntaiko Jul 8, 2024
a93d974
chore: Remove taiko-reth-payload-builder from dependencies
johntaiko Jul 8, 2024
920038e
Refactor anchor transaction handling for improved code readability an…
johntaiko Jul 8, 2024
2a6691f
Refactor taiko-reth-consensus to taiko-reth-beacon-consensus for impr…
johntaiko Jul 22, 2024
fe717fd
Refactor l2_contract field to treasury method for improved code reada…
johntaiko Jul 22, 2024
f59a239
Refactor txpool_content method parameters for improved code readabili…
johntaiko Jul 22, 2024
8e44ea2
Refactor hardfork conditions for Taiko chains to include Paris and Lo…
johntaiko Jul 22, 2024
1973dd4
fix: consensus
johntaiko Jul 22, 2024
77d64ae
Refactor Taiko specific re-exports for improved code readability and …
johntaiko Aug 12, 2024
9122142
chore: Add flate2 dependency for compression
johntaiko Aug 12, 2024
966cbf9
chore: Add alloy-rlp and reth-rpc-types-compat dependencies
johntaiko Aug 14, 2024
95bb990
Refactor Taiko specific re-exports for improved code readability and …
johntaiko Aug 14, 2024
e882225
feat: add taiko and taikoAuth apis
johntaiko Aug 14, 2024
fb9ad3c
chore: Add reth-rpc-builder/taiko to taiko feature in Cargo.toml
johntaiko Aug 14, 2024
53db9f1
fix: move taiko auth api into auth_module
johntaiko Aug 14, 2024
4169bee
chore: Remove taiko-reth-evm dependency and update Cargo.toml
johntaiko Aug 14, 2024
abfae26
feat: Add EthExecutorProvider for mainnet block execution
johntaiko Aug 14, 2024
c1111d6
chore: Update L1Origin module documentation and naming conventions
johntaiko Aug 14, 2024
14e8741
feat: support ontake
johntaiko Aug 19, 2024
c863702
feat: add docker build into makefile
johntaiko Aug 19, 2024
a41b92c
Update DockerfileTaiko.cross and Makefile for taiko-reth image name
johntaiko Aug 19, 2024
223c3b4
feat: Add support for Taiko binary installation
johntaiko Aug 20, 2024
d261a6b
feat: Update parse_duration_from_secs function to remove explicit typ…
johntaiko Aug 20, 2024
60b0cbd
fix: return error when not found in L1Origin
johntaiko Aug 26, 2024
207bda5
feat: update genesis
johntaiko Aug 26, 2024
be27561
fix: APIs
johntaiko Aug 26, 2024
91d9a39
feat: Add tracing dependency and enable tracing in payload validator
johntaiko Aug 26, 2024
3a953ab
feat: Add debug logging for payload in TaikoExecutionPayloadValidator
johntaiko Aug 28, 2024
fb9b55d
feat: Add support for Taiko binary installation
johntaiko Aug 29, 2024
e394540
feat: Add support for Taiko binary installation
johntaiko Aug 30, 2024
0b50f02
fix: set api version in payload id and validate it
johntaiko Aug 30, 2024
925df67
chore: Update engine_handle.fork_choice_updated() function signature
johntaiko Aug 30, 2024
6a7ad00
chore: Update dependencies and add tracing for payload validation
johntaiko Aug 30, 2024
f0abe0d
fix: commit after put into db
johntaiko Sep 2, 2024
5c696a6
feat: Refactor Taiko payload builder and improve error handling
johntaiko Sep 2, 2024
0f937d6
chore: Update dependencies and add tracing for payload validation
johntaiko Sep 2, 2024
1e03aba
feat: Add reth-chainspec dependency and enable Taiko support
johntaiko Sep 2, 2024
924c5a5
feat: Refactor Taiko payload builder and improve error handling
johntaiko Sep 2, 2024
a78f951
feat: Refactor Taiko payload builder and improve error handling
johntaiko Sep 2, 2024
68edbc3
fix: enable requests when in prague
johntaiko Sep 3, 2024
02508c0
fix: remove txs after miner
johntaiko Sep 3, 2024
8f0967f
fix: pascal case of tx list
johntaiko Sep 3, 2024
7221b7a
Refactor Taiko payload builder and improve error handling
johntaiko Sep 3, 2024
29eabd2
fix: optimistic syncing in taiko without run pipeline again
johntaiko Sep 4, 2024
69c1f4a
feat: introduce debug_setHead
johntaiko Sep 4, 2024
5eb4cb1
feat: support insert older blocks
johntaiko Sep 4, 2024
0de96ab
feat: Add debug flag to fork choice update message
johntaiko Sep 4, 2024
358923a
feat: enable ARM64 build and push for Taiko Docker image
johntaiko Sep 5, 2024
3e30766
feat: Update Taiko chain configuration
johntaiko Sep 9, 2024
1a0aafb
refactor: Remove unused dependencies and update Taiko chain configura…
johntaiko Sep 9, 2024
50df8b0
fix: use bootnodes argument into discv4&discv5
johntaiko Sep 10, 2024
8e7be73
fix: default value for default optional parser
johntaiko Sep 10, 2024
7f6ff7b
refactor: Enable anchor and skip options in BlockExecutionInput
johntaiko Sep 12, 2024
7a33374
fix: makefile build-taiko
johntaiko Oct 8, 2024
8d23543
fix bug about txPoolContentWithMinTip api
mask-pp Oct 23, 2024
05cadb7
format code
mask-pp Oct 23, 2024
f8f1f3d
small change
mask-pp Oct 24, 2024
8458b33
send Result
mask-pp Oct 25, 2024
09a492f
revert changes
mask-pp Oct 25, 2024
fb6e4cf
Merge pull request #52 from taikoxyz/fix_bug_getPoolContent_
mask-pp Oct 29, 2024
2f8159f
update git workflows
mask-pp Oct 30, 2024
0f959fc
Revert non functional modifications
mask-pp Oct 31, 2024
5e4e7fe
revert changes in workflow
mask-pp Oct 31, 2024
c1e88d5
Revert non functional modifications
mask-pp Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor taiko-reth-consensus to taiko-reth-beacon-consensus for impr…
…oved code readability and maintainability
johntaiko committed Jul 22, 2024
commit 2a6691f9c5e04d04da2780f856d927b5a0911ea8
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -353,15 +353,15 @@ reth-trie = { path = "crates/trie/trie" }
reth-trie-common = { path = "crates/trie/common" }
reth-trie-parallel = { path = "crates/trie/parallel" }


taiko-reth-beacon-consensus = { path = "crates/taiko/consensus" }
taiko-reth-primitives = { path = "crates/taiko/primitives" }
taiko-reth-provider = { path = "crates/taiko/storage" }
taiko-reth-evm = { path = "crates/taiko/evm" }
taiko-reth-payload-builder = { path = "crates/taiko/payload/builder" }
taiko-reth-payload-validator = { path = "crates/taiko/payload/validator" }
taiko-reth-engine-primitives = { path = "crates/taiko/engine-primitives" }
taiko-reth-consensus = { path = "crates/taiko/consensus" }
taiko-reth-node = { path = "crates/taiko/node" }

# revm
revm = { version = "10.0.0", features = [
"std",
1 change: 0 additions & 1 deletion bin/reth/src/lib.rs
Original file line number Diff line number Diff line change
@@ -38,7 +38,6 @@ pub mod utils;
pub mod payload {
pub use reth_payload_builder::*;
pub use reth_payload_primitives::*;
pub use taiko_reth_payload_validator::TaikoExecutionPayloadValidator;
}

/// Re-exported from `reth_node_api`.
2 changes: 1 addition & 1 deletion crates/taiko/consensus/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "taiko-reth-consensus"
name = "taiko-reth-beacon-consensus"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
20 changes: 10 additions & 10 deletions crates/taiko/consensus/src/lib.rs
Original file line number Diff line number Diff line change
@@ -25,16 +25,16 @@ use std::{sync::Arc, time::SystemTime};
mod validation;
pub use validation::validate_block_post_execution;

/// Ethereum beacon consensus
/// Taiko beacon consensus
///
/// This consensus engine does basic checks as outlined in the execution specs.
#[derive(Debug)]
pub struct EthBeaconConsensus {
pub struct TaikoBeaconConsensus {
/// Configuration
chain_spec: Arc<ChainSpec>,
}

impl EthBeaconConsensus {
impl TaikoBeaconConsensus {
/// Create a new instance of [`EthBeaconConsensus`]
pub const fn new(chain_spec: Arc<ChainSpec>) -> Self {
Self { chain_spec }
@@ -85,7 +85,7 @@ impl EthBeaconConsensus {
}
}

impl Consensus for EthBeaconConsensus {
impl Consensus for TaikoBeaconConsensus {
fn validate_header(&self, header: &SealedHeader) -> Result<(), ConsensusError> {
validate_header_gas(header)?;
validate_header_base_fee(header, &self.chain_spec)?;
@@ -239,7 +239,7 @@ mod tests {
let child = header_with_gas_limit(parent.gas_limit + 5);

assert_eq!(
EthBeaconConsensus::new(Arc::new(ChainSpec::default()))
TaikoBeaconConsensus::new(Arc::new(ChainSpec::default()))
.validate_against_parent_gas_limit(&child, &parent),
Ok(())
);
@@ -251,7 +251,7 @@ mod tests {
let child = header_with_gas_limit(MINIMUM_GAS_LIMIT - 1);

assert_eq!(
EthBeaconConsensus::new(Arc::new(ChainSpec::default()))
TaikoBeaconConsensus::new(Arc::new(ChainSpec::default()))
.validate_against_parent_gas_limit(&child, &parent),
Err(ConsensusError::GasLimitInvalidMinimum { child_gas_limit: child.gas_limit })
);
@@ -263,7 +263,7 @@ mod tests {
let child = header_with_gas_limit(parent.gas_limit + parent.gas_limit / 1024 + 1);

assert_eq!(
EthBeaconConsensus::new(Arc::new(ChainSpec::default()))
TaikoBeaconConsensus::new(Arc::new(ChainSpec::default()))
.validate_against_parent_gas_limit(&child, &parent),
Err(ConsensusError::GasLimitInvalidIncrease {
parent_gas_limit: parent.gas_limit,
@@ -278,7 +278,7 @@ mod tests {
let child = header_with_gas_limit(parent.gas_limit - 5);

assert_eq!(
EthBeaconConsensus::new(Arc::new(ChainSpec::default()))
TaikoBeaconConsensus::new(Arc::new(ChainSpec::default()))
.validate_against_parent_gas_limit(&child, &parent),
Ok(())
);
@@ -290,7 +290,7 @@ mod tests {
let child = header_with_gas_limit(parent.gas_limit - parent.gas_limit / 1024 - 1);

assert_eq!(
EthBeaconConsensus::new(Arc::new(ChainSpec::default()))
TaikoBeaconConsensus::new(Arc::new(ChainSpec::default()))
.validate_against_parent_gas_limit(&child, &parent),
Err(ConsensusError::GasLimitInvalidDecrease {
parent_gas_limit: parent.gas_limit,
@@ -312,6 +312,6 @@ mod tests {
}
.seal_slow();

assert_eq!(EthBeaconConsensus::new(chain_spec).validate_header(&header), Ok(()));
assert_eq!(TaikoBeaconConsensus::new(chain_spec).validate_header(&header), Ok(()));
}
}
2 changes: 1 addition & 1 deletion crates/taiko/evm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ reth-prune-types.workspace = true
reth-execution-types.workspace = true

# Taiko
taiko-reth-consensus.workspace = true
taiko-reth-beacon-consensus.workspace = true

# Ethereum
revm-primitives = { workspace = true, features = ["taiko"] }
2 changes: 1 addition & 1 deletion crates/taiko/evm/src/execute.rs
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ use revm_primitives::{
db::{Database, DatabaseCommit},
Address, BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, HashSet, ResultAndState,
};
use taiko_reth_consensus::validate_block_post_execution;
use taiko_reth_beacon_consensus::validate_block_post_execution;

#[cfg(not(feature = "std"))]
use alloc::{sync::Arc, vec, vec::Vec};
3 changes: 2 additions & 1 deletion crates/taiko/node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -21,8 +21,9 @@ reth-transaction-pool.workspace = true
reth-network.workspace = true
reth-consensus.workspace = true
reth-auto-seal-consensus.workspace = true
reth-beacon-consensus.workspace = true

# taiko
taiko-reth-beacon-consensus.workspace = true
taiko-reth-evm.workspace = true
taiko-reth-engine-primitives.workspace = true
taiko-reth-payload-builder.workspace = true
4 changes: 2 additions & 2 deletions crates/taiko/node/src/node.rs
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
use crate::{TaikoEngineTypes, TaikoEvmConfig};
use reth_auto_seal_consensus::AutoSealConsensus;
use reth_basic_payload_builder::{BasicPayloadJobGenerator, BasicPayloadJobGeneratorConfig};
use reth_beacon_consensus::EthBeaconConsensus;
use reth_network::NetworkHandle;
use reth_node_builder::{
components::{
@@ -21,6 +20,7 @@ use reth_transaction_pool::{
TransactionValidationTaskExecutor,
};
use std::sync::Arc;
use taiko_reth_beacon_consensus::TaikoBeaconConsensus;
use taiko_reth_engine_primitives::{
TaikoBuiltPayload, TaikoPayloadAttributes, TaikoPayloadBuilderAttributes,
};
@@ -264,7 +264,7 @@ where
if ctx.is_dev() {
Ok(Arc::new(AutoSealConsensus::new(ctx.chain_spec())))
} else {
Ok(Arc::new(EthBeaconConsensus::new(ctx.chain_spec())))
Ok(Arc::new(TaikoBeaconConsensus::new(ctx.chain_spec())))
}
}
}

Unchanged files with check annotations Beta

}
// take db
let db = std::mem::take(evm.db_mut());
// calcuate roots

Check failure on line 261 in bin/reth/src/commands/t8n/mod.rs

GitHub Actions / codespell

calcuate ==> calculate
let mut tx_trie = MptNode::default();
let mut receipt_trie = MptNode::default();
let mut bloom = Bloom::default();