File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,10 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
205
205
206
206
// Configure gRPC if requested.
207
207
if ctx .IsSet (utils .GRPCEnabledFlag .Name ) {
208
- serviceV1a2 := execution .NewExecutionServiceServerV1Alpha2 (eth )
208
+ serviceV1a2 , err := execution .NewExecutionServiceServerV1Alpha2 (eth )
209
+ if err != nil {
210
+ utils .Fatalf ("failed to create execution service: %v" , err )
211
+ }
209
212
utils .RegisterGRPCExecutionService (stack , serviceV1a2 , & cfg .Node )
210
213
}
211
214
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ package execution
7
7
import (
8
8
"context"
9
9
"crypto/sha256"
10
+ "errors"
10
11
"fmt"
11
12
"math/big"
12
13
"sync"
@@ -67,17 +68,33 @@ var (
67
68
commitmentStateUpdateTimer = metrics .GetOrRegisterTimer ("astria/execution/commitment" , nil )
68
69
)
69
70
70
- func NewExecutionServiceServerV1Alpha2 (eth * eth.Ethereum ) * ExecutionServiceServerV1Alpha2 {
71
+ func NewExecutionServiceServerV1Alpha2 (eth * eth.Ethereum ) ( * ExecutionServiceServerV1Alpha2 , error ) {
71
72
bc := eth .BlockChain ()
72
73
74
+ if bc .Config ().AstriaRollupName == "" {
75
+ return nil , errors .New ("rollup name not set" )
76
+ }
77
+
78
+ if bc .Config ().AstriaSequencerInitialHeight == 0 {
79
+ return nil , errors .New ("sequencer initial height not set" )
80
+ }
81
+
82
+ if bc .Config ().AstriaCelestiaInitialHeight == 0 {
83
+ return nil , errors .New ("celestia initial height not set" )
84
+ }
85
+
86
+ if bc .Config ().AstriaCelestiaHeightVariance == 0 {
87
+ return nil , errors .New ("celestia height variance not set" )
88
+ }
89
+
73
90
if merger := eth .Merger (); ! merger .PoSFinalized () {
74
91
merger .FinalizePoS ()
75
92
}
76
93
77
94
return & ExecutionServiceServerV1Alpha2 {
78
95
eth : eth ,
79
96
bc : bc ,
80
- }
97
+ }, nil
81
98
}
82
99
83
100
func (s * ExecutionServiceServerV1Alpha2 ) GetGenesisInfo (ctx context.Context , req * astriaPb.GetGenesisInfoRequest ) (* astriaPb.GenesisInfo , error ) {
You can’t perform that action at this time.
0 commit comments