Skip to content

Commit 82eef3f

Browse files
committed
add the minimal_fork_sched field to ProverConfig to make testing more flexible
Signed-off-by: Masanori Yoshida <[email protected]>
1 parent 13024f0 commit 82eef3f

File tree

3 files changed

+190
-36
lines changed

3 files changed

+190
-36
lines changed

proto/relayer/provers/ethereum_light_client/config/config.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ message ProverConfig {
1313
string trusting_period = 3;
1414
string max_clock_drift = 4;
1515
Fraction refresh_threshold_rate = 5;
16+
map<string, uint64> minimal_fork_sched = 6;
1617
}
1718

1819
message Fraction {

relay/config.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ const (
2020
MINIMAL_PRESET_SYNC_COMMITTEE_SIZE = 32
2121
)
2222

23+
const (
24+
Altair = "altair"
25+
Bellatrix = "bellatrix"
26+
Capella = "capella"
27+
Deneb = "deneb"
28+
Electra = "electra"
29+
)
30+
2331
var (
2432
AltairSpec = lctypes.ForkSpec{
2533
FinalizedRootGindex: 105,
@@ -158,27 +166,27 @@ func (prc *ProverConfig) getForkParameters() *lctypes.ForkParameters {
158166
Forks: []*lctypes.Fork{
159167
{
160168
Version: []byte{1, 0, 0, 1},
161-
Epoch: 0,
169+
Epoch: prc.MinimalForkSched[Altair],
162170
Spec: &AltairSpec,
163171
},
164172
{
165173
Version: []byte{2, 0, 0, 1},
166-
Epoch: 0,
174+
Epoch: prc.MinimalForkSched[Bellatrix],
167175
Spec: &BellatrixSpec,
168176
},
169177
{
170178
Version: []byte{3, 0, 0, 1},
171-
Epoch: 0,
179+
Epoch: prc.MinimalForkSched[Capella],
172180
Spec: &CapellaSpec,
173181
},
174182
{
175183
Version: []byte{4, 0, 0, 1},
176-
Epoch: 0,
184+
Epoch: prc.MinimalForkSched[Deneb],
177185
Spec: &DenebSpec,
178186
},
179187
{
180188
Version: []byte{5, 0, 0, 1},
181-
Epoch: 0,
189+
Epoch: prc.MinimalForkSched[Electra],
182190
Spec: &ElectraSpec,
183191
},
184192
},

relay/config.pb.go

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

0 commit comments

Comments
 (0)