diff --git a/go.mod b/go.mod index 42b49387f..513828ed8 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module github.com/ethereum/go-ethereum go 1.21 require ( - buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240627184145-202c666b5a8a.1 - buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-20240627184145-202c666b5a8a.2 - buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240626163506-691883836b9e.2 - buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240627184145-00f432997496.2 + buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240627184145-202c666b5a8a.2 + buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-20240723183210-193b02425a52.2 + buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240723183210-d00b2a17ea5b.2 + buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240723183210-414756da3320.2 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 github.com/Microsoft/go-winio v0.6.1 github.com/VictoriaMetrics/fastcache v1.12.1 @@ -85,6 +85,8 @@ require ( ) require ( + buf.build/gen/go/astria/protocol-apis/grpc/go v1.4.0-00000000000000-71710707f61c.2 // indirect + buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.2-20240723183210-71710707f61c.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/DataDog/zstd v1.4.5 // indirect diff --git a/go.sum b/go.sum index 054ae7bd4..1ae85d46e 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,41 @@ +buf.build/gen/go/astria/execution-apis/grpc/go v1.3.0-20240627184145-202c666b5a8a.3 h1:NXiXUrU7Rngg7JCgjT1l3T3Z6fyrG9YHUlM88BP2JYg= +buf.build/gen/go/astria/execution-apis/grpc/go v1.3.0-20240627184145-202c666b5a8a.3/go.mod h1:Yy6i/mtJjqrY/fXasQDfUzpwrORpGovaryn800efci8= +buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-00000000000000-193b02425a52.2 h1:Ii/aTj24isoIZMXzMloxu2F14YCpyeK+Ea1hZ2lacK0= +buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-00000000000000-193b02425a52.2/go.mod h1:tahjbGWs++LfbilVhcqy1Z+j5DDudIFS/asULbpOK7Q= buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240627184145-202c666b5a8a.1 h1:hYCnNcMBgnEa6XLAMgGD0cZXoulA1Dmn5xi6cERVqZA= buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240627184145-202c666b5a8a.1/go.mod h1:SFzpkHZaY4sEyrJ5vSwZU6XdPo1ntBDKXtt75T26dac= +buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240627184145-202c666b5a8a.2 h1:AQF3kJYwmVTPQjKNco4rVEXuzSIGbX41uVTB+y/f6qw= +buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240627184145-202c666b5a8a.2/go.mod h1:uh6mpUnlm1fLFVIyTxoWO6ZI9tXw1NvOoVwU7GbKd0Y= +buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.0-20240627184145-202c666b5a8a.1/go.mod h1:wlbx8NZwEyHsptYNr9xVITSgvO+0b/wWIMwVglYk3fs= buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.1-20240627184145-202c666b5a8a.1/go.mod h1:lBkx3jiHbz6XM0FAkbQEmUFNifgc4x7oi9LuOK/HDbg= +buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-00000000000000-193b02425a52.2 h1:+8TaSw1/U7mXxVxCoLFVXSGGb5taFcb4ySOs3O8PiyI= +buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-00000000000000-193b02425a52.2/go.mod h1:M33M+2vbkmDV+hzuRAZKYbStTkC0/ygngsuSCVkeAsk= buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-20240627184145-202c666b5a8a.2 h1:IYFQwWxQXFovUY/kMnXWaQJ8KJ5uuLOBE0ks2II254c= buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-20240627184145-202c666b5a8a.2/go.mod h1:czHASkeeVmYV4IC0uo9qWDQ0dmEJeC6LfgYWBwSSREI= +buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-20240723183210-193b02425a52.2 h1:Y6cGjtxas4M7MpOJWo6vJ8mlUb5GJxrcqvQG69y1U6c= +buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-20240723183210-193b02425a52.2/go.mod h1:M33M+2vbkmDV+hzuRAZKYbStTkC0/ygngsuSCVkeAsk= +buf.build/gen/go/astria/primitives/grpc/go v1.3.0-20240626163506-691883836b9e.3/go.mod h1:Zpw9bPoLPVG42SwmXIVuhTJcpLDwsAlAEfcWGP5g43g= buf.build/gen/go/astria/primitives/grpc/go v1.4.0-20240626163506-691883836b9e.1/go.mod h1:VU1xcDnHOU7++vCZHJzilQGWAd4m1SWTBYKuo4qx/cg= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.0-20240626163506-691883836b9e.1/go.mod h1:t7VCP+ORGGLNXUOwi6T6h99GntTUT7bWzK6BQa/uTbA= buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.1-20240626163506-691883836b9e.1/go.mod h1:pkz/GfhAgZSnDxyZ5bmGUzk6iQNAvyW72pYPkqb7Pbk= buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240626163506-691883836b9e.2 h1:bCHvCYyvhCPWGc3tpl164ONADbH+nKPSc6KhOWb9tfk= buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240626163506-691883836b9e.2/go.mod h1:J0Tk7JAHcrhzWNEf1lbePSfFZ1Kp78eAlnO8Cs2ELKg= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240723183210-d00b2a17ea5b.2 h1:t/+xJg4+o51+athvyaAm1Y0+cUqIksGcvRPtQhQLecA= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240723183210-d00b2a17ea5b.2/go.mod h1:J0Tk7JAHcrhzWNEf1lbePSfFZ1Kp78eAlnO8Cs2ELKg= +buf.build/gen/go/astria/protocol-apis/grpc/go v1.4.0-00000000000000-71710707f61c.2 h1:vTrgoAC11YuG4mNl60LdpBrq8bvXE7wz/mZAq/mJM6o= +buf.build/gen/go/astria/protocol-apis/grpc/go v1.4.0-00000000000000-71710707f61c.2/go.mod h1:zp7gcM2FC51ms15hmqjSvl0u0dqdewRk9sbcjLLcP9M= +buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.2-00000000000000-71710707f61c.2 h1:0yrBa0INyNxxrS8F8EkDPNP9deg7C0PQqDxSYTRJqH8= +buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.2-00000000000000-71710707f61c.2/go.mod h1:qixBDfshysfHPFV2sbY/GXrQ1t9ZsWDV9FwHCak2Qfs= +buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.2-20240723183210-71710707f61c.2 h1:wo28fih7tGzPCNmlVerD6dATjdSFq4ESjBjt9n6XR5M= +buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.2-20240723183210-71710707f61c.2/go.mod h1:qixBDfshysfHPFV2sbY/GXrQ1t9ZsWDV9FwHCak2Qfs= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.3.0-20240627184145-00f432997496.3/go.mod h1:yfnROiGt3TjHXrSHhatAcpXSdzs9WBcS2536pi5lGBQ= buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.4.0-20240627184145-00f432997496.1/go.mod h1:viF0ZoRvyO5qpIZb1wB3aBBt9WWKOg5x5t6AFKKuKQU= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.0-20240627184145-00f432997496.1/go.mod h1:qct0qusz8ErM7XwIwAL1fWCIbyjOnlKGUNJwnURUhD8= buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.1-20240627184145-00f432997496.1/go.mod h1:KkZ92tBsbbl5HTuN/AbQLkW2ALXsaV5MsEU9PPy/n9c= buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240627184145-00f432997496.2 h1:s349kECGqPwCKQ1q09lqBR6782/0zDqDez+FEM5PT0s= buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240627184145-00f432997496.2/go.mod h1:NEZbII2+dhqPXaQqMYN8ziELoYQgp7hbDFv5Oc45EZU= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240723183210-414756da3320.2 h1:ENOSXmogo70t5AsSSvnOrt0iQQxwWNOA2xaJIb4OgsY= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240723183210-414756da3320.2/go.mod h1:v8vBYbyVlLKElP5ce4JYq8bCo9oNbETvnXucDghgyQ8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -2306,6 +2331,7 @@ golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= @@ -2655,6 +2681,7 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= diff --git a/grpc/execution/server.go b/grpc/execution/server.go index 15a6e58b1..773b006dc 100644 --- a/grpc/execution/server.go +++ b/grpc/execution/server.go @@ -157,10 +157,11 @@ func (s *ExecutionServiceServerV1Alpha2) GetGenesisInfo(ctx context.Context, req log.Debug("GetGenesisInfo called") getGenesisInfoRequestCount.Inc(1) - rollupId := sha256.Sum256([]byte(s.bc.Config().AstriaRollupName)) + rollupHash := sha256.Sum256([]byte(s.bc.Config().AstriaRollupName)) + rollupId := primitivev1.RollupId{Inner: rollupHash[:]} res := &astriaPb.GenesisInfo{ - RollupId: rollupId[:], + RollupId: &rollupId, SequencerGenesisBlockHeight: s.bc.Config().AstriaSequencerInitialHeight, CelestiaBlockVariance: s.bc.Config().AstriaCelestiaHeightVariance, } diff --git a/grpc/execution/server_test.go b/grpc/execution/server_test.go index 5727c3cb9..0e5caa66e 100644 --- a/grpc/execution/server_test.go +++ b/grpc/execution/server_test.go @@ -28,7 +28,7 @@ func TestExecutionService_GetGenesisInfo(t *testing.T) { hashedRollupId := sha256.Sum256([]byte(ethservice.BlockChain().Config().AstriaRollupName)) - require.True(t, bytes.Equal(genesisInfo.RollupId, hashedRollupId[:]), "RollupId is not correct") + require.True(t, bytes.Equal(genesisInfo.RollupId.Inner, hashedRollupId[:]), "RollupId is not correct") require.Equal(t, genesisInfo.GetSequencerGenesisBlockHeight(), ethservice.BlockChain().Config().AstriaSequencerInitialHeight, "SequencerInitialHeight is not correct") require.Equal(t, genesisInfo.GetCelestiaBlockVariance(), ethservice.BlockChain().Config().AstriaCelestiaHeightVariance, "CelestiaHeightVariance is not correct") require.True(t, serviceV1Alpha1.genesisInfoCalled, "GetGenesisInfo should be called") @@ -300,7 +300,7 @@ func TestExecutionServiceServerV1Alpha2_ExecuteBlock(t *testing.T) { }, Asset: bridgeAssetDenom, Amount: depositAmount, - RollupId: &primitivev1.RollupId{Inner: genesisInfo.RollupId}, + RollupId: genesisInfo.RollupId, DestinationChainAddress: chainDestinationAddress.String(), }}} @@ -393,7 +393,7 @@ func TestExecutionServiceServerV1Alpha2_ExecuteBlockAndUpdateCommitment(t *testi }, Asset: bridgeAssetDenom, Amount: depositAmount, - RollupId: &primitivev1.RollupId{Inner: genesisInfo.RollupId}, + RollupId: genesisInfo.RollupId, DestinationChainAddress: chainDestinationAddress.String(), }}}