Skip to content

Commit f409514

Browse files
authored
Continuous Preimage Creation and Finalized Header Maintenance (#9)
1 parent 85154c0 commit f409514

File tree

15 files changed

+489
-475
lines changed

15 files changed

+489
-475
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
docker system prune -a --volumes -f
3232
- name: Install Foundry
3333
uses: foundry-rs/foundry-toolchain@v1
34+
with:
35+
version: 'v1.0.0'
3436
- name: Install kurtosis
3537
run: |
3638
sudo apt-get install jq
@@ -40,7 +42,7 @@ jobs:
4042
sudo apt install kurtosis-cli=1.11.1 -V
4143
- name: Download optimism-preimage-maker
4244
run: |
43-
git clone -b v0.1.7 https://github.com/datachainlab/optimism-preimage-maker
45+
git clone -b v0.2.1 https://github.com/datachainlab/optimism-preimage-maker
4446
- name: Start optimism dev net
4547
run: |
4648
cd optimism-preimage-maker

module/config/config.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ package config
33
import (
44
"context"
55
"fmt"
6+
"time"
7+
68
"github.com/datachainlab/ethereum-ibc-relay-chain/pkg/relay/ethereum"
79
"github.com/ethereum/go-ethereum/common"
810
"github.com/hyperledger-labs/yui-relayer/core"
911
"github.com/hyperledger-labs/yui-relayer/coreutil"
1012
"github.com/hyperledger-labs/yui-relayer/log"
1113
"github.com/hyperledger-labs/yui-relayer/otelcore"
1214
"go.opentelemetry.io/otel"
13-
"time"
1415

1516
"github.com/datachainlab/optimism-ibc-relay-prover/module/prover"
1617
"github.com/datachainlab/optimism-ibc-relay-prover/module/prover/l1"
@@ -26,23 +27,29 @@ func (c *ProverConfig) Build(chain core.Chain) (core.Prover, error) {
2627
}
2728

2829
logger := log.GetLogger().WithChain(l2Chain.ChainID()).WithModule(prover.ModuleName)
29-
l1Client, err := l1.NewL1Client(context.Background(), c.L1BeaconEndpoint, c.L1ExecutionEndpoint, c.MinimalForkSched, logger)
30+
l1Client, err := l1.NewL1Client(
31+
context.Background(),
32+
c.L1BeaconEndpoint,
33+
c.L1ExecutionEndpoint,
34+
c.PreimageMakerTimeout,
35+
c.PreimageMakerEndpoint,
36+
c.MinimalForkSched,
37+
logger,
38+
)
3039
if err != nil {
3140
return nil, err
3241
}
3342
l2Client := l2.NewL2Client(
3443
l2Chain,
35-
c.L1ExecutionEndpoint,
3644
c.OpNodeTimeout,
3745
c.PreimageMakerTimeout,
3846
c.PreimageMakerEndpoint,
3947
c.OpNodeEndpoint,
4048
logger,
4149
)
4250
inner := prover.NewProver(l2Chain, l1Client, l2Client,
43-
c.TrustingPeriod, c.RefreshThresholdRate, c.MaxClockDrift, c.MaxHeaderConcurrency, c.MaxL2NumsForPreimage,
44-
common.HexToAddress(c.DisputeGameFactoryAddress),
45-
logger)
51+
c.TrustingPeriod, c.RefreshThresholdRate, c.MaxClockDrift, c.MaxHeaderConcurrency,
52+
common.HexToAddress(c.DisputeGameFactoryAddress), logger)
4653
tracer := otel.Tracer("github.com/datachainlab/optimism-ibc-relay-prover/module")
4754
return otelcore.NewProver(inner, l2Chain.ChainID(), tracer), nil
4855
}

module/config/config.pb.go

Lines changed: 47 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)