From 401c3d58fb2f226e4ae3f667bb7a0241d08c5445 Mon Sep 17 00:00:00 2001 From: Ethan Oroshiba Date: Wed, 11 Sep 2024 11:11:18 -0500 Subject: [PATCH] Update DepositTx for monorepo #1410 (#42) https://github.com/astriaorg/astria/pull/1410 changes the `Deposit` message in the `sequencer_block` API, necessitating changes to `DepositTx` in Geth --- core/types/deposit_tx.go | 8 +++ go.mod | 26 ++++----- go.sum | 88 +++++++++++++++++++++++++++++++ grpc/execution/server_test.go | 8 +++ grpc/execution/validation.go | 4 ++ grpc/execution/validation_test.go | 16 ++++++ 6 files changed, 138 insertions(+), 12 deletions(-) diff --git a/core/types/deposit_tx.go b/core/types/deposit_tx.go index 85cdf00a7..6b0e60ecc 100644 --- a/core/types/deposit_tx.go +++ b/core/types/deposit_tx.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rlp" + primitivev1 "buf.build/gen/go/astria/primitives/protocolbuffers/go/astria/primitive/v1" ) var _ TxData = &DepositTx{} @@ -24,6 +25,11 @@ type DepositTx struct { // if this is an ERC20 mint, the following field is set // to the `mint` function calldata. Data []byte + // the transaction ID of the source action for the deposit, consisting + // of the transaction hash. + SourceTransactionId primitivev1.TransactionId + // index of the deposit's source action within its transaction + SourceTransactionIndex uint64 } func (tx *DepositTx) copy() TxData { @@ -38,6 +44,8 @@ func (tx *DepositTx) copy() TxData { Gas: tx.Gas, To: to, Data: make([]byte, len(tx.Data)), + SourceTransactionId: tx.SourceTransactionId, + SourceTransactionIndex: tx.SourceTransactionIndex, } if tx.Value != nil { diff --git a/go.mod b/go.mod index 513828ed8..511884b2f 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.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 + 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-20240911152449-eeebd3decdce.2 + buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240911152449-b41cca615e35.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 @@ -72,21 +72,23 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 github.com/urfave/cli/v2 v2.25.7 go.uber.org/automaxprocs v1.5.2 - golang.org/x/crypto v0.22.0 + golang.org/x/crypto v0.24.0 golang.org/x/sync v0.7.0 - golang.org/x/sys v0.19.0 - golang.org/x/text v0.14.0 + golang.org/x/sys v0.21.0 + golang.org/x/text v0.16.0 golang.org/x/time v0.5.0 - golang.org/x/tools v0.20.0 - google.golang.org/grpc v1.64.0 + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d + google.golang.org/grpc v1.64.1 google.golang.org/protobuf v1.34.2 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v3 v3.0.1 ) 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 + buf.build/gen/go/astria/primitives/grpc/go v1.5.1-20240911152449-eeebd3decdce.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-20240911152449-b41cca615e35.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 @@ -151,7 +153,7 @@ require ( github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect + golang.org/x/net v0.26.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 1ae85d46e..5b424b3fc 100644 --- a/go.sum +++ b/go.sum @@ -6,36 +6,112 @@ buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240627184145-202c666b5a8 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/grpc/go v1.4.0-20240725205400-4746841755df.1 h1:7+FjHs162YpEXTcPH3vFP2IzudkIbGGXRZ95KhAKdDs= +buf.build/gen/go/astria/execution-apis/grpc/go v1.4.0-20240725205400-4746841755df.1/go.mod h1:au3Fb54TR81pjR90a3YUYVXepL3qRZ6Nk1pIyzmP5M8= +buf.build/gen/go/astria/execution-apis/grpc/go v1.5.1-00000000000000-92174628237f.1 h1:3NIFKb087434v4aU/kWOVbiFHXHzURncovppaeNXM/g= +buf.build/gen/go/astria/execution-apis/grpc/go v1.5.1-00000000000000-92174628237f.1/go.mod h1:7WHJyMVqpM4g3Wvlek+es60Ux31xravukjL5aPPPBIA= +buf.build/gen/go/astria/execution-apis/grpc/go v1.5.1-20240417015051-8a906cacf3e5.1 h1:ptYyP3KKF0SM/duwqId4982Frd5UP6Q25gu2cV0uByk= +buf.build/gen/go/astria/execution-apis/grpc/go v1.5.1-20240417015051-8a906cacf3e5.1/go.mod h1:I1I1O+mCJI+mS6fEkFNg/H8+5s0OSJggZgv+QkNUe5s= +buf.build/gen/go/astria/execution-apis/grpc/go v1.5.1-20240725205400-4746841755df.1 h1:lsL4XtjWkc9F6ybg5DVEzRjoFcyvxQBG2gjC7n3ZoWk= +buf.build/gen/go/astria/execution-apis/grpc/go v1.5.1-20240725205400-4746841755df.1/go.mod h1:ObExRCUb8BvXp07bgja+eNRXBpdfjPcvE7JvvmTJDns= 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.1-20240725205400-4746841755df.1 h1:ScB4WN/7wIpWSA9l0HnyJUE6oe1nLKM9b+wMYWv385k= +buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.1-20240725205400-4746841755df.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-00000000000000-92174628237f.2 h1:5Qds9q0sNX+ECyhbsCM64RNGniSJDbou21EE6QRSy+c= +buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-00000000000000-92174628237f.2/go.mod h1:UJm+OkePRvtYwgonZxftAGlmGoWFS3TwwcE86fmhf14= +buf.build/gen/go/astria/execution-apis/protocolbuffers/go v1.34.2-20240417015051-8a906cacf3e5.2/go.mod h1:PMEAM2v9QrEZapsKfreZHrRle1Epc+LyuuUht6k0Fs4= 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/execution-apis/protocolbuffers/go v1.34.2-20240725205400-4746841755df.2/go.mod h1:czHASkeeVmYV4IC0uo9qWDQ0dmEJeC6LfgYWBwSSREI= 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/grpc/go v1.5.1-00000000000000-95afab344299.1 h1:pfJcUCbRQ3Vew2S04KHxS6urKssxGjFKlCrEHHY7/hs= +buf.build/gen/go/astria/primitives/grpc/go v1.5.1-00000000000000-95afab344299.1/go.mod h1:SJsj5KkqWsVk8nF9XWYj+skkeNTxUOMcTR5Z32w2TgA= +buf.build/gen/go/astria/primitives/grpc/go v1.5.1-00000000000000-b105b5fe0803.1 h1:9Ga/YGLXyl0DQC3KrKWOLR8WA0WgzqTKGng8dBQ8CAE= +buf.build/gen/go/astria/primitives/grpc/go v1.5.1-00000000000000-b105b5fe0803.1/go.mod h1:iamgVerSpFctn7q6S8mdm54yxkYG1W5Od48ihc6519s= +buf.build/gen/go/astria/primitives/grpc/go v1.5.1-00000000000000-db0e73b29c7f.1 h1:+NbPonw5ICjKaow0yQOLra3jy1S7ZUK+X4MfeJh515A= +buf.build/gen/go/astria/primitives/grpc/go v1.5.1-00000000000000-db0e73b29c7f.1/go.mod h1:ZTYPOLCiM62QTy3oTgz01wSEqvPwrYP/oxyPxQG/kCg= +buf.build/gen/go/astria/primitives/grpc/go v1.5.1-20240911152449-eeebd3decdce.1 h1:ZiLzQ8srBv2MJ10nnMTaHw4NWrZC5IabzdMwVNWEnWE= +buf.build/gen/go/astria/primitives/grpc/go v1.5.1-20240911152449-eeebd3decdce.1/go.mod h1:2IveAnXTwgzjkbn4isMfGZCYKtJVLMMcgNdoXP1xnIA= 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-00000000000000-95afab344299.2 h1:etNu8kh06S4WpBmY5rDSEXKMsfx8N/rAuBb2sgkwwBw= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-00000000000000-95afab344299.2/go.mod h1:J0Tk7JAHcrhzWNEf1lbePSfFZ1Kp78eAlnO8Cs2ELKg= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-00000000000000-b105b5fe0803.2 h1:enGRlkhm7yT6L91T9j6wa92RVDObggNd8p9uAvqC4B8= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-00000000000000-b105b5fe0803.2/go.mod h1:J0Tk7JAHcrhzWNEf1lbePSfFZ1Kp78eAlnO8Cs2ELKg= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-00000000000000-db0e73b29c7f.2 h1:YsiJertVzAHOP7Go9lFBWkVy6DtkuRuhPq1SvPiCIio= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-00000000000000-db0e73b29c7f.2/go.mod h1:J0Tk7JAHcrhzWNEf1lbePSfFZ1Kp78eAlnO8Cs2ELKg= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-00000000000000-ec254ec7b009.2 h1:siFkJO0tCPeMEJ0B3hvJfbml1ReeLbIhPrTrmhZlhEA= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-00000000000000-ec254ec7b009.2/go.mod h1:J0Tk7JAHcrhzWNEf1lbePSfFZ1Kp78eAlnO8Cs2ELKg= 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/primitives/protocolbuffers/go v1.34.2-20240807170122-b074164339d1.2 h1:NAgPX0n2M6R16efrxG9U+M128cl0jwIQl+bV3lQH3qg= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240807170122-b074164339d1.2/go.mod h1:J0Tk7JAHcrhzWNEf1lbePSfFZ1Kp78eAlnO8Cs2ELKg= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240911152449-eeebd3decdce.2 h1:/0WgnbNMJ+M5bs1vHE52VMz7SfmNVjxOXkNbCAnguMc= +buf.build/gen/go/astria/primitives/protocolbuffers/go v1.34.2-20240911152449-eeebd3decdce.2/go.mod h1:J0Tk7JAHcrhzWNEf1lbePSfFZ1Kp78eAlnO8Cs2ELKg= +buf.build/gen/go/astria/protocol-apis/grpc/go v1.3.0-20240829200558-cd9207200425.3 h1:VbMUyPDeqHfWaa/djP0KJxkLz+SOXWv+QVPIHOnNLUQ= +buf.build/gen/go/astria/protocol-apis/grpc/go v1.3.0-20240829200558-cd9207200425.3/go.mod h1:w56Mnyd54A4GJVVxOcfSeLmZUmexC72RnKbGvbJEGvs= 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.0-20240829200558-cd9207200425.1/go.mod h1:qW3r+DKoZmDOHSoh6OhaJ3UlWBDIyiy+xDx2dpPAoa8= +buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.1-20240829200558-cd9207200425.1 h1:lJKQjijS4D+fwlWH+lsjAnf95MVTGADBN808pRDeegM= +buf.build/gen/go/astria/protocol-apis/protocolbuffers/go v1.34.1-20240829200558-cd9207200425.1/go.mod h1:D5IXPo9rrnLdjo7SKTJqfZNKA/2WvsNDVZuMpGmGTRk= 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 h1:qChFBpCSQxZPnGo/3VMTu8+mcmoKY+Xbvu6/qZFHp+4= 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= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-5ed8a932ed80.1/go.mod h1:GTv4t0VFBJ9FEVQDpSpNqIAo0rTZo57Ecw2cQ3T4iZU= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-a6f6bbf304ca.1 h1:dgEuhdEy3Qo9wQEeUExzCDyB6ZO+3HcEGzDYD1W4b8E= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-a6f6bbf304ca.1/go.mod h1:VIUjhfl0w0RnSsPVoO8vignWRPiPH3NIr51g7B4pqp8= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-b39f8a7c1a92.1 h1:g+tYbw/eDbgL3KEn8oPpIQKJn77g6IUF8064yDS8vbY= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-b39f8a7c1a92.1/go.mod h1:FC41mHxht01sxlgxImkQdXZf9yNbXYP0O0OfTg2BsKA= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-ec1676595dd2.1 h1:uf6qxCPp7q4RSBCQmEkTe55HEKHLtx3FTHUQAG9+z3k= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-00000000000000-ec1676595dd2.1/go.mod h1:RB1o4+Veyce+gckigsXSc/dwSRaXRf4nhzzy9bQv9j4= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-20240807170122-24ff5bcd4581.1 h1:gFiTuuZgOiBEFSERzlNQln449uuJq1GiWdVgHKofDOs= +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/grpc/go v1.5.1-20240911152449-b41cca615e35.1 h1:165RZvdckRHSsTUKrfDF7kTA/TP92Zq/AyfmLHyo88Q= +buf.build/gen/go/astria/sequencerblock-apis/grpc/go v1.5.1-20240911152449-b41cca615e35.1/go.mod h1:4KRw1FwmqZ+RMGXnDST/wsxBBHCJTxfZjwG/tndGtng= 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= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-5ed8a932ed80.2/go.mod h1:4fewEWi70NyYAv2OELu1WOKk0n5s8laCE2ZALsR5Ctc= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-a6f6bbf304ca.2 h1:geaqVAphV3wVtgmFf+Ppsy0EizLHJtOonvZoD3d5fjw= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-a6f6bbf304ca.2/go.mod h1:mwuwdZiuatE+MkpYsAfs1gMCP+IEtaICxc8Vwh4Czvk= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-b39f8a7c1a92.2 h1:LHu7jg+bXzXnlR/O3V5cbx58UxIGsSq/eujKGL/Emmw= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-b39f8a7c1a92.2/go.mod h1:GShpCrRMWSWehIzL2nP8faSYO/x79trwjhlY+mN8dIw= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-ec1676595dd2.2 h1:NKGcAOXgcVb0uDD6a2rCaYA6nzC8Cn5QoHtjQu/BP3Q= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-00000000000000-ec1676595dd2.2/go.mod h1:6gWyYjLoaDoITt8RAX8J5Qpl09FBQ2/5jk8MvmQN20A= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240417185647-2fe36ce30e97.2 h1:RJbOnfI2HjllleFXrIUG9HmLgzBNcPalBau5xfwpC40= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240417185647-2fe36ce30e97.2/go.mod h1:Aj5x3eczcALbH0sFufFZZ6K/p5ozdBbi+sIzNNFxFzg= 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= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240807170122-24ff5bcd4581.2 h1:6Gt46eV9JveAVi8caJA8iYZUgfzjie8N7rpv3HN6LXg= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240807170122-24ff5bcd4581.2/go.mod h1:SB8o8Y631Su8YhDbekqpRn7Y3flTuKP2CdqcmKMBwy0= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240911152449-b41cca615e35.2 h1:P+iFMK1OEyF0+WODaagYlKay1WYMx84BZXrfSMIBsdo= +buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go v1.34.2-20240911152449-b41cca615e35.2/go.mod h1:exLKaI+iuqlYJOUrFB8Q6BaQ7cNEDUYwncMpS9sXC2Y= 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= @@ -1905,6 +1981,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2043,6 +2121,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2210,6 +2290,8 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2249,6 +2331,8 @@ golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2328,6 +2412,8 @@ golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 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= @@ -2662,6 +2748,8 @@ google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9Y google.golang.org/grpc v1.61.2/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= +google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/grpc/execution/server_test.go b/grpc/execution/server_test.go index 0e5caa66e..f1a844fd4 100644 --- a/grpc/execution/server_test.go +++ b/grpc/execution/server_test.go @@ -302,6 +302,10 @@ func TestExecutionServiceServerV1Alpha2_ExecuteBlock(t *testing.T) { Amount: depositAmount, RollupId: genesisInfo.RollupId, DestinationChainAddress: chainDestinationAddress.String(), + SourceTransactionId: &primitivev1.TransactionId{ + Inner: "test_tx_hash", + }, + SourceActionIndex: 0, }}} marshalledTxs = append(marshalledTxs, depositTx) @@ -395,6 +399,10 @@ func TestExecutionServiceServerV1Alpha2_ExecuteBlockAndUpdateCommitment(t *testi Amount: depositAmount, RollupId: genesisInfo.RollupId, DestinationChainAddress: chainDestinationAddress.String(), + SourceTransactionId: &primitivev1.TransactionId{ + Inner: "test_tx_hash", + }, + SourceActionIndex: 0, }}} marshalledTxs = append(marshalledTxs, depositTx) diff --git a/grpc/execution/validation.go b/grpc/execution/validation.go index 97dd426c2..3887abe2b 100644 --- a/grpc/execution/validation.go +++ b/grpc/execution/validation.go @@ -71,6 +71,8 @@ func validateAndUnmarshalSequencerTx( Gas: 16000, To: &bac.Erc20Asset.ContractAddress, Data: calldata, + SourceTransactionId: *deposit.SourceTransactionId, + SourceTransactionIndex: deposit.SourceActionIndex, } tx := types.NewTx(&txdata) @@ -82,6 +84,8 @@ func validateAndUnmarshalSequencerTx( To: &recipient, Value: amount, Gas: 0, + SourceTransactionId: *deposit.SourceTransactionId, + SourceTransactionIndex: deposit.SourceActionIndex, } return types.NewTx(&txdata), nil } else { diff --git a/grpc/execution/validation_test.go b/grpc/execution/validation_test.go index b715041b4..b0cc3fa9a 100644 --- a/grpc/execution/validation_test.go +++ b/grpc/execution/validation_test.go @@ -127,6 +127,10 @@ func TestSequenceTxValidation(t *testing.T) { Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)), RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)}, DestinationChainAddress: chainDestinationAddress.String(), + SourceTransactionId: &primitivev1.TransactionId{ + Inner: "test_tx_hash", + }, + SourceActionIndex: 0, }}}, wantErr: "unknown bridge address", }, @@ -140,6 +144,10 @@ func TestSequenceTxValidation(t *testing.T) { Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)), RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)}, DestinationChainAddress: chainDestinationAddress.String(), + SourceTransactionId: &primitivev1.TransactionId{ + Inner: "test_tx_hash", + }, + SourceActionIndex: 0, }}}, wantErr: "disallowed asset", }, @@ -153,6 +161,10 @@ func TestSequenceTxValidation(t *testing.T) { Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)), RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)}, DestinationChainAddress: chainDestinationAddress.String(), + SourceTransactionId: &primitivev1.TransactionId{ + Inner: "test_tx_hash", + }, + SourceActionIndex: 0, }}}, wantErr: "not allowed before height", }, @@ -166,6 +178,10 @@ func TestSequenceTxValidation(t *testing.T) { Amount: bigIntToProtoU128(big.NewInt(1000000000000000000)), RollupId: &primitivev1.RollupId{Inner: make([]byte, 0)}, DestinationChainAddress: chainDestinationAddress.String(), + SourceTransactionId: &primitivev1.TransactionId{ + Inner: "test_tx_hash", + }, + SourceActionIndex: 0, }}}, wantErr: "", },