From 2decffc053f8986e45903ab79219ba7244597e33 Mon Sep 17 00:00:00 2001 From: ethanoroshiba Date: Mon, 9 Sep 2024 14:19:11 -0500 Subject: [PATCH] Update for monorepo change --- go.mod | 4 ++-- go.sum | 4 ++++ grpc/execution/server_test.go | 8 ++++---- grpc/execution/validation.go | 8 ++++---- grpc/execution/validation_test.go | 16 ++++++++-------- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 423ce8a57..e878666b0 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240725205400-4746841755df.1 buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.1-20240725205400-4746841755df.1 buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-00000000000000-b105b5fe0803.2 - buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-b39f8a7c1a92.2 + buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-052018b21b15.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 @@ -88,7 +88,7 @@ require ( buf.build/gen/go/astria/primitives/grpc/go v1.5.1-00000000000000-b105b5fe0803.1 // indirect buf.build/gen/go/astria/protocol-apis/grpc/go v1.3.0-20240829200558-cd9207200425.3 // indirect buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.1-20240829200558-cd9207200425.1 // indirect - buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-b39f8a7c1a92.1 // indirect + buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-052018b21b15.1 // 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 40aa3897d..63e6db7a0 100644 --- a/go.sum +++ b/go.sum @@ -68,6 +68,8 @@ buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.4.0-20240627184145-00f432 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/grpc/go v1.4.0-20240723183210-414756da3320.2 h1:rhJ4gciZvp0H2IHAF72yrlDFAgy72s8l/X7cm61oVk4= buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.4.0-20240723183210-414756da3320.2/go.mod h1:bq36IyO59yTRbhgGQ4o09smhvdlX4VbWxmxsW3cZeks= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-052018b21b15.1 h1:y6pjKtmP2dBECJmtXs/7B9jIpZBihpkV+WbyrixWDHQ= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-052018b21b15.1/go.mod h1:5fNPa9zOUcbAfoEHep2OrjI8mHatAWzcctF8XzEReDs= buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-0e78da5ba4c9.1 h1:nfW9T6i2Dg3hJnlgrQG3g8W+I2WF+tLDtCTkwdPe3DQ= buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-0e78da5ba4c9.1/go.mod h1:L8S1yyeNSgkQchKxEJjdKwFNJs0rqKyjbSIztS3qmKg= buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-5ed8a932ed80.1 h1:YLShZCj89DBmsZElX8BBG/nGtZur/Trq+4gFOBFifio= @@ -82,6 +84,8 @@ buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-20240807170122-24ff5b buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-20240807170122-24ff5bcd4581.1/go.mod h1:ApPfVXzFQPCqlRfdLVR8KxIp9PN1SvfUBXhteZKX/Yk= 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-00000000000000-052018b21b15.2 h1:w3WWYikMWrA1Co3ANmpRLOxcsJ0sr2v3ECdwE78/k5Y= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-052018b21b15.2/go.mod h1:GShpCrRMWSWehIzL2nP8faSYO/x79trwjhlY+mN8dIw= buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-0e78da5ba4c9.2 h1:EAxdP6CmcWPVdmLaypadNGKnvMiawwYjxr843E5FmAk= buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-0e78da5ba4c9.2/go.mod h1:hWPoL+J3ri6/uTPKe9hHBPYV6mqYwnS3J3P1n5RTKe0= buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-5ed8a932ed80.2 h1:5pWDT2BBWoFTPCmlBciX1iaotjFCpsW9bQgBQLevnCw= diff --git a/grpc/execution/server_test.go b/grpc/execution/server_test.go index 8cdf3dd0d..f1a844fd4 100644 --- a/grpc/execution/server_test.go +++ b/grpc/execution/server_test.go @@ -302,10 +302,10 @@ func TestExecutionServiceServerV1Alpha2_ExecuteBlock(t *testing.T) { Amount: depositAmount, RollupId: genesisInfo.RollupId, DestinationChainAddress: chainDestinationAddress.String(), - IdOfSourceTransaction: &primitivev1.TransactionId{ + SourceTransactionId: &primitivev1.TransactionId{ Inner: "test_tx_hash", }, - PositionInSourceTransaction: 0, + SourceActionIndex: 0, }}} marshalledTxs = append(marshalledTxs, depositTx) @@ -399,10 +399,10 @@ func TestExecutionServiceServerV1Alpha2_ExecuteBlockAndUpdateCommitment(t *testi Amount: depositAmount, RollupId: genesisInfo.RollupId, DestinationChainAddress: chainDestinationAddress.String(), - IdOfSourceTransaction: &primitivev1.TransactionId{ + SourceTransactionId: &primitivev1.TransactionId{ Inner: "test_tx_hash", }, - PositionInSourceTransaction: 0, + SourceActionIndex: 0, }}} marshalledTxs = append(marshalledTxs, depositTx) diff --git a/grpc/execution/validation.go b/grpc/execution/validation.go index 1fa9f4213..fa2fba0f1 100644 --- a/grpc/execution/validation.go +++ b/grpc/execution/validation.go @@ -70,8 +70,8 @@ func validateAndUnmarshalSequencerTx( Gas: 16000, To: &bac.Erc20Asset.ContractAddress, Data: calldata, - IdOfSourceTransaction: *deposit.IdOfSourceTransaction, - PositionInSourceTransaction: deposit.PositionInSourceTransaction, + IdOfSourceTransaction: *deposit.SourceTransactionId, + PositionInSourceTransaction: deposit.SourceActionIndex, } tx := types.NewTx(&txdata) @@ -83,8 +83,8 @@ func validateAndUnmarshalSequencerTx( To: &recipient, Value: amount, Gas: 0, - IdOfSourceTransaction: *deposit.IdOfSourceTransaction, - PositionInSourceTransaction: deposit.PositionInSourceTransaction, + IdOfSourceTransaction: *deposit.SourceTransactionId, + PositionInSourceTransaction: deposit.SourceActionIndex, } return types.NewTx(&txdata), nil } else { diff --git a/grpc/execution/validation_test.go b/grpc/execution/validation_test.go index 488f0aeb9..b0cc3fa9a 100644 --- a/grpc/execution/validation_test.go +++ b/grpc/execution/validation_test.go @@ -127,10 +127,10 @@ func TestSequenceTxValidation(t *testing.T) { Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)), RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)}, DestinationChainAddress: chainDestinationAddress.String(), - IdOfSourceTransaction: &primitivev1.TransactionId{ + SourceTransactionId: &primitivev1.TransactionId{ Inner: "test_tx_hash", }, - PositionInSourceTransaction: 0, + SourceActionIndex: 0, }}}, wantErr: "unknown bridge address", }, @@ -144,10 +144,10 @@ func TestSequenceTxValidation(t *testing.T) { Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)), RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)}, DestinationChainAddress: chainDestinationAddress.String(), - IdOfSourceTransaction: &primitivev1.TransactionId{ + SourceTransactionId: &primitivev1.TransactionId{ Inner: "test_tx_hash", }, - PositionInSourceTransaction: 0, + SourceActionIndex: 0, }}}, wantErr: "disallowed asset", }, @@ -161,10 +161,10 @@ func TestSequenceTxValidation(t *testing.T) { Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)), RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)}, DestinationChainAddress: chainDestinationAddress.String(), - IdOfSourceTransaction: &primitivev1.TransactionId{ + SourceTransactionId: &primitivev1.TransactionId{ Inner: "test_tx_hash", }, - PositionInSourceTransaction: 0, + SourceActionIndex: 0, }}}, wantErr: "not allowed before height", }, @@ -178,10 +178,10 @@ func TestSequenceTxValidation(t *testing.T) { Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)), RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)}, DestinationChainAddress: chainDestinationAddress.String(), - IdOfSourceTransaction: &primitivev1.TransactionId{ + SourceTransactionId: &primitivev1.TransactionId{ Inner: "test_tx_hash", }, - PositionInSourceTransaction: 0, + SourceActionIndex: 0, }}}, wantErr: "", },