Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into joshie/headerext
Browse files Browse the repository at this point in the history
  • Loading branch information
joshieDo committed Sep 25, 2024
2 parents 70837bc + 1e0a35e commit 9def147
Show file tree
Hide file tree
Showing 157 changed files with 1,709 additions and 1,090 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,9 @@ jobs:
with:
webhook-url: ${{ secrets.RETH_ALERTS_WEBHOOK }}
content: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}"
- name: Slack Webhook Action
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
39 changes: 31 additions & 8 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions bin/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ reth-prune.workspace = true
# crypto
alloy-rlp.workspace = true
alloy-rpc-types = { workspace = true, features = ["engine"] }
alloy-consensus.workspace = true

# tracing
tracing.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions bin/reth/src/commands/debug_cmd/build_block.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Command for debugging block building.
use alloy_consensus::TxEip4844;
use alloy_rlp::Decodable;
use alloy_rpc_types::engine::{BlobsBundleV1, PayloadAttributes};
use clap::Parser;
Expand All @@ -25,7 +26,7 @@ use reth_payload_builder::database::CachedReads;
use reth_primitives::{
revm_primitives::KzgSettings, Address, BlobTransaction, BlobTransactionSidecar, Bytes,
PooledTransactionsElement, SealedBlock, SealedBlockWithSenders, Transaction, TransactionSigned,
TxEip4844, B256, U256,
B256, U256,
};
use reth_provider::{
providers::BlockchainProvider, BlockHashReader, BlockReader, BlockWriter, ChainSpecProvider,
Expand Down Expand Up @@ -226,7 +227,6 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
best_block.hash(),
payload_attrs,
)?,
provider_factory.chain_spec(),
);

let args = BuildArguments::new(
Expand Down
1 change: 0 additions & 1 deletion bin/reth/src/commands/debug_cmd/replay_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
NoopTransactionPool::default(),
ctx.task_executor.clone(),
BasicPayloadJobGeneratorConfig::default(),
provider_factory.chain_spec(),
payload_builder,
);

Expand Down
10 changes: 6 additions & 4 deletions book/run/sync-op-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

To sync OP mainnet, bedrock state needs to be imported as a starting point. There are currently two ways:

* Minimal bootstrap: only state snapshot at Bedrock block is imported without any OVM historical data.
* Full bootstrap: state, blocks and receipts are imported.
* Minimal bootstrap **(recommended)**: only state snapshot at Bedrock block is imported without any OVM historical data.
* Full bootstrap **(not recommended)**: state, blocks and receipts are imported. *Not recommended for now: [storage consistency issue](https://github.com/paradigmxyz/reth/pull/11099) tldr: sudden crash may break the node

## Minimal bootstrap
## Minimal bootstrap (recommended)

**The state snapshot at Bedrock block is required.** It can be exported from [op-geth](https://github.com/testinprod-io/op-erigon/blob/pcw109550/bedrock-db-migration/bedrock-migration.md#export-state) (**.jsonl**) or downloaded directly from [here](https://mega.nz/file/GdZ1xbAT#a9cBv3AqzsTGXYgX7nZc_3fl--tcBmOAIwIA5ND6kwc).

Expand All @@ -16,7 +16,9 @@ $ op-reth node --chain optimism --datadir op-mainnet --debug.tip 0x098f87b75c8b8
```


## Full bootstrap
## Full bootstrap (not recommended)

**Not recommended for now**: [storage consistency issue](https://github.com/paradigmxyz/reth/pull/11099) tldr: sudden crash may break the node.

### Import state

Expand Down
4 changes: 4 additions & 0 deletions crates/blockchain-tree-api/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ pub enum InsertBlockErrorKindTwo {
/// Provider error.
#[error(transparent)]
Provider(#[from] ProviderError),
/// Other errors.
#[error(transparent)]
Other(#[from] Box<dyn std::error::Error + Send + Sync + 'static>),
}

impl InsertBlockErrorKindTwo {
Expand Down Expand Up @@ -365,6 +368,7 @@ impl InsertBlockErrorKindTwo {
}
}
Self::Provider(err) => Err(InsertBlockFatalError::Provider(err)),
Self::Other(err) => Err(InternalBlockExecutionError::Other(err).into()),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/blockchain-tree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ reth-evm-ethereum.workspace = true
parking_lot.workspace = true
assert_matches.workspace = true
alloy-genesis.workspace = true
alloy-consensus.workspace = true

[features]
test-utils = []
Expand Down
3 changes: 2 additions & 1 deletion crates/blockchain-tree/src/blockchain_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,7 @@ where
#[cfg(test)]
mod tests {
use super::*;
use alloy_consensus::TxEip1559;
use alloy_genesis::{Genesis, GenesisAccount};
use alloy_primitives::{keccak256, Address, Sealable, B256};
use assert_matches::assert_matches;
Expand All @@ -1390,7 +1391,7 @@ mod tests {
proofs::{calculate_receipt_root, calculate_transaction_root},
revm_primitives::AccountInfo,
Account, BlockBody, Header, Signature, Transaction, TransactionSigned,
TransactionSignedEcRecovered, TxEip1559, Withdrawals,
TransactionSignedEcRecovered, Withdrawals,
};
use reth_provider::{
test_utils::{
Expand Down
Loading

0 comments on commit 9def147

Please sign in to comment.