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

fix(client): Walkback Channel Timeout #456

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 8 additions & 21 deletions .github/workflows/client_host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ jobs:
strategy:
matrix:
target: ["native", "asterisc"]
name:
[
"OP Mainnet (Ecotone) - Block #122093770",
"OP Sepolia (Fjord) - Block #13992475",
]
name: ["OP Sepolia (Granite) - Block #16491249"]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand Down Expand Up @@ -48,24 +44,15 @@ jobs:
mv ./rvgo/bin/asterisc /usr/local/bin/
- name: Set run environment
run: |
if [[ ${{ contains(matrix.name, 122093770) }} == true ]]; then
BLOCK_NUMBER=122093770
if [[ ${{ contains(matrix.name, 16491249) }} == true ]]; then
BLOCK_NUMBER=16491249
echo "BLOCK_NUMBER=$BLOCK_NUMBER" >> $GITHUB_ENV
echo "L2_CLAIM=0xf31619aa7cdf03e6e51bb5eda528309eff0354172c4a64186622929c76bd58a9" >> $GITHUB_ENV
echo "L2_OUTPUT_ROOT=0xec52f62123ab0404c1729fbb34716046cffaba6c47836b353184e231e290c560" >> $GITHUB_ENV
echo "L2_HEAD=0xd20e2cad399a964c7bb656c8d32a6e5356a831167cc58a00e60285abf7e94df6" >> $GITHUB_ENV
echo "L1_HEAD=0xed32f3f6cdf80c1d755851ad065f4436ff17ff35b7910262f0d22c1e0919a315" >> $GITHUB_ENV
echo "L2_CHAIN_ID=10" >> $GITHUB_ENV
echo "WITNESS_TAR_NAME=ecotone-op-mainnet-$BLOCK_NUMBER-witness.tar.zst" >> $GITHUB_ENV
elif [[ ${{ contains(matrix.name, 13992475) }} == true ]]; then
BLOCK_NUMBER=13992475
echo "BLOCK_NUMBER=$BLOCK_NUMBER" >> $GITHUB_ENV
echo "L2_CLAIM=0xba854e0a3e1e65f8e4b05f39a5ad28c13eac0d5444c7c336b6f7ebabb0f20229" >> $GITHUB_ENV
echo "L2_OUTPUT_ROOT=0x59cfca741f06a0e5607e3526e4f9931b8a6a2313b48d8bd0c2242bace6d930f1" >> $GITHUB_ENV
echo "L2_HEAD=0x90ec80845a776021ce56b3e87072e8e30d2931c9c67ccaf2a305bd08268178ee" >> $GITHUB_ENV
echo "L1_HEAD=0x607b4a4d2bd7e7bced989e4bc471a5ce61335b63881c624c8522f63113a5af86" >> $GITHUB_ENV
echo "L2_CLAIM=0x82da7204148ba4d8d59e587b6b3fdde5561dc31d9e726220f7974bf9f2158d75" >> $GITHUB_ENV
echo "L2_OUTPUT_ROOT=0xa548f22e1aa590de7ed271e3eab5b66c6c3db9b8cb0e3f91618516ea9ececde4" >> $GITHUB_ENV
echo "L2_HEAD=0x09b298a83baf4c2e3c6a2e355bb09e27e3fdca435080e8754f8749233d7333b2" >> $GITHUB_ENV
echo "L1_HEAD=0x33a3e5721faa4dc6f25e75000d9810fd6c41320868f3befcc0c261a71da398e1" >> $GITHUB_ENV
echo "L2_CHAIN_ID=11155420" >> $GITHUB_ENV
echo "WITNESS_TAR_NAME=fjord-op-sepolia-$BLOCK_NUMBER-witness.tar.zst" >> $GITHUB_ENV
echo "WITNESS_TAR_NAME=granite-op-sepolia-$BLOCK_NUMBER-witness.tar.zst" >> $GITHUB_ENV
fi
- name: Decompress witness data directory
run: |
Expand Down
11 changes: 11 additions & 0 deletions bin/client/src/l1/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ where
chain_provider.clone(),
);
let dap = EthereumDataSource::new(chain_provider.clone(), blob_provider, &cfg);

// Walk back the starting L1 block by `channel_timeout` to ensure that the full channel is
// captured.
let channel_timeout =
boot_info.rollup_config.channel_timeout(l2_safe_head.block_info.timestamp);
let mut l1_origin_number = l1_origin.number.saturating_sub(channel_timeout);
if l1_origin_number < boot_info.rollup_config.genesis.l1.number {
l1_origin_number = boot_info.rollup_config.genesis.l1.number;
}
let l1_origin = chain_provider.block_info_by_number(l1_origin_number).await?;

let pipeline = PipelineBuilder::new()
.rollup_config(cfg)
.dap_source(dap)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.