From bc512f112dc1e41f3909658482fe0f4d95c604b4 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 10:01:38 +0700 Subject: [PATCH 01/34] Add l2 gas price --- core/block.go | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/core/block.go b/core/block.go index 1be9e5a95c..ec102af0bb 100644 --- a/core/block.go +++ b/core/block.go @@ -34,12 +34,16 @@ type Header struct { ProtocolVersion string // Bloom filter on the events emitted this block EventsBloom *bloom.BloomFilter - // Amount of WEI charged per Gas spent - GasPrice *felt.Felt + // Amount of WEI charged per Gas spent on L1 + L1GasPriceETH *felt.Felt + // Amount of STRK charged per Gas spent on L2 + L2GasPriceETH *felt.Felt // Sequencer signatures Signatures [][]*felt.Felt - // Amount of STRK charged per Gas spent - GasPriceSTRK *felt.Felt + // Amount of STRK charged per Gas spent on L1 + L1GasPriceSTRK *felt.Felt + // Amount of STRK charged per Gas spent on L2 + L2GasPriceSTRK *felt.Felt // The mode of the L1 data availability L1DAMode L1DAMode // The gas price for L1 data availability @@ -221,8 +225,8 @@ func post0134Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments pricesHash := gasPricesHash( GasPrice{ - PriceInFri: b.GasPriceSTRK, - PriceInWei: b.GasPrice, + PriceInFri: b.L1GasPriceSTRK, + PriceInWei: b.L1GasPriceETH, }, *b.L1DataGasPrice, *b.L2GasPrice, @@ -290,18 +294,18 @@ func Post0132Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments // `crypto.PoseidonArray` panics if any of the values are nil seqAddr := &felt.Zero gasPriceStrk := &felt.Zero - l1DataGasPricrInWei := &felt.Zero + l1DataGasPriceInWei := &felt.Zero l1DataGasPriceInFri := &felt.Zero if b.SequencerAddress != nil { seqAddr = b.SequencerAddress } - if b.GasPriceSTRK != nil { - gasPriceStrk = b.GasPriceSTRK + if b.L1GasPriceSTRK != nil { + gasPriceStrk = b.L1GasPriceSTRK } if b.L1DataGasPrice != nil { if b.L1DataGasPrice.PriceInWei != nil { - l1DataGasPricrInWei = b.L1DataGasPrice.PriceInWei + l1DataGasPriceInWei = b.L1DataGasPrice.PriceInWei } if b.L1DataGasPrice.PriceInFri != nil { l1DataGasPriceInFri = b.L1DataGasPrice.PriceInFri @@ -316,12 +320,12 @@ func Post0132Hash(b *Block, stateDiff *StateDiff) (*felt.Felt, *BlockCommitments new(felt.Felt).SetUint64(b.Timestamp), // block timestamp concatCounts, sdCommitment, - txCommitment, // transaction commitment - eCommitment, // event commitment - rCommitment, // receipt commitment - b.GasPrice, // gas price in wei - gasPriceStrk, // gas price in fri - l1DataGasPricrInWei, + txCommitment, // transaction commitment + eCommitment, // event commitment + rCommitment, // receipt commitment + b.L1GasPriceETH, // gas price in wei + gasPriceStrk, // gas price in fri + l1DataGasPriceInWei, l1DataGasPriceInFri, new(felt.Felt).SetBytes([]byte(b.ProtocolVersion)), &felt.Zero, // reserved: extra data From 025e45ada427705bb06a186c4e75606f571c9a9e Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 10:02:43 +0700 Subject: [PATCH 02/34] Add l2 gas price --- rpc/block.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rpc/block.go b/rpc/block.go index 302ccdac42..8b98238a10 100644 --- a/rpc/block.go +++ b/rpc/block.go @@ -107,6 +107,7 @@ type BlockHeader struct { Timestamp uint64 `json:"timestamp"` SequencerAddress *felt.Felt `json:"sequencer_address,omitempty"` L1GasPrice *ResourcePrice `json:"l1_gas_price"` + L2GasPrice *ResourcePrice `json:"l2_gas_price"` L1DataGasPrice *ResourcePrice `json:"l1_data_gas_price,omitempty"` L1DAMode *L1DAMode `json:"l1_da_mode,omitempty"` StarknetVersion string `json:"starknet_version"` @@ -326,8 +327,12 @@ func adaptBlockHeader(header *core.Header) BlockHeader { Timestamp: header.Timestamp, SequencerAddress: sequencerAddress, L1GasPrice: &ResourcePrice{ - InWei: header.GasPrice, - InFri: nilToZero(header.GasPriceSTRK), // Old block headers will be nil. + InWei: header.L1GasPriceETH, + InFri: nilToZero(header.L1GasPriceSTRK), + }, + L2GasPrice: &ResourcePrice{ + InFri: nilToZero(header.L2GasPriceSTRK), + InWei: nilToZero(header.L2GasPriceETH), }, L1DataGasPrice: &l1DataGasPrice, L1DAMode: &l1DAMode, From a1d978c56362845db0bcf51b433a619f0b5de069 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 10:04:34 +0700 Subject: [PATCH 03/34] Fix adapters after l2 gas price addition --- adapters/core2p2p/block.go | 4 ++-- adapters/p2p2core/block.go | 8 +++++--- adapters/sn2core/sn2core.go | 6 ++++-- adapters/sn2core/sn2core_test.go | 6 ++++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/adapters/core2p2p/block.go b/adapters/core2p2p/block.go index 6c503165af..6b48044b43 100644 --- a/adapters/core2p2p/block.go +++ b/adapters/core2p2p/block.go @@ -47,13 +47,13 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, }, Receipts: AdaptHash(commitments.ReceiptCommitment), ProtocolVersion: header.ProtocolVersion, - GasPriceFri: AdaptUint128(header.GasPriceSTRK), + GasPriceFri: AdaptUint128(header.L1GasPriceSTRK), Signatures: utils.Map(header.Signatures, adaptSignature), StateDiffCommitment: &gen.StateDiffCommitment{ StateDiffLength: stateDiffLength, Root: AdaptHash(stateDiffCommitment), }, - GasPriceWei: AdaptUint128(header.GasPrice), + GasPriceWei: AdaptUint128(header.L1GasPriceETH), DataGasPriceFri: AdaptUint128(header.L1DataGasPrice.PriceInFri), DataGasPriceWei: AdaptUint128(header.L1DataGasPrice.PriceInWei), L1DataAvailabilityMode: adaptL1DA(header.L1DAMode), diff --git a/adapters/p2p2core/block.go b/adapters/p2p2core/block.go index 5096fe3bbb..5f1e596a3a 100644 --- a/adapters/p2p2core/block.go +++ b/adapters/p2p2core/block.go @@ -34,15 +34,17 @@ func AdaptBlockHeader(h *gen.SignedBlockHeader, eventsBloom *bloom.BloomFilter) Timestamp: h.Time, ProtocolVersion: h.ProtocolVersion, EventsBloom: eventsBloom, + L1GasPriceETH: AdaptUint128(h.GasPriceWei), + L2GasPriceETH: &felt.Zero, // TODO: Fix when we have l2 gas price Signatures: utils.Map(h.Signatures, adaptSignature), + L1GasPriceSTRK: AdaptUint128(h.GasPriceFri), + L2GasPriceSTRK: &felt.Zero, // TODO: Fix when we have l2 gas price L1DAMode: adaptDA(h.L1DataAvailabilityMode), L1DataGasPrice: &core.GasPrice{ PriceInWei: AdaptUint128(h.DataGasPriceWei), PriceInFri: AdaptUint128(h.DataGasPriceFri), }, - GasPrice: AdaptUint128(h.GasPriceWei), - GasPriceSTRK: AdaptUint128(h.GasPriceFri), - L2GasPrice: nil, // todo pass correct value once it's in the p2p spec + L2GasPrice: nil, // todo pass correct value once it's in the p2p spec } } diff --git a/adapters/sn2core/sn2core.go b/adapters/sn2core/sn2core.go index cb8c622c83..f3c4b7e405 100644 --- a/adapters/sn2core/sn2core.go +++ b/adapters/sn2core/sn2core.go @@ -50,8 +50,10 @@ func AdaptBlock(response *starknet.Block, sig *starknet.Signature) (*core.Block, TransactionCount: uint64(len(response.Transactions)), EventCount: eventCount, EventsBloom: core.EventsBloom(receipts), - GasPrice: response.GasPriceETH(), - GasPriceSTRK: response.GasPriceSTRK(), + L1GasPriceETH: response.L1GasPriceETH(), + L2GasPriceETH: response.L2GasPriceETH(), + L1GasPriceSTRK: response.L1GasPriceSTRK(), + L2GasPriceSTRK: response.L2GasPriceSTRK(), L1DAMode: core.L1DAMode(response.L1DAMode), L1DataGasPrice: (*core.GasPrice)(response.L1DataGasPrice), L2GasPrice: (*core.GasPrice)(response.L2GasPrice), diff --git a/adapters/sn2core/sn2core_test.go b/adapters/sn2core/sn2core_test.go index c9d7b618aa..d86340e1a3 100644 --- a/adapters/sn2core/sn2core_test.go +++ b/adapters/sn2core/sn2core_test.go @@ -120,8 +120,10 @@ func TestAdaptBlock(t *testing.T) { assert.Empty(t, block.Signatures) } - assert.Equal(t, test.gasPriceSTRK, block.GasPriceSTRK) - assert.Equal(t, test.gasPriceWEI, block.GasPrice) + assert.Equal(t, test.gasPriceSTRK, block.L1GasPriceSTRK) + assert.Equal(t, test.gasPriceWEI, block.L1GasPriceETH) + assert.Equal(t, &felt.Zero, block.L2GasPriceSTRK) + assert.Equal(t, &felt.Zero, block.L2GasPriceETH) if test.l1DAGasPriceFRI != nil { assert.Equal(t, test.l1DAGasPriceFRI, block.L1DataGasPrice.PriceInFri) } From 8ea84a1e86208f7874eb6b001b5a79d89afd34be Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 10:06:25 +0700 Subject: [PATCH 04/34] Add new FeeEstimate structure, update methods --- rpc/estimate_fee.go | 51 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/rpc/estimate_fee.go b/rpc/estimate_fee.go index 3af789c4f3..e76746bf7c 100644 --- a/rpc/estimate_fee.go +++ b/rpc/estimate_fee.go @@ -28,7 +28,7 @@ func (u FeeUnit) MarshalText() ([]byte, error) { } } -type FeeEstimate struct { +type FeeEstimateV0_7 struct { GasConsumed *felt.Felt `json:"gas_consumed"` GasPrice *felt.Felt `json:"gas_price"` DataGasConsumed *felt.Felt `json:"data_gas_consumed"` @@ -37,10 +37,41 @@ type FeeEstimate struct { Unit *FeeUnit `json:"unit,omitempty"` } +type FeeEstimate struct { + L1GasConsumed *felt.Felt `json:"l1_gas_consumed,omitempty"` + L1GasPrice *felt.Felt `json:"l1_gas_price,omitempty"` + L2GasConsumed *felt.Felt `json:"l2_gas_consumed,omitempty"` + L2GasPrice *felt.Felt `json:"l2_gas_price,omitempty"` + L1DataGasConsumed *felt.Felt `json:"l1_data_gas_consumed,omitempty"` + L1DataGasPrice *felt.Felt `json:"l1_data_gas_price,omitempty"` + OverallFee *felt.Felt `json:"overall_fee"` + Unit *FeeUnit `json:"unit,omitempty"` +} + /**************************************************** Estimate Fee Handlers *****************************************************/ +func (h *Handler) EstimateFeeV0_7(broadcastedTxns []BroadcastedTransaction, + simulationFlags []SimulationFlag, id BlockID, +) ([]FeeEstimateV0_7, http.Header, *jsonrpc.Error) { + result, httpHeader, err := h.simulateTransactions(id, broadcastedTxns, append(simulationFlags, SkipFeeChargeFlag), true) + if err != nil { + return nil, httpHeader, err + } + + return utils.Map(result, func(tx SimulatedTransaction) FeeEstimateV0_7 { + return FeeEstimateV0_7{ + GasConsumed: tx.FeeEstimation.L1GasConsumed, + GasPrice: tx.FeeEstimation.L1GasPrice, + DataGasConsumed: tx.FeeEstimation.L1DataGasConsumed, + DataGasPrice: tx.FeeEstimation.L1DataGasPrice, + OverallFee: tx.FeeEstimation.OverallFee, + Unit: tx.FeeEstimation.Unit, + } + }), httpHeader, nil +} + func (h *Handler) EstimateFee(broadcastedTxns []BroadcastedTransaction, simulationFlags []SimulationFlag, id BlockID, ) ([]FeeEstimate, http.Header, *jsonrpc.Error) { @@ -54,18 +85,22 @@ func (h *Handler) EstimateFee(broadcastedTxns []BroadcastedTransaction, }), httpHeader, nil } -func (h *Handler) EstimateMessageFee(msg MsgFromL1, id BlockID) (*FeeEstimate, http.Header, *jsonrpc.Error) { //nolint:gocritic - return h.estimateMessageFee(msg, id, h.EstimateFee) +//nolint:gocritic +func (h *Handler) EstimateMessageFeeV0_7(msg MsgFromL1, id BlockID) (*FeeEstimateV0_7, http.Header, *jsonrpc.Error) { + return estimateMessageFee(msg, id, h.EstimateFeeV0_7) +} + +//nolint:gocritic +func (h *Handler) EstimateMessageFee(msg MsgFromL1, id BlockID) (*FeeEstimate, http.Header, *jsonrpc.Error) { + return estimateMessageFee(msg, id, h.EstimateFee) } -type estimateFeeHandler func(broadcastedTxns []BroadcastedTransaction, +type estimateFeeHandler[T any] func(broadcastedTxns []BroadcastedTransaction, simulationFlags []SimulationFlag, id BlockID, -) ([]FeeEstimate, http.Header, *jsonrpc.Error) +) ([]T, http.Header, *jsonrpc.Error) //nolint:gocritic -func (h *Handler) estimateMessageFee(msg MsgFromL1, id BlockID, f estimateFeeHandler) (*FeeEstimate, - http.Header, *jsonrpc.Error, -) { +func estimateMessageFee[T any](msg MsgFromL1, id BlockID, f estimateFeeHandler[T]) (*T, http.Header, *jsonrpc.Error) { calldata := make([]*felt.Felt, 0, len(msg.Payload)+1) // The order of the calldata parameters matters. msg.From must be prepended. calldata = append(calldata, new(felt.Felt).SetBytes(msg.From.Bytes())) From 3278ba85ea54097c3329b6e2a512733c31d61e7c Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 10:07:57 +0700 Subject: [PATCH 05/34] Add new FeeEstimate structure, update methods --- rpc/block_test.go | 6 +++++ rpc/estimate_fee_test.go | 24 +++++++++++++++--- rpc/handlers.go | 2 +- rpc/handlers_test.go | 2 +- rpc/helpers.go | 4 +++ rpc/simulation.go | 55 ++++++++++++++++++++-------------------- rpc/trace_test.go | 8 +++--- rpc/transaction.go | 5 ++++ rpc/transaction_test.go | 21 +++++++++++++++ 9 files changed, 91 insertions(+), 36 deletions(-) diff --git a/rpc/block_test.go b/rpc/block_test.go index 61f1aa8d52..5a89f07c0a 100644 --- a/rpc/block_test.go +++ b/rpc/block_test.go @@ -534,6 +534,10 @@ func TestBlockWithTxHashesV013(t *testing.T) { InFri: utils.HexToFelt(t, "0x17882b6aa74"), InWei: utils.HexToFelt(t, "0x3b9aca10"), }, + L2GasPrice: &rpc.ResourcePrice{ + InFri: &felt.Zero, + InWei: &felt.Zero, + }, L1DataGasPrice: &rpc.ResourcePrice{ InFri: utils.HexToFelt(t, "0x2cc6d7f596e1"), InWei: utils.HexToFelt(t, "0x716a8f6dd"), @@ -643,6 +647,7 @@ func TestBlockWithReceipts(t *testing.T) { Timestamp: header.Timestamp, SequencerAddress: header.SequencerAddress, L1GasPrice: header.L1GasPrice, + L2GasPrice: header.L2GasPrice, L1DataGasPrice: header.L1DataGasPrice, L1DAMode: header.L1DAMode, StarknetVersion: header.StarknetVersion, @@ -689,6 +694,7 @@ func TestBlockWithReceipts(t *testing.T) { SequencerAddress: header.SequencerAddress, L1DAMode: header.L1DAMode, L1GasPrice: header.L1GasPrice, + L2GasPrice: header.L2GasPrice, L1DataGasPrice: header.L1DataGasPrice, StarknetVersion: header.StarknetVersion, }, diff --git a/rpc/estimate_fee_test.go b/rpc/estimate_fee_test.go index 7612572073..c1ade1b8cf 100644 --- a/rpc/estimate_fee_test.go +++ b/rpc/estimate_fee_test.go @@ -36,20 +36,30 @@ func TestEstimateFee(t *testing.T) { blockInfo := vm.BlockInfo{Header: &core.Header{}} t.Run("ok with zero values", func(t *testing.T) { mockVM.EXPECT().Execute([]core.Transaction{}, nil, []*felt.Felt{}, &blockInfo, mockState, n, true, false, true). - Return([]*felt.Felt{}, []core.GasConsumed{}, []vm.TransactionTrace{}, uint64(123), nil) + Return([]*felt.Felt{}, []core.GasConsumed{}, []vm.TransactionTrace{}, uint64(123), nil).Times(2) _, httpHeader, err := handler.EstimateFee([]rpc.BroadcastedTransaction{}, []rpc.SimulationFlag{}, rpc.BlockID{Latest: true}) require.Nil(t, err) assert.Equal(t, httpHeader.Get(rpc.ExecutionStepsHeader), "123") + + // TODO: Remove this when v0.7 is removed + _, httpHeader, err = handler.EstimateFeeV0_7([]rpc.BroadcastedTransaction{}, []rpc.SimulationFlag{}, rpc.BlockID{Latest: true}) + require.Nil(t, err) + assert.Equal(t, httpHeader.Get(rpc.ExecutionStepsHeader), "123") }) t.Run("ok with zero values, skip validate", func(t *testing.T) { mockVM.EXPECT().Execute([]core.Transaction{}, nil, []*felt.Felt{}, &blockInfo, mockState, n, true, true, true). - Return([]*felt.Felt{}, []core.GasConsumed{}, []vm.TransactionTrace{}, uint64(123), nil) + Return([]*felt.Felt{}, []core.GasConsumed{}, []vm.TransactionTrace{}, uint64(123), nil).Times(2) _, httpHeader, err := handler.EstimateFee([]rpc.BroadcastedTransaction{}, []rpc.SimulationFlag{rpc.SkipValidateFlag}, rpc.BlockID{Latest: true}) require.Nil(t, err) assert.Equal(t, httpHeader.Get(rpc.ExecutionStepsHeader), "123") + + // TODO: Remove this when v0.7 is removed + _, httpHeader, err = handler.EstimateFeeV0_7([]rpc.BroadcastedTransaction{}, []rpc.SimulationFlag{rpc.SkipValidateFlag}, rpc.BlockID{Latest: true}) + require.Nil(t, err) + assert.Equal(t, httpHeader.Get(rpc.ExecutionStepsHeader), "123") }) t.Run("transaction execution error", func(t *testing.T) { @@ -57,7 +67,7 @@ func TestEstimateFee(t *testing.T) { Return(nil, nil, nil, uint64(0), vm.TransactionExecutionError{ Index: 44, Cause: errors.New("oops"), - }) + }).Times(2) _, httpHeader, err := handler.EstimateFee([]rpc.BroadcastedTransaction{}, []rpc.SimulationFlag{rpc.SkipValidateFlag}, rpc.BlockID{Latest: true}) require.Equal(t, rpc.ErrTransactionExecutionError.CloneWithData(rpc.TransactionExecutionErrorData{ @@ -65,6 +75,14 @@ func TestEstimateFee(t *testing.T) { ExecutionError: "oops", }), err) require.Equal(t, httpHeader.Get(rpc.ExecutionStepsHeader), "0") + + // TODO: Remove this when v0.7 is removed + _, httpHeader, err = handler.EstimateFeeV0_7([]rpc.BroadcastedTransaction{}, []rpc.SimulationFlag{rpc.SkipValidateFlag}, rpc.BlockID{Latest: true}) + require.Equal(t, rpc.ErrTransactionExecutionError.CloneWithData(rpc.TransactionExecutionErrorData{ + TransactionIndex: 44, + ExecutionError: "oops", + }), err) + require.Equal(t, httpHeader.Get(rpc.ExecutionStepsHeader), "0") }) t.Run("transaction with invalid contract class", func(t *testing.T) { diff --git a/rpc/handlers.go b/rpc/handlers.go index 4c9fcb3588..e0110547d6 100644 --- a/rpc/handlers.go +++ b/rpc/handlers.go @@ -511,7 +511,7 @@ func (h *Handler) MethodsV0_7() ([]jsonrpc.Method, string) { //nolint: funlen { Name: "starknet_estimateFee", Params: []jsonrpc.Parameter{{Name: "request"}, {Name: "simulation_flags"}, {Name: "block_id"}}, - Handler: h.EstimateFee, + Handler: h.EstimateFeeV0_7, }, { Name: "starknet_estimateMessageFee", diff --git a/rpc/handlers_test.go b/rpc/handlers_test.go index 8e86da7085..433845f7c1 100644 --- a/rpc/handlers_test.go +++ b/rpc/handlers_test.go @@ -72,7 +72,7 @@ func TestThrottledVMError(t *testing.T) { // hash is not set because it's pending block ParentHash: utils.HexToFelt(t, "0x0C3"), Number: 0, - GasPrice: utils.HexToFelt(t, "0x777"), + L1GasPriceETH: utils.HexToFelt(t, "0x777"), ProtocolVersion: "99.12.3", } l1Tx := &core.L1HandlerTransaction{ diff --git a/rpc/helpers.go b/rpc/helpers.go index ef708dccfc..10f8770274 100644 --- a/rpc/helpers.go +++ b/rpc/helpers.go @@ -113,12 +113,16 @@ func adaptExecutionResources(resources *core.ExecutionResources) *ExecutionResou DataAvailability: &DataAvailability{}, } if resources.DataAvailability != nil { + res.L1Gas = resources.DataAvailability.L1Gas + res.L1DataGas = resources.DataAvailability.L1DataGas res.DataAvailability = &DataAvailability{ L1Gas: resources.DataAvailability.L1Gas, L1DataGas: resources.DataAvailability.L1DataGas, } } + res.L2Gas = 0 // TODO: Use L2Gas when available + return res } diff --git a/rpc/simulation.go b/rpc/simulation.go index 3dda777ed9..29e6893180 100644 --- a/rpc/simulation.go +++ b/rpc/simulation.go @@ -56,7 +56,7 @@ func (h *Handler) SimulateTransactions(id BlockID, transactions []BroadcastedTra return h.simulateTransactions(id, transactions, simulationFlags, false) } -//nolint:funlen,gocyclo +//nolint:funlen func (h *Handler) simulateTransactions(id BlockID, transactions []BroadcastedTransaction, simulationFlags []SimulationFlag, errOnRevert bool, ) ([]SimulatedTransaction, http.Header, *jsonrpc.Error) { @@ -125,36 +125,37 @@ func (h *Handler) simulateTransactions(id BlockID, transactions []BroadcastedTra for i, overallFee := range overallFees { feeUnit := feeUnit(txns[i]) - gasPrice := header.GasPrice - if feeUnit == FRI { - if gasPrice = header.GasPriceSTRK; gasPrice == nil { - gasPrice = &felt.Zero - } + var ( + l1GasPrice *felt.Felt + l2GasPrice *felt.Felt + l1DataGasPrice *felt.Felt + ) + + switch feeUnit { + case FRI: + l1GasPrice = header.L1GasPriceSTRK + l2GasPrice = header.L2GasPriceSTRK + l1DataGasPrice = header.L1DataGasPrice.PriceInFri + case WEI: + l1GasPrice = header.L1GasPriceETH + l2GasPrice = header.L2GasPriceETH + l1DataGasPrice = header.L1DataGasPrice.PriceInWei } - dataGasPrice := &felt.Zero - if header.L1DataGasPrice != nil { - switch feeUnit { - case FRI: - dataGasPrice = header.L1DataGasPrice.PriceInFri - case WEI: - dataGasPrice = header.L1DataGasPrice.PriceInWei - } - } - - var gasConsumed *felt.Felt - daGasL1DataGas := new(felt.Felt).SetUint64(daGas[i].L1DataGas) - dataGasFee := new(felt.Felt).Mul(daGasL1DataGas, dataGasPrice) - gasConsumed = new(felt.Felt).Sub(overallFee, dataGasFee) - gasConsumed = gasConsumed.Div(gasConsumed, gasPrice) // division by zero felt is zero felt + var l1GasConsumed *felt.Felt + l1DataGasConsumed := new(felt.Felt).SetUint64(daGas[i].L1DataGas) + dataGasFee := new(felt.Felt).Mul(l1DataGasConsumed, l1DataGasPrice) + l1GasConsumed = new(felt.Felt).Sub(overallFee, dataGasFee) estimate := FeeEstimate{ - GasConsumed: gasConsumed, - GasPrice: gasPrice, - DataGasConsumed: daGasL1DataGas, - DataGasPrice: dataGasPrice, - OverallFee: overallFee, - Unit: utils.Ptr(feeUnit), + L1GasConsumed: l1GasConsumed, + L2GasConsumed: &felt.Zero, // TODO: Fix when we have l2 gas price + L1GasPrice: l1GasPrice, + L2GasPrice: l2GasPrice, + L1DataGasConsumed: l1DataGasConsumed, + L1DataGasPrice: l1DataGasPrice, + OverallFee: overallFee, + Unit: utils.Ptr(feeUnit), } trace := traces[i] diff --git a/rpc/trace_test.go b/rpc/trace_test.go index 9c37ff54cf..373379bc69 100644 --- a/rpc/trace_test.go +++ b/rpc/trace_test.go @@ -121,7 +121,7 @@ func TestTraceTransaction(t *testing.T) { Hash: utils.HexToFelt(t, "0xCAFEBABE"), ParentHash: utils.HexToFelt(t, "0x0"), SequencerAddress: utils.HexToFelt(t, "0X111"), - GasPrice: utils.HexToFelt(t, "0x1"), + L1GasPriceETH: utils.HexToFelt(t, "0x1"), ProtocolVersion: "99.12.3", L1DAMode: core.Calldata, } @@ -210,7 +210,7 @@ func TestTraceTransaction(t *testing.T) { SequencerAddress: utils.HexToFelt(t, "0X111"), ProtocolVersion: "99.12.3", L1DAMode: core.Calldata, - GasPrice: utils.HexToFelt(t, "0x1"), + L1GasPriceETH: utils.HexToFelt(t, "0x1"), } require.Nil(t, header.Hash, "hash must be nil for pending block") @@ -337,7 +337,7 @@ func TestTraceBlockTransactions(t *testing.T) { // hash is not set because it's pending block ParentHash: utils.HexToFelt(t, "0x0C3"), Number: 0, - GasPrice: utils.HexToFelt(t, "0x777"), + L1GasPriceETH: utils.HexToFelt(t, "0x777"), ProtocolVersion: "99.12.3", } l1Tx := &core.L1HandlerTransaction{ @@ -420,7 +420,7 @@ func TestTraceBlockTransactions(t *testing.T) { ParentHash: utils.HexToFelt(t, "0x0"), Number: 0, SequencerAddress: utils.HexToFelt(t, "0X111"), - GasPrice: utils.HexToFelt(t, "0x777"), + L1GasPriceETH: utils.HexToFelt(t, "0x777"), ProtocolVersion: "99.12.3", } block := &core.Block{ diff --git a/rpc/transaction.go b/rpc/transaction.go index 01050bf2db..ed35f723ba 100644 --- a/rpc/transaction.go +++ b/rpc/transaction.go @@ -265,6 +265,11 @@ type DataAvailability struct { } type ExecutionResources struct { + L1Gas uint64 `json:"l1_gas"` + L1DataGas uint64 `json:"l1_data_gas"` + L2Gas uint64 `json:"l2_gas"` + + // TODO: Remove this field once the API is updated. ComputationResources DataAvailability *DataAvailability `json:"data_availability,omitempty"` } diff --git a/rpc/transaction_test.go b/rpc/transaction_test.go index c1adb39894..cf04708de9 100644 --- a/rpc/transaction_test.go +++ b/rpc/transaction_test.go @@ -577,6 +577,9 @@ func TestTransactionReceiptByHash(t *testing.T) { "events": [], "contract_address": "0x20cfa74ee3564b4cd5435cdace0f9c4d43b939620e4a0bb5076105df0a626c6", "execution_resources": { + "l1_data_gas": 0, + "l1_gas": 0, + "l2_gas": 0, "data_availability": { "l1_data_gas": 0, "l1_gas": 0 @@ -607,6 +610,9 @@ func TestTransactionReceiptByHash(t *testing.T) { ], "events": [], "execution_resources": { + "l1_data_gas": 0, + "l1_gas": 0, + "l2_gas": 0, "data_availability": { "l1_data_gas": 0, "l1_gas": 0 @@ -647,6 +653,9 @@ func TestTransactionReceiptByHash(t *testing.T) { ], "events": [], "execution_resources": { + "l1_data_gas": 0, + "l1_gas": 0, + "l2_gas": 0, "data_availability": { "l1_data_gas": 0, "l1_gas": 0 @@ -684,6 +693,9 @@ func TestTransactionReceiptByHash(t *testing.T) { ], "events": [], "execution_resources": { + "l1_data_gas": 0, + "l1_gas": 0, + "l2_gas": 0, "data_availability": { "l1_data_gas": 0, "l1_gas": 0 @@ -716,6 +728,9 @@ func TestTransactionReceiptByHash(t *testing.T) { "events": [], "revert_reason": "Error in the called contract (0x00b1461de04c6a1aa3375bdf9b7723a8779c082ffe21311d683a0b15c078b5dc):\nError at pc=0:25:\nGot an exception while executing a hint.\nCairo traceback (most recent call last):\nUnknown location (pc=0:731)\nUnknown location (pc=0:677)\nUnknown location (pc=0:291)\nUnknown location (pc=0:314)\n\nError in the called contract (0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7):\nError at pc=0:104:\nGot an exception while executing a hint.\nCairo traceback (most recent call last):\nUnknown location (pc=0:1678)\nUnknown location (pc=0:1664)\n\nError in the called contract (0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7):\nError at pc=0:6:\nGot an exception while executing a hint: Assertion failed, 0 % 0x800000000000011000000000000000000000000000000000000000000000001 is equal to 0\nCairo traceback (most recent call last):\nUnknown location (pc=0:1238)\nUnknown location (pc=0:1215)\nUnknown location (pc=0:836)\n", "execution_resources": { + "l1_data_gas": 0, + "l1_gas": 0, + "l2_gas": 0, "data_availability": { "l1_data_gas": 0, "l1_gas": 0 @@ -780,6 +795,9 @@ func TestTransactionReceiptByHash(t *testing.T) { "steps": 615, "range_check_builtin_applications": 19, "memory_holes": 4, + "l1_data_gas": 0, + "l1_gas": 0, + "l2_gas": 0, "data_availability": { "l1_data_gas": 0, "l1_gas": 0 @@ -842,6 +860,9 @@ func TestTransactionReceiptByHash(t *testing.T) { "pedersen_builtin_applications": 16, "poseidon_builtin_applications": 4, "range_check_builtin_applications": 157, + "l1_data_gas": 192, + "l1_gas": 0, + "l2_gas": 0, "data_availability": { "l1_gas": 0, "l1_data_gas": 192 From ce9ac969375c8bc23dd3a3386ba13d2dd375a62b Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 10:08:40 +0700 Subject: [PATCH 06/34] Rename methods --- clients/feeder/feeder_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/feeder/feeder_test.go b/clients/feeder/feeder_test.go index a22590a943..85fe79ecb6 100644 --- a/clients/feeder/feeder_test.go +++ b/clients/feeder/feeder_test.go @@ -273,7 +273,7 @@ func TestBlockWithoutSequencerAddressUnmarshal(t *testing.T) { assert.Equal(t, uint64(11817), block.Number) assert.Equal(t, "0x3df24be7b5fed6b41de08d38686b6142944119ca2a345c38793590d6804bba4", block.StateRoot.String()) assert.Equal(t, "ACCEPTED_ON_L2", block.Status) - assert.Equal(t, "0x27ad16775", block.GasPriceETH().String()) + assert.Equal(t, "0x27ad16775", block.L1GasPriceETH().String()) assert.Equal(t, 52, len(block.Transactions)) assert.Equal(t, 52, len(block.Receipts)) assert.Equal(t, uint64(1669465009), block.Timestamp) @@ -291,7 +291,7 @@ func TestBlockWithSequencerAddressUnmarshal(t *testing.T) { assert.Equal(t, uint64(19199), block.Number) assert.Equal(t, "0x541b796ea02703d02ff31459815f65f410ceefe80a4e3499f7ef9ccc36d26ee", block.StateRoot.String()) assert.Equal(t, "ACCEPTED_ON_L2", block.Status) - assert.Equal(t, "0x31c4e2d75", block.GasPriceETH().String()) + assert.Equal(t, "0x31c4e2d75", block.L1GasPriceETH().String()) assert.Equal(t, 324, len(block.Transactions)) assert.Equal(t, 324, len(block.Receipts)) assert.Equal(t, uint64(1674728186), block.Timestamp) @@ -309,8 +309,8 @@ func TestBlockHeaderV013Unmarshal(t *testing.T) { require.Equal(t, uint64(319132), block.Number) require.Equal(t, utils.HexToFelt(t, "0x2a6b9a8b60e1de80dc50e6b704b415a38e8fd03d82244cec92cbff0821a8975"), block.StateRoot) require.Equal(t, "ACCEPTED_ON_L2", block.Status) - require.Equal(t, utils.HexToFelt(t, "0x3b9aca08"), block.GasPriceETH()) - require.Equal(t, utils.HexToFelt(t, "0x2540be400"), block.GasPriceSTRK()) + require.Equal(t, utils.HexToFelt(t, "0x3b9aca08"), block.L1GasPriceETH()) + require.Equal(t, utils.HexToFelt(t, "0x2540be400"), block.L1GasPriceSTRK()) require.Equal(t, uint64(1700075354), block.Timestamp) require.Equal(t, utils.HexToFelt(t, "0x1176a1bd84444c89232ec27754698e5d2e7e1a7f1539f12027f28b23ec9f3d8"), block.SequencerAddress) require.Equal(t, "0.13.0", block.Version) @@ -324,8 +324,8 @@ func TestBlockHeaderV0131Unmarshal(t *testing.T) { require.Equal(t, utils.HexToFelt(t, "0x8ab8117e952f95efd96de0bc66dc6f13fe68dfda14b95fe1972759dee283a8"), block.Hash) require.Equal(t, utils.HexToFelt(t, "0x13367121d0b7e34a9b10c8a5a1c269811cd9afc3ce680c88888f1a22d2f017a"), block.TransactionCommitment) require.Equal(t, utils.HexToFelt(t, "0x1090dd2ab2aa22bd5fc5a59d3b1394d54461bb2a80156c4b2c2622d2c474ca2"), block.EventCommitment) - require.Equal(t, utils.HexToFelt(t, "0x3b9aca0a"), block.GasPriceETH()) - require.Equal(t, utils.HexToFelt(t, "0x2b6fdb70"), block.GasPriceSTRK()) + require.Equal(t, utils.HexToFelt(t, "0x3b9aca0a"), block.L1GasPriceETH()) + require.Equal(t, utils.HexToFelt(t, "0x2b6fdb70"), block.L1GasPriceSTRK()) require.Equal(t, utils.HexToFelt(t, "0x5265a14ef"), block.L1DataGasPrice.PriceInWei) require.Equal(t, utils.HexToFelt(t, "0x3c0c00c87"), block.L1DataGasPrice.PriceInFri) require.Equal(t, starknet.Blob, block.L1DAMode) From d2ec2d8f2bda37c0f5438ec5914ba8e11b3e18a8 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 10:09:12 +0700 Subject: [PATCH 07/34] Add l2 gas price --- starknet/block.go | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/starknet/block.go b/starknet/block.go index 955a8ab6c8..939f59b355 100644 --- a/starknet/block.go +++ b/starknet/block.go @@ -24,6 +24,7 @@ type Block struct { Receipts []*TransactionReceipt `json:"transaction_receipts"` SequencerAddress *felt.Felt `json:"sequencer_address"` L1GasPrice *GasPrice `json:"l1_gas_price"` + L2GasPrice *GasPrice `json:"l2_gas_price"` L1DAMode L1DAMode `json:"l1_da_mode"` L1DataGasPrice *GasPrice `json:"l1_data_gas_price"` L2GasPrice *GasPrice `json:"l2_gas_price"` @@ -37,7 +38,7 @@ type Block struct { GasPriceFRI *felt.Felt `json:"strk_l1_gas_price"` } -func (b *Block) GasPriceETH() *felt.Felt { +func (b *Block) L1GasPriceETH() *felt.Felt { if b.L1GasPrice != nil { return b.L1GasPrice.PriceInWei } else if b.GasPriceWEI != nil { @@ -46,13 +47,29 @@ func (b *Block) GasPriceETH() *felt.Felt { return b.GasPriceLegacy } -func (b *Block) GasPriceSTRK() *felt.Felt { +func (b *Block) L1GasPriceSTRK() *felt.Felt { if b.L1GasPrice != nil { return b.L1GasPrice.PriceInFri } return b.GasPriceFRI } +// TODO: Fix when we have l2 gas price +func (b *Block) L2GasPriceETH() *felt.Felt { + if b.L2GasPrice != nil { + return b.L2GasPrice.PriceInWei + } + return &felt.Zero +} + +// TODO: Fix when we have l2 gas price +func (b *Block) L2GasPriceSTRK() *felt.Felt { + if b.L2GasPrice != nil { + return b.L2GasPrice.PriceInFri + } + return &felt.Zero +} + type L1DAMode uint const ( From d79f95913729d6cc0b49e3f12d0b9611cb0a2c03 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 10:09:58 +0700 Subject: [PATCH 08/34] Rename fields --- vm/vm.go | 4 ++-- vm/vm_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vm/vm.go b/vm/vm.go index 882a1af825..6f0f00155a 100644 --- a/vm/vm.go +++ b/vm/vm.go @@ -206,8 +206,8 @@ func makeCBlockInfo(blockInfo *BlockInfo) C.BlockInfo { cBlockInfo.block_number = C.ulonglong(blockInfo.Header.Number) cBlockInfo.block_timestamp = C.ulonglong(blockInfo.Header.Timestamp) copyFeltIntoCArray(blockInfo.Header.SequencerAddress, &cBlockInfo.sequencer_address[0]) - copyFeltIntoCArray(blockInfo.Header.GasPrice, &cBlockInfo.gas_price_wei[0]) - copyFeltIntoCArray(blockInfo.Header.GasPriceSTRK, &cBlockInfo.gas_price_fri[0]) + copyFeltIntoCArray(blockInfo.Header.L1GasPriceETH, &cBlockInfo.gas_price_wei[0]) + copyFeltIntoCArray(blockInfo.Header.L1GasPriceSTRK, &cBlockInfo.gas_price_fri[0]) cBlockInfo.version = cstring([]byte(blockInfo.Header.ProtocolVersion)) copyFeltIntoCArray(blockInfo.BlockHashToBeRevealed, &cBlockInfo.block_hash_to_be_revealed[0]) if blockInfo.Header.L1DAMode == core.Blob { diff --git a/vm/vm_test.go b/vm/vm_test.go index 2e9c99c521..3305f669f9 100644 --- a/vm/vm_test.go +++ b/vm/vm_test.go @@ -199,8 +199,8 @@ func TestExecute(t *testing.T) { Header: &core.Header{ Timestamp: 1666877926, SequencerAddress: utils.HexToFelt(t, "0x46a89ae102987331d369645031b49c27738ed096f2789c24449966da4c6de6b"), - GasPrice: &felt.Zero, - GasPriceSTRK: &felt.Zero, + L1GasPriceETH: &felt.Zero, + L1GasPriceSTRK: &felt.Zero, }, }, state, &network, false, false, false) @@ -210,8 +210,8 @@ func TestExecute(t *testing.T) { _, _, _, _, err := New(false, nil).Execute(nil, nil, []*felt.Felt{}, &BlockInfo{ Header: &core.Header{ SequencerAddress: &felt.Zero, - GasPrice: &felt.Zero, - GasPriceSTRK: &felt.Zero, + L1GasPriceETH: &felt.Zero, + L1GasPriceSTRK: &felt.Zero, }, }, state, &network, false, false, false) require.NoError(t, err) From 991c3a5be9f3ad4a1e686ec08a051d68ea2db567 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 18 Dec 2024 11:00:26 +0700 Subject: [PATCH 09/34] Update RPC v0.7 endpoint --- rpc/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/handlers.go b/rpc/handlers.go index e0110547d6..56a6dbd2f5 100644 --- a/rpc/handlers.go +++ b/rpc/handlers.go @@ -516,7 +516,7 @@ func (h *Handler) MethodsV0_7() ([]jsonrpc.Method, string) { //nolint: funlen { Name: "starknet_estimateMessageFee", Params: []jsonrpc.Parameter{{Name: "message"}, {Name: "block_id"}}, - Handler: h.EstimateMessageFee, + Handler: h.EstimateMessageFeeV0_7, }, { Name: "starknet_traceTransaction", From 6427252185dabb2feee98b8d3d6b0473dba5be2d Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Sun, 22 Dec 2024 15:21:24 +0700 Subject: [PATCH 10/34] Add FeeEstimateToV0_7 and TestFeeEstimateToV0_7 --- rpc/estimate_fee.go | 20 ++++++++++++-------- rpc/estimate_fee_test.go | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/rpc/estimate_fee.go b/rpc/estimate_fee.go index e76746bf7c..96be64ed18 100644 --- a/rpc/estimate_fee.go +++ b/rpc/estimate_fee.go @@ -52,6 +52,17 @@ type FeeEstimate struct { Estimate Fee Handlers *****************************************************/ +func FeeEstimateToV0_7(feeEstimate FeeEstimate) FeeEstimateV0_7 { + return FeeEstimateV0_7{ + GasConsumed: feeEstimate.L1GasConsumed, + GasPrice: feeEstimate.L1GasPrice, + DataGasConsumed: feeEstimate.L1DataGasConsumed, + DataGasPrice: feeEstimate.L1DataGasPrice, + OverallFee: feeEstimate.OverallFee, + Unit: feeEstimate.Unit, + } +} + func (h *Handler) EstimateFeeV0_7(broadcastedTxns []BroadcastedTransaction, simulationFlags []SimulationFlag, id BlockID, ) ([]FeeEstimateV0_7, http.Header, *jsonrpc.Error) { @@ -61,14 +72,7 @@ func (h *Handler) EstimateFeeV0_7(broadcastedTxns []BroadcastedTransaction, } return utils.Map(result, func(tx SimulatedTransaction) FeeEstimateV0_7 { - return FeeEstimateV0_7{ - GasConsumed: tx.FeeEstimation.L1GasConsumed, - GasPrice: tx.FeeEstimation.L1GasPrice, - DataGasConsumed: tx.FeeEstimation.L1DataGasConsumed, - DataGasPrice: tx.FeeEstimation.L1DataGasPrice, - OverallFee: tx.FeeEstimation.OverallFee, - Unit: tx.FeeEstimation.Unit, - } + return FeeEstimateToV0_7(tx.FeeEstimation) }), httpHeader, nil } diff --git a/rpc/estimate_fee_test.go b/rpc/estimate_fee_test.go index c1ade1b8cf..09589af693 100644 --- a/rpc/estimate_fee_test.go +++ b/rpc/estimate_fee_test.go @@ -164,3 +164,38 @@ func assertEqualCairo1Class(t *testing.T, cairo1Class *core.Cairo1Class, class * assert.Equal(t, cairo1Class.EntryPoints.External[idx].Selector, class.EntryPoints.External[idx].Selector) } } + +func TestFeeEstimateToV0_7(t *testing.T) { + t.Run("empty", func(t *testing.T) { + assert.Equal(t, rpc.FeeEstimateV0_7{}, rpc.FeeEstimateToV0_7(rpc.FeeEstimate{})) + }) + + t.Run("full", func(t *testing.T) { + gasConsumed := new(felt.Felt).SetUint64(1) + gasPrice := new(felt.Felt).SetUint64(2) + dataGasConsumed := new(felt.Felt).SetUint64(3) + dataGasPrice := new(felt.Felt).SetUint64(4) + overallFee := new(felt.Felt).SetUint64(5) + unit := rpc.WEI + assert.Equal( + t, + rpc.FeeEstimateV0_7{ + GasConsumed: gasConsumed, + GasPrice: gasPrice, + DataGasConsumed: dataGasConsumed, + DataGasPrice: dataGasPrice, + OverallFee: overallFee, + Unit: &unit, + }, + rpc.FeeEstimateToV0_7(rpc.FeeEstimate{ + L1GasConsumed: gasConsumed, + L1GasPrice: gasPrice, + L2GasConsumed: new(felt.Felt).SetUint64(6), + L2GasPrice: new(felt.Felt).SetUint64(7), + L1DataGasConsumed: dataGasConsumed, + L1DataGasPrice: dataGasPrice, + OverallFee: overallFee, + Unit: &unit, + })) + }) +} From d73e6bb5eca241c318bf1f19bb98433c17ab4b2a Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Sun, 22 Dec 2024 17:54:10 +0700 Subject: [PATCH 11/34] Add calculateFeeEstimate and TestCalculateFeeEstimate --- rpc/simulation.go | 65 +++++++++++++++++++------------------- rpc/simulation_pkg_test.go | 39 +++++++++++++++++++++++ 2 files changed, 71 insertions(+), 33 deletions(-) create mode 100644 rpc/simulation_pkg_test.go diff --git a/rpc/simulation.go b/rpc/simulation.go index 29e6893180..ec39819e9b 100644 --- a/rpc/simulation.go +++ b/rpc/simulation.go @@ -56,7 +56,6 @@ func (h *Handler) SimulateTransactions(id BlockID, transactions []BroadcastedTra return h.simulateTransactions(id, transactions, simulationFlags, false) } -//nolint:funlen func (h *Handler) simulateTransactions(id BlockID, transactions []BroadcastedTransaction, simulationFlags []SimulationFlag, errOnRevert bool, ) ([]SimulatedTransaction, http.Header, *jsonrpc.Error) { @@ -125,38 +124,7 @@ func (h *Handler) simulateTransactions(id BlockID, transactions []BroadcastedTra for i, overallFee := range overallFees { feeUnit := feeUnit(txns[i]) - var ( - l1GasPrice *felt.Felt - l2GasPrice *felt.Felt - l1DataGasPrice *felt.Felt - ) - - switch feeUnit { - case FRI: - l1GasPrice = header.L1GasPriceSTRK - l2GasPrice = header.L2GasPriceSTRK - l1DataGasPrice = header.L1DataGasPrice.PriceInFri - case WEI: - l1GasPrice = header.L1GasPriceETH - l2GasPrice = header.L2GasPriceETH - l1DataGasPrice = header.L1DataGasPrice.PriceInWei - } - - var l1GasConsumed *felt.Felt - l1DataGasConsumed := new(felt.Felt).SetUint64(daGas[i].L1DataGas) - dataGasFee := new(felt.Felt).Mul(l1DataGasConsumed, l1DataGasPrice) - l1GasConsumed = new(felt.Felt).Sub(overallFee, dataGasFee) - - estimate := FeeEstimate{ - L1GasConsumed: l1GasConsumed, - L2GasConsumed: &felt.Zero, // TODO: Fix when we have l2 gas price - L1GasPrice: l1GasPrice, - L2GasPrice: l2GasPrice, - L1DataGasConsumed: l1DataGasConsumed, - L1DataGasPrice: l1DataGasPrice, - OverallFee: overallFee, - Unit: utils.Ptr(feeUnit), - } + estimate := calculateFeeEstimate(overallFee, daGas[i].L1DataGas, feeUnit, header) trace := traces[i] executionResources := trace.TotalExecutionResources() @@ -175,6 +143,37 @@ func (h *Handler) simulateTransactions(id BlockID, transactions []BroadcastedTra return result, httpHeader, nil } +func calculateFeeEstimate(overallFee *felt.Felt, l1DataGas uint64, feeUnit FeeUnit, header *core.Header) FeeEstimate { + var l1GasPrice, l2GasPrice, l1DataGasPrice *felt.Felt + + switch feeUnit { + case FRI: + l1GasPrice = header.L1GasPriceSTRK + l2GasPrice = header.L2GasPriceSTRK + l1DataGasPrice = header.L1DataGasPrice.PriceInFri + case WEI: + l1GasPrice = header.L1GasPriceETH + l2GasPrice = header.L2GasPriceETH + l1DataGasPrice = header.L1DataGasPrice.PriceInWei + } + + l1DataGasConsumed := new(felt.Felt).SetUint64(l1DataGas) + dataGasFee := new(felt.Felt).Mul(l1DataGasConsumed, l1DataGasPrice) + l1GasConsumed := new(felt.Felt).Sub(overallFee, dataGasFee) + l1GasConsumed = l1GasConsumed.Div(l1GasConsumed, l1GasPrice) + + return FeeEstimate{ + L1GasConsumed: l1GasConsumed, + L2GasConsumed: &felt.Zero, // TODO: Fix when we have l2 gas price + L1GasPrice: l1GasPrice, + L2GasPrice: l2GasPrice, + L1DataGasConsumed: l1DataGasConsumed, + L1DataGasPrice: l1DataGasPrice, + OverallFee: overallFee, + Unit: utils.Ptr(feeUnit), + } +} + type TransactionExecutionErrorData struct { TransactionIndex uint64 `json:"transaction_index"` ExecutionError string `json:"execution_error"` diff --git a/rpc/simulation_pkg_test.go b/rpc/simulation_pkg_test.go new file mode 100644 index 0000000000..44f0c35e37 --- /dev/null +++ b/rpc/simulation_pkg_test.go @@ -0,0 +1,39 @@ +package rpc + +import ( + "testing" + + "github.com/NethermindEth/juno/core" + "github.com/NethermindEth/juno/core/felt" + "github.com/stretchr/testify/assert" +) + +func TestCalculateFeeEstimate(t *testing.T) { + l1GasPriceETH := new(felt.Felt).SetUint64(200) + l2GasPriceETH := new(felt.Felt).SetUint64(70) + l1GasPriceSTRK := new(felt.Felt).SetUint64(100) + l2GasPriceSTRK := new(felt.Felt).SetUint64(50) + l1DataGasPrice := &core.GasPrice{ + PriceInWei: new(felt.Felt).SetUint64(10), + PriceInFri: new(felt.Felt).SetUint64(5), + } + header := &core.Header{ + L1GasPriceETH: l1GasPriceETH, + L2GasPriceETH: l2GasPriceETH, + L1GasPriceSTRK: l1GasPriceSTRK, + L2GasPriceSTRK: l2GasPriceSTRK, + L1DataGasPrice: l1DataGasPrice, + } + l1DataGas := uint64(500) + overallFee := new(felt.Felt).SetUint64(6000) + + feeEstimate := calculateFeeEstimate(overallFee, l1DataGas, FRI, header) + + assert.Equal(t, l1GasPriceSTRK, feeEstimate.L1GasPrice) + assert.Equal(t, l2GasPriceSTRK, feeEstimate.L2GasPrice) + assert.Equal(t, l1DataGasPrice.PriceInFri, feeEstimate.L1DataGasPrice) + assert.Equal(t, overallFee, feeEstimate.OverallFee) + assert.Equal(t, FRI, *feeEstimate.Unit) + assert.Equal(t, new(felt.Felt).SetUint64(35), feeEstimate.L1GasConsumed) + assert.Equal(t, &felt.Zero, feeEstimate.L2GasConsumed) +} From 29ad24d5618f2b11fc99881d480a8f39cdbe76eb Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Sun, 22 Dec 2024 18:11:57 +0700 Subject: [PATCH 12/34] Add TestL2GasPrice --- starknet/block_test.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 starknet/block_test.go diff --git a/starknet/block_test.go b/starknet/block_test.go new file mode 100644 index 0000000000..73dd158bab --- /dev/null +++ b/starknet/block_test.go @@ -0,0 +1,30 @@ +package starknet_test + +import ( + "testing" + + "github.com/NethermindEth/juno/core/felt" + "github.com/NethermindEth/juno/starknet" + "github.com/stretchr/testify/assert" +) + +func TestL2GasPrice(t *testing.T) { + t.Run("L2GasPrice is not set", func(t *testing.T) { + block := starknet.Block{} + assert.Equal(t, &felt.Zero, block.L2GasPriceETH()) + assert.Equal(t, &felt.Zero, block.L2GasPriceSTRK()) + }) + + t.Run("L2GasPrice is set", func(t *testing.T) { + gasPriceWei := new(felt.Felt).SetUint64(100) + gasPriceFri := new(felt.Felt).SetUint64(50) + block := starknet.Block{ + L2GasPrice: &starknet.GasPrice{ + PriceInWei: gasPriceWei, + PriceInFri: gasPriceFri, + }, + } + assert.Equal(t, gasPriceWei, block.L2GasPriceETH()) + assert.Equal(t, gasPriceFri, block.L2GasPriceSTRK()) + }) +} From 449a0043414301ec2426e0e7f310bbad68ccda97 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Tue, 24 Dec 2024 12:58:38 +0700 Subject: [PATCH 13/34] Remove generic --- rpc/estimate_fee.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/rpc/estimate_fee.go b/rpc/estimate_fee.go index 96be64ed18..5533c77041 100644 --- a/rpc/estimate_fee.go +++ b/rpc/estimate_fee.go @@ -91,7 +91,12 @@ func (h *Handler) EstimateFee(broadcastedTxns []BroadcastedTransaction, //nolint:gocritic func (h *Handler) EstimateMessageFeeV0_7(msg MsgFromL1, id BlockID) (*FeeEstimateV0_7, http.Header, *jsonrpc.Error) { - return estimateMessageFee(msg, id, h.EstimateFeeV0_7) + estimate, header, err := estimateMessageFee(msg, id, h.EstimateFee) + if err != nil { + return nil, header, err + } + estimateV0_7 := FeeEstimateToV0_7(*estimate) + return &estimateV0_7, header, nil } //nolint:gocritic @@ -99,12 +104,12 @@ func (h *Handler) EstimateMessageFee(msg MsgFromL1, id BlockID) (*FeeEstimate, h return estimateMessageFee(msg, id, h.EstimateFee) } -type estimateFeeHandler[T any] func(broadcastedTxns []BroadcastedTransaction, +type estimateFeeHandler func(broadcastedTxns []BroadcastedTransaction, simulationFlags []SimulationFlag, id BlockID, -) ([]T, http.Header, *jsonrpc.Error) +) ([]FeeEstimate, http.Header, *jsonrpc.Error) //nolint:gocritic -func estimateMessageFee[T any](msg MsgFromL1, id BlockID, f estimateFeeHandler[T]) (*T, http.Header, *jsonrpc.Error) { +func estimateMessageFee(msg MsgFromL1, id BlockID, f estimateFeeHandler) (*FeeEstimate, http.Header, *jsonrpc.Error) { calldata := make([]*felt.Felt, 0, len(msg.Payload)+1) // The order of the calldata parameters matters. msg.From must be prepended. calldata = append(calldata, new(felt.Felt).SetBytes(msg.From.Bytes())) From 89e7262d943c0cce8c3bab8fc207b40a63ef1495 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Tue, 24 Dec 2024 13:05:16 +0700 Subject: [PATCH 14/34] Switch lines --- rpc/block.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/block.go b/rpc/block.go index 8b98238a10..4f63677c77 100644 --- a/rpc/block.go +++ b/rpc/block.go @@ -331,8 +331,8 @@ func adaptBlockHeader(header *core.Header) BlockHeader { InFri: nilToZero(header.L1GasPriceSTRK), }, L2GasPrice: &ResourcePrice{ - InFri: nilToZero(header.L2GasPriceSTRK), InWei: nilToZero(header.L2GasPriceETH), + InFri: nilToZero(header.L2GasPriceSTRK), }, L1DataGasPrice: &l1DataGasPrice, L1DAMode: &l1DAMode, From aeae709b8464943ec8c1654eca6a86a75dbe8b1f Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Thu, 26 Dec 2024 16:55:40 +0900 Subject: [PATCH 15/34] Make feeEstimateToV0_7 private --- rpc/estimate_fee.go | 6 ++--- rpc/estimate_fee_pkg_test.go | 43 ++++++++++++++++++++++++++++++++++++ rpc/estimate_fee_test.go | 35 ----------------------------- 3 files changed, 46 insertions(+), 38 deletions(-) create mode 100644 rpc/estimate_fee_pkg_test.go diff --git a/rpc/estimate_fee.go b/rpc/estimate_fee.go index 5533c77041..5923703dd8 100644 --- a/rpc/estimate_fee.go +++ b/rpc/estimate_fee.go @@ -52,7 +52,7 @@ type FeeEstimate struct { Estimate Fee Handlers *****************************************************/ -func FeeEstimateToV0_7(feeEstimate FeeEstimate) FeeEstimateV0_7 { +func feeEstimateToV0_7(feeEstimate FeeEstimate) FeeEstimateV0_7 { return FeeEstimateV0_7{ GasConsumed: feeEstimate.L1GasConsumed, GasPrice: feeEstimate.L1GasPrice, @@ -72,7 +72,7 @@ func (h *Handler) EstimateFeeV0_7(broadcastedTxns []BroadcastedTransaction, } return utils.Map(result, func(tx SimulatedTransaction) FeeEstimateV0_7 { - return FeeEstimateToV0_7(tx.FeeEstimation) + return feeEstimateToV0_7(tx.FeeEstimation) }), httpHeader, nil } @@ -95,7 +95,7 @@ func (h *Handler) EstimateMessageFeeV0_7(msg MsgFromL1, id BlockID) (*FeeEstimat if err != nil { return nil, header, err } - estimateV0_7 := FeeEstimateToV0_7(*estimate) + estimateV0_7 := feeEstimateToV0_7(*estimate) return &estimateV0_7, header, nil } diff --git a/rpc/estimate_fee_pkg_test.go b/rpc/estimate_fee_pkg_test.go new file mode 100644 index 0000000000..43530e545a --- /dev/null +++ b/rpc/estimate_fee_pkg_test.go @@ -0,0 +1,43 @@ +package rpc + +import ( + "testing" + + "github.com/NethermindEth/juno/core/felt" + "github.com/stretchr/testify/assert" +) + +func TestFeeEstimateToV0_7(t *testing.T) { + t.Run("empty", func(t *testing.T) { + assert.Equal(t, FeeEstimateV0_7{}, feeEstimateToV0_7(FeeEstimate{})) + }) + + t.Run("full", func(t *testing.T) { + gasConsumed := new(felt.Felt).SetUint64(1) + gasPrice := new(felt.Felt).SetUint64(2) + dataGasConsumed := new(felt.Felt).SetUint64(3) + dataGasPrice := new(felt.Felt).SetUint64(4) + overallFee := new(felt.Felt).SetUint64(5) + unit := WEI + assert.Equal( + t, + FeeEstimateV0_7{ + GasConsumed: gasConsumed, + GasPrice: gasPrice, + DataGasConsumed: dataGasConsumed, + DataGasPrice: dataGasPrice, + OverallFee: overallFee, + Unit: &unit, + }, + feeEstimateToV0_7(FeeEstimate{ + L1GasConsumed: gasConsumed, + L1GasPrice: gasPrice, + L2GasConsumed: new(felt.Felt).SetUint64(6), + L2GasPrice: new(felt.Felt).SetUint64(7), + L1DataGasConsumed: dataGasConsumed, + L1DataGasPrice: dataGasPrice, + OverallFee: overallFee, + Unit: &unit, + })) + }) +} diff --git a/rpc/estimate_fee_test.go b/rpc/estimate_fee_test.go index 09589af693..c1ade1b8cf 100644 --- a/rpc/estimate_fee_test.go +++ b/rpc/estimate_fee_test.go @@ -164,38 +164,3 @@ func assertEqualCairo1Class(t *testing.T, cairo1Class *core.Cairo1Class, class * assert.Equal(t, cairo1Class.EntryPoints.External[idx].Selector, class.EntryPoints.External[idx].Selector) } } - -func TestFeeEstimateToV0_7(t *testing.T) { - t.Run("empty", func(t *testing.T) { - assert.Equal(t, rpc.FeeEstimateV0_7{}, rpc.FeeEstimateToV0_7(rpc.FeeEstimate{})) - }) - - t.Run("full", func(t *testing.T) { - gasConsumed := new(felt.Felt).SetUint64(1) - gasPrice := new(felt.Felt).SetUint64(2) - dataGasConsumed := new(felt.Felt).SetUint64(3) - dataGasPrice := new(felt.Felt).SetUint64(4) - overallFee := new(felt.Felt).SetUint64(5) - unit := rpc.WEI - assert.Equal( - t, - rpc.FeeEstimateV0_7{ - GasConsumed: gasConsumed, - GasPrice: gasPrice, - DataGasConsumed: dataGasConsumed, - DataGasPrice: dataGasPrice, - OverallFee: overallFee, - Unit: &unit, - }, - rpc.FeeEstimateToV0_7(rpc.FeeEstimate{ - L1GasConsumed: gasConsumed, - L1GasPrice: gasPrice, - L2GasConsumed: new(felt.Felt).SetUint64(6), - L2GasPrice: new(felt.Felt).SetUint64(7), - L1DataGasConsumed: dataGasConsumed, - L1DataGasPrice: dataGasPrice, - OverallFee: overallFee, - Unit: &unit, - })) - }) -} From b3b618fc8137e3c7ad67df823d4f6398145eddf1 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Thu, 26 Dec 2024 17:02:23 +0900 Subject: [PATCH 16/34] Fix tests --- rpc/subscriptions_test.go | 48 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/rpc/subscriptions_test.go b/rpc/subscriptions_test.go index 296feac914..6676d520f8 100644 --- a/rpc/subscriptions_test.go +++ b/rpc/subscriptions_test.go @@ -715,7 +715,7 @@ func TestSubscribeNewHeadsHistorical(t *testing.T) { require.Equal(t, subResp(id), got) // Check block 0 content - want := `{"jsonrpc":"2.0","method":"starknet_subscriptionNewHeads","params":{"result":{"block_hash":"0x47c3637b57c2b079b93c61539950c17e868a28f46cdef28f88521067f21e943","parent_hash":"0x0","block_number":0,"new_root":"0x21870ba80540e7831fb21c591ee93481f5ae1bb71ff85a86ddd465be4eddee6","timestamp":1637069048,"sequencer_address":"0x0","l1_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l1_data_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l1_da_mode":"CALLDATA","starknet_version":""},"subscription_id":%d}}` + want := `{"jsonrpc":"2.0","method":"starknet_subscriptionNewHeads","params":{"result":{"block_hash":"0x47c3637b57c2b079b93c61539950c17e868a28f46cdef28f88521067f21e943","parent_hash":"0x0","block_number":0,"new_root":"0x21870ba80540e7831fb21c591ee93481f5ae1bb71ff85a86ddd465be4eddee6","timestamp":1637069048,"sequencer_address":"0x0","l1_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l2_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l1_data_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l1_da_mode":"CALLDATA","starknet_version":""},"subscription_id":%d}}` want = fmt.Sprintf(want, id) _, block0Got, err := conn.Read(ctx) require.NoError(t, err) @@ -1028,8 +1028,30 @@ func subMsg(method string) string { return fmt.Sprintf(`{"jsonrpc":"2.0","id":1,"method":%q}`, method) } +func testHeader(t *testing.T) *core.Header { + t.Helper() + + header := &core.Header{ + Hash: utils.HexToFelt(t, "0x4e1f77f39545afe866ac151ac908bd1a347a2a8a7d58bef1276db4f06fdf2f6"), + ParentHash: utils.HexToFelt(t, "0x2a70fb03fe363a2d6be843343a1d81ce6abeda1e9bd5cc6ad8fa9f45e30fdeb"), + Number: 2, + GlobalStateRoot: utils.HexToFelt(t, "0x3ceee867d50b5926bb88c0ec7e0b9c20ae6b537e74aac44b8fcf6bb6da138d9"), + Timestamp: 1637084470, + SequencerAddress: utils.HexToFelt(t, "0x0"), + L1DataGasPrice: &core.GasPrice{ + PriceInFri: utils.HexToFelt(t, "0x0"), + PriceInWei: utils.HexToFelt(t, "0x0"), + }, + L1GasPriceETH: utils.HexToFelt(t, "0x0"), + L1GasPriceSTRK: utils.HexToFelt(t, "0x0"), + L1DAMode: core.Calldata, + ProtocolVersion: "", + } + return header +} + func newHeadsResponse(id uint64) string { - return fmt.Sprintf(`{"jsonrpc":"2.0","method":"starknet_subscriptionNewHeads","params":{"result":{"block_hash":"0x4e1f77f39545afe866ac151ac908bd1a347a2a8a7d58bef1276db4f06fdf2f6","parent_hash":"0x2a70fb03fe363a2d6be843343a1d81ce6abeda1e9bd5cc6ad8fa9f45e30fdeb","block_number":2,"new_root":"0x3ceee867d50b5926bb88c0ec7e0b9c20ae6b537e74aac44b8fcf6bb6da138d9","timestamp":1637084470,"sequencer_address":"0x0","l1_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l1_data_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l1_da_mode":"CALLDATA","starknet_version":""},"subscription_id":%d}}`, id) + return fmt.Sprintf(`{"jsonrpc":"2.0","method":"starknet_subscriptionNewHeads","params":{"result":{"block_hash":"0x4e1f77f39545afe866ac151ac908bd1a347a2a8a7d58bef1276db4f06fdf2f6","parent_hash":"0x2a70fb03fe363a2d6be843343a1d81ce6abeda1e9bd5cc6ad8fa9f45e30fdeb","block_number":2,"new_root":"0x3ceee867d50b5926bb88c0ec7e0b9c20ae6b537e74aac44b8fcf6bb6da138d9","timestamp":1637084470,"sequencer_address":"0x0","l1_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l2_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l1_data_gas_price":{"price_in_fri":"0x0","price_in_wei":"0x0"},"l1_da_mode":"CALLDATA","starknet_version":""},"subscription_id":%d}}`, id) } // setupRPC creates a RPC handler that runs in a goroutine and a JSONRPC server that can be used to test subscriptions @@ -1073,25 +1095,3 @@ func marshalSubEventsResp(e *EmittedEvent, id uint64) ([]byte, error) { }, }) } - -func testHeader(t *testing.T) *core.Header { - t.Helper() - - header := &core.Header{ - Hash: utils.HexToFelt(t, "0x4e1f77f39545afe866ac151ac908bd1a347a2a8a7d58bef1276db4f06fdf2f6"), - ParentHash: utils.HexToFelt(t, "0x2a70fb03fe363a2d6be843343a1d81ce6abeda1e9bd5cc6ad8fa9f45e30fdeb"), - Number: 2, - GlobalStateRoot: utils.HexToFelt(t, "0x3ceee867d50b5926bb88c0ec7e0b9c20ae6b537e74aac44b8fcf6bb6da138d9"), - Timestamp: 1637084470, - SequencerAddress: utils.HexToFelt(t, "0x0"), - L1DataGasPrice: &core.GasPrice{ - PriceInFri: utils.HexToFelt(t, "0x0"), - PriceInWei: utils.HexToFelt(t, "0x0"), - }, - GasPrice: utils.HexToFelt(t, "0x0"), - GasPriceSTRK: utils.HexToFelt(t, "0x0"), - L1DAMode: core.Calldata, - ProtocolVersion: "", - } - return header -} From 04a2a5a8dde8a8955bbd4f93a85d32324738fc24 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Thu, 26 Dec 2024 17:59:38 +0900 Subject: [PATCH 17/34] Add cbor tags --- core/block.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block.go b/core/block.go index ec102af0bb..29a65c22fb 100644 --- a/core/block.go +++ b/core/block.go @@ -35,13 +35,13 @@ type Header struct { // Bloom filter on the events emitted this block EventsBloom *bloom.BloomFilter // Amount of WEI charged per Gas spent on L1 - L1GasPriceETH *felt.Felt + L1GasPriceETH *felt.Felt `cbor:"gasprice"` // Amount of STRK charged per Gas spent on L2 L2GasPriceETH *felt.Felt // Sequencer signatures Signatures [][]*felt.Felt // Amount of STRK charged per Gas spent on L1 - L1GasPriceSTRK *felt.Felt + L1GasPriceSTRK *felt.Felt `cbor:"gaspricestrk"` // Amount of STRK charged per Gas spent on L2 L2GasPriceSTRK *felt.Felt // The mode of the L1 data availability From 3450628a96628cafdb82b186c20003c810405498 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Fri, 10 Jan 2025 11:53:09 +0300 Subject: [PATCH 18/34] Fix rebase issues --- starknet/block.go | 1 - 1 file changed, 1 deletion(-) diff --git a/starknet/block.go b/starknet/block.go index 939f59b355..39ad3ad55b 100644 --- a/starknet/block.go +++ b/starknet/block.go @@ -27,7 +27,6 @@ type Block struct { L2GasPrice *GasPrice `json:"l2_gas_price"` L1DAMode L1DAMode `json:"l1_da_mode"` L1DataGasPrice *GasPrice `json:"l1_data_gas_price"` - L2GasPrice *GasPrice `json:"l2_gas_price"` // TODO we can remove the GasPrice method and the GasPriceLegacy field // once v0.13 lands on mainnet. In the meantime, we include both to support From c0d7b5c22391f982487bd62357098596a300db0e Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Mon, 13 Jan 2025 09:40:29 +0300 Subject: [PATCH 19/34] Update proto files --- p2p/spec/header.proto | 14 ++++++++------ p2p/spec/receipt.proto | 3 ++- p2p/spec/transaction.proto | 5 ++++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/p2p/spec/header.proto b/p2p/spec/header.proto index c345b1446a..570cc7ef8b 100644 --- a/p2p/spec/header.proto +++ b/p2p/spec/header.proto @@ -19,13 +19,15 @@ message SignedBlockHeader { Patricia events = 9; // By order of issuance. TBD: in receipts? Hash receipts = 10; // By order of issuance. This is a patricia root. No need for length because it's the same length as transactions. string protocol_version = 11; // Starknet version - Uint128 gas_price_fri = 12; - Uint128 gas_price_wei = 13; - Uint128 data_gas_price_fri = 14; - Uint128 data_gas_price_wei = 15; - L1DataAvailabilityMode l1_data_availability_mode = 16; + Uint128 l1_gas_price_fri = 12; + Uint128 l1_gas_price_wei = 13; + Uint128 l1_data_gas_price_fri = 14; + Uint128 l1_data_gas_price_wei = 15; + Uint128 l2_gas_price_fri = 16; + Uint128 l2_gas_price_wei = 17; + L1DataAvailabilityMode l1_data_availability_mode = 18; // for now, we assume a small consensus, so this fits in 1M. Else, these will be repeated and extracted from this message. - repeated ConsensusSignature signatures = 17; + repeated ConsensusSignature signatures = 19; // can be more explicit here about the signature structure as this is not part of account abstraction } diff --git a/p2p/spec/receipt.proto b/p2p/spec/receipt.proto index d9fd3d6dda..0ae7c7b511 100644 --- a/p2p/spec/receipt.proto +++ b/p2p/spec/receipt.proto @@ -39,7 +39,8 @@ message Receipt { uint32 memory_holes = 3; Felt252 l1_gas = 4; Felt252 l1_data_gas = 5; - Felt252 total_l1_gas = 6; + Felt252 l2_gas = 6; + Felt252 total_l1_gas = 7; } message Common { diff --git a/p2p/spec/transaction.proto b/p2p/spec/transaction.proto index 8d35195e2e..f0240307f6 100644 --- a/p2p/spec/transaction.proto +++ b/p2p/spec/transaction.proto @@ -11,7 +11,10 @@ message ResourceLimits { message ResourceBounds { ResourceLimits l1_gas = 1; - ResourceLimits l2_gas = 2; + // This can be None only in transactions that don't support l2 gas. + // Starting from 0.14.0, MempoolTransaction and ConsensusTransaction shouldn't have None here. + optional ResourceLimits l1_data_gas = 2; + ResourceLimits l2_gas = 3; } message AccountSignature { From fabb51efb8cda66eab022291af18fac005a9110e Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Mon, 13 Jan 2025 11:29:28 +0300 Subject: [PATCH 20/34] Regenerate buf --- p2p/gen/class.pb.go | 2 +- p2p/gen/common.pb.go | 2 +- p2p/gen/event.pb.go | 2 +- p2p/gen/header.pb.go | 179 +++++---- p2p/gen/receipt.pb.go | 185 +++++----- p2p/gen/state.pb.go | 2 +- p2p/gen/transaction.pb.go | 760 +++++++++++++++++++------------------- 7 files changed, 592 insertions(+), 540 deletions(-) diff --git a/p2p/gen/class.pb.go b/p2p/gen/class.pb.go index 12937ec6be..f24e1ff989 100644 --- a/p2p/gen/class.pb.go +++ b/p2p/gen/class.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.0 +// protoc-gen-go v1.36.2 // protoc (unknown) // source: class.proto diff --git a/p2p/gen/common.pb.go b/p2p/gen/common.pb.go index 4ac4472347..bfd7c64e6d 100644 --- a/p2p/gen/common.pb.go +++ b/p2p/gen/common.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.0 +// protoc-gen-go v1.36.2 // protoc (unknown) // source: common.proto diff --git a/p2p/gen/event.pb.go b/p2p/gen/event.pb.go index 7aa6874e7d..9daf64a07a 100644 --- a/p2p/gen/event.pb.go +++ b/p2p/gen/event.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.0 +// protoc-gen-go v1.36.2 // protoc (unknown) // source: event.proto diff --git a/p2p/gen/header.pb.go b/p2p/gen/header.pb.go index 3723091acf..6d2eef53f6 100644 --- a/p2p/gen/header.pb.go +++ b/p2p/gen/header.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.0 +// protoc-gen-go v1.36.2 // protoc (unknown) // source: header.proto @@ -37,13 +37,15 @@ type SignedBlockHeader struct { Events *Patricia `protobuf:"bytes,9,opt,name=events,proto3" json:"events,omitempty"` // By order of issuance. TBD: in receipts? Receipts *Hash `protobuf:"bytes,10,opt,name=receipts,proto3" json:"receipts,omitempty"` // By order of issuance. This is a patricia root. No need for length because it's the same length as transactions. ProtocolVersion string `protobuf:"bytes,11,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` // Starknet version - GasPriceFri *Uint128 `protobuf:"bytes,12,opt,name=gas_price_fri,json=gasPriceFri,proto3" json:"gas_price_fri,omitempty"` - GasPriceWei *Uint128 `protobuf:"bytes,13,opt,name=gas_price_wei,json=gasPriceWei,proto3" json:"gas_price_wei,omitempty"` - DataGasPriceFri *Uint128 `protobuf:"bytes,14,opt,name=data_gas_price_fri,json=dataGasPriceFri,proto3" json:"data_gas_price_fri,omitempty"` - DataGasPriceWei *Uint128 `protobuf:"bytes,15,opt,name=data_gas_price_wei,json=dataGasPriceWei,proto3" json:"data_gas_price_wei,omitempty"` - L1DataAvailabilityMode L1DataAvailabilityMode `protobuf:"varint,16,opt,name=l1_data_availability_mode,json=l1DataAvailabilityMode,proto3,enum=L1DataAvailabilityMode" json:"l1_data_availability_mode,omitempty"` + L1GasPriceFri *Uint128 `protobuf:"bytes,12,opt,name=l1_gas_price_fri,json=l1GasPriceFri,proto3" json:"l1_gas_price_fri,omitempty"` + L1GasPriceWei *Uint128 `protobuf:"bytes,13,opt,name=l1_gas_price_wei,json=l1GasPriceWei,proto3" json:"l1_gas_price_wei,omitempty"` + L1DataGasPriceFri *Uint128 `protobuf:"bytes,14,opt,name=l1_data_gas_price_fri,json=l1DataGasPriceFri,proto3" json:"l1_data_gas_price_fri,omitempty"` + L1DataGasPriceWei *Uint128 `protobuf:"bytes,15,opt,name=l1_data_gas_price_wei,json=l1DataGasPriceWei,proto3" json:"l1_data_gas_price_wei,omitempty"` + L2GasPriceFri *Uint128 `protobuf:"bytes,16,opt,name=l2_gas_price_fri,json=l2GasPriceFri,proto3" json:"l2_gas_price_fri,omitempty"` + L2GasPriceWei *Uint128 `protobuf:"bytes,17,opt,name=l2_gas_price_wei,json=l2GasPriceWei,proto3" json:"l2_gas_price_wei,omitempty"` + L1DataAvailabilityMode L1DataAvailabilityMode `protobuf:"varint,18,opt,name=l1_data_availability_mode,json=l1DataAvailabilityMode,proto3,enum=L1DataAvailabilityMode" json:"l1_data_availability_mode,omitempty"` // for now, we assume a small consensus, so this fits in 1M. Else, these will be repeated and extracted from this message. - Signatures []*ConsensusSignature `protobuf:"bytes,17,rep,name=signatures,proto3" json:"signatures,omitempty"` // can be more explicit here about the signature structure as this is not part of account abstraction + Signatures []*ConsensusSignature `protobuf:"bytes,19,rep,name=signatures,proto3" json:"signatures,omitempty"` // can be more explicit here about the signature structure as this is not part of account abstraction unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -155,30 +157,44 @@ func (x *SignedBlockHeader) GetProtocolVersion() string { return "" } -func (x *SignedBlockHeader) GetGasPriceFri() *Uint128 { +func (x *SignedBlockHeader) GetL1GasPriceFri() *Uint128 { if x != nil { - return x.GasPriceFri + return x.L1GasPriceFri } return nil } -func (x *SignedBlockHeader) GetGasPriceWei() *Uint128 { +func (x *SignedBlockHeader) GetL1GasPriceWei() *Uint128 { if x != nil { - return x.GasPriceWei + return x.L1GasPriceWei } return nil } -func (x *SignedBlockHeader) GetDataGasPriceFri() *Uint128 { +func (x *SignedBlockHeader) GetL1DataGasPriceFri() *Uint128 { if x != nil { - return x.DataGasPriceFri + return x.L1DataGasPriceFri } return nil } -func (x *SignedBlockHeader) GetDataGasPriceWei() *Uint128 { +func (x *SignedBlockHeader) GetL1DataGasPriceWei() *Uint128 { if x != nil { - return x.DataGasPriceWei + return x.L1DataGasPriceWei + } + return nil +} + +func (x *SignedBlockHeader) GetL2GasPriceFri() *Uint128 { + if x != nil { + return x.L2GasPriceFri + } + return nil +} + +func (x *SignedBlockHeader) GetL2GasPriceWei() *Uint128 { + if x != nil { + return x.L2GasPriceWei } return nil } @@ -456,7 +472,7 @@ var File_header_proto protoreflect.FileDescriptor var file_header_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x06, 0x0a, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x07, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x62, @@ -486,51 +502,58 @@ var file_header_proto_rawDesc = []byte{ 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x0d, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x5f, 0x66, 0x72, 0x69, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x55, 0x69, 0x6e, - 0x74, 0x31, 0x32, 0x38, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x46, 0x72, - 0x69, 0x12, 0x2c, 0x0a, 0x0d, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x77, - 0x65, 0x69, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, - 0x32, 0x38, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x57, 0x65, 0x69, 0x12, - 0x35, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x5f, 0x66, 0x72, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x55, 0x69, - 0x6e, 0x74, 0x31, 0x32, 0x38, 0x52, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x46, 0x72, 0x69, 0x12, 0x35, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, - 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, 0x52, 0x0f, 0x64, 0x61, - 0x74, 0x61, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x57, 0x65, 0x69, 0x12, 0x52, 0x0a, - 0x19, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x17, 0x2e, 0x4c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x16, 0x6c, 0x31, 0x44, 0x61, 0x74, - 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x65, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, - 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, - 0x0c, 0x0a, 0x0a, 0x6d, 0x61, 0x79, 0x62, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x22, 0x3f, 0x0a, - 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, - 0x0a, 0x14, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x03, 0x66, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x04, 0x2e, 0x46, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x66, 0x69, 0x6e, 0x42, 0x10, - 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x22, 0x22, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x70, - 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x64, 0x45, 0x74, 0x68, - 0x2f, 0x6a, 0x75, 0x6e, 0x6f, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x66, 0x72, 0x69, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, 0x52, 0x0d, 0x6c, 0x31, 0x47, 0x61, 0x73, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x46, 0x72, 0x69, 0x12, 0x31, 0x0a, 0x10, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, + 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x08, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, 0x52, 0x0d, 0x6c, 0x31, 0x47, 0x61, + 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x57, 0x65, 0x69, 0x12, 0x3a, 0x0a, 0x15, 0x6c, 0x31, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x66, + 0x72, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, + 0x32, 0x38, 0x52, 0x11, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x46, 0x72, 0x69, 0x12, 0x3a, 0x0a, 0x15, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, 0x52, 0x11, + 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x57, 0x65, + 0x69, 0x12, 0x31, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x5f, 0x66, 0x72, 0x69, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x55, 0x69, + 0x6e, 0x74, 0x31, 0x32, 0x38, 0x52, 0x0d, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x46, 0x72, 0x69, 0x12, 0x31, 0x0a, 0x10, 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, + 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, 0x52, 0x0d, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x57, 0x65, 0x69, 0x12, 0x52, 0x0a, 0x19, 0x6c, 0x31, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x4c, 0x31, 0x44, + 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, + 0x6f, 0x64, 0x65, 0x52, 0x16, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x22, 0x65, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x49, 0x44, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x0a, 0x6d, 0x61, 0x79, + 0x62, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x22, 0x3f, 0x0a, 0x13, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, + 0x0a, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x69, + 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x70, 0x0a, 0x14, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2c, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, + 0x0a, 0x03, 0x66, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x46, 0x69, + 0x6e, 0x48, 0x00, 0x52, 0x03, 0x66, 0x69, 0x6e, 0x42, 0x10, 0x0a, 0x0e, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x27, + 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x64, 0x45, 0x74, 0x68, 0x2f, 0x6a, 0x75, 0x6e, 0x6f, 0x2f, + 0x70, 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -572,22 +595,24 @@ var file_header_proto_depIdxs = []int32{ 8, // 5: SignedBlockHeader.transactions:type_name -> Patricia 8, // 6: SignedBlockHeader.events:type_name -> Patricia 5, // 7: SignedBlockHeader.receipts:type_name -> Hash - 9, // 8: SignedBlockHeader.gas_price_fri:type_name -> Uint128 - 9, // 9: SignedBlockHeader.gas_price_wei:type_name -> Uint128 - 9, // 10: SignedBlockHeader.data_gas_price_fri:type_name -> Uint128 - 9, // 11: SignedBlockHeader.data_gas_price_wei:type_name -> Uint128 - 10, // 12: SignedBlockHeader.l1_data_availability_mode:type_name -> L1DataAvailabilityMode - 11, // 13: SignedBlockHeader.signatures:type_name -> ConsensusSignature - 12, // 14: NewBlock.id:type_name -> BlockID - 3, // 15: NewBlock.header:type_name -> BlockHeadersResponse - 13, // 16: BlockHeadersRequest.iteration:type_name -> Iteration - 0, // 17: BlockHeadersResponse.header:type_name -> SignedBlockHeader - 14, // 18: BlockHeadersResponse.fin:type_name -> Fin - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 9, // 8: SignedBlockHeader.l1_gas_price_fri:type_name -> Uint128 + 9, // 9: SignedBlockHeader.l1_gas_price_wei:type_name -> Uint128 + 9, // 10: SignedBlockHeader.l1_data_gas_price_fri:type_name -> Uint128 + 9, // 11: SignedBlockHeader.l1_data_gas_price_wei:type_name -> Uint128 + 9, // 12: SignedBlockHeader.l2_gas_price_fri:type_name -> Uint128 + 9, // 13: SignedBlockHeader.l2_gas_price_wei:type_name -> Uint128 + 10, // 14: SignedBlockHeader.l1_data_availability_mode:type_name -> L1DataAvailabilityMode + 11, // 15: SignedBlockHeader.signatures:type_name -> ConsensusSignature + 12, // 16: NewBlock.id:type_name -> BlockID + 3, // 17: NewBlock.header:type_name -> BlockHeadersResponse + 13, // 18: BlockHeadersRequest.iteration:type_name -> Iteration + 0, // 19: BlockHeadersResponse.header:type_name -> SignedBlockHeader + 14, // 20: BlockHeadersResponse.fin:type_name -> Fin + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_header_proto_init() } diff --git a/p2p/gen/receipt.pb.go b/p2p/gen/receipt.pb.go index 9d3d970985..c02b9685ee 100644 --- a/p2p/gen/receipt.pb.go +++ b/p2p/gen/receipt.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.0 +// protoc-gen-go v1.36.2 // protoc (unknown) // source: receipt.proto @@ -307,7 +307,8 @@ type Receipt_ExecutionResources struct { MemoryHoles uint32 `protobuf:"varint,3,opt,name=memory_holes,json=memoryHoles,proto3" json:"memory_holes,omitempty"` L1Gas *Felt252 `protobuf:"bytes,4,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` L1DataGas *Felt252 `protobuf:"bytes,5,opt,name=l1_data_gas,json=l1DataGas,proto3" json:"l1_data_gas,omitempty"` - TotalL1Gas *Felt252 `protobuf:"bytes,6,opt,name=total_l1_gas,json=totalL1Gas,proto3" json:"total_l1_gas,omitempty"` + L2Gas *Felt252 `protobuf:"bytes,6,opt,name=l2_gas,json=l2Gas,proto3" json:"l2_gas,omitempty"` + TotalL1Gas *Felt252 `protobuf:"bytes,7,opt,name=total_l1_gas,json=totalL1Gas,proto3" json:"total_l1_gas,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -377,6 +378,13 @@ func (x *Receipt_ExecutionResources) GetL1DataGas() *Felt252 { return nil } +func (x *Receipt_ExecutionResources) GetL2Gas() *Felt252 { + if x != nil { + return x.L2Gas + } + return nil +} + func (x *Receipt_ExecutionResources) GetTotalL1Gas() *Felt252 { if x != nil { return x.TotalL1Gas @@ -844,7 +852,7 @@ var file_receipt_proto_rawDesc = []byte{ 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x2d, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x9c, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xbd, 0x0c, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x48, 0x00, 0x52, 0x06, 0x69, @@ -862,7 +870,7 @@ var file_receipt_proto_rawDesc = []byte{ 0x6f, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xc4, 0x04, 0x0a, 0x12, 0x45, 0x78, + 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xe5, 0x04, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x45, 0x78, 0x65, @@ -876,78 +884,80 @@ var file_receipt_proto_rawDesc = []byte{ 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6c, 0x31, 0x47, 0x61, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, - 0x32, 0x52, 0x09, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x0c, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0a, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x4c, 0x31, 0x47, 0x61, 0x73, 0x1a, 0xb5, 0x02, 0x0a, 0x0e, 0x42, 0x75, 0x69, - 0x6c, 0x74, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, - 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x69, - 0x74, 0x77, 0x69, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x63, 0x64, 0x73, 0x61, 0x12, 0x13, 0x0a, 0x05, 0x65, - 0x63, 0x5f, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x65, 0x63, 0x4f, 0x70, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x08, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x63, - 0x63, 0x61, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6b, 0x65, 0x63, 0x63, 0x61, - 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x5f, 0x6d, 0x6f, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x61, 0x64, 0x64, 0x4d, - 0x6f, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x75, 0x6c, 0x5f, 0x6d, 0x6f, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x75, 0x6c, 0x4d, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x39, 0x36, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x39, 0x36, - 0x1a, 0x99, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0a, 0x61, - 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, 0x61, - 0x6c, 0x46, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x6e, - 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x55, 0x6e, 0x69, 0x74, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, - 0x31, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x54, 0x6f, 0x4c, 0x31, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, - 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x12, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, - 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, - 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x1a, 0x31, 0x0a, 0x06, - 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x32, 0x52, 0x09, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x06, + 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, + 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x12, 0x2a, 0x0a, + 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0a, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x31, 0x47, 0x61, 0x73, 0x1a, 0xb5, 0x02, 0x0a, 0x0e, 0x42, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, + 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x63, 0x64, 0x73, 0x61, 0x12, 0x13, 0x0a, 0x05, + 0x65, 0x63, 0x5f, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x65, 0x63, 0x4f, + 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x12, 0x1f, 0x0a, + 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x08, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, + 0x63, 0x63, 0x61, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6b, 0x65, 0x63, 0x63, + 0x61, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x61, 0x64, 0x64, + 0x4d, 0x6f, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x75, 0x6c, 0x5f, 0x6d, 0x6f, 0x64, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x75, 0x6c, 0x4d, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x39, 0x36, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x39, + 0x36, 0x1a, 0x99, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0a, + 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, + 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x75, + 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, + 0x12, 0x31, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x4c, 0x31, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, + 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x12, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, + 0x72, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, + 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x1a, 0x31, 0x0a, + 0x06, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x1a, 0x59, 0x0a, 0x09, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x32, + 0x35, 0x36, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x68, 0x1a, 0x32, 0x0a, 0x07, 0x44, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, - 0x59, 0x0a, 0x09, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x32, 0x35, - 0x36, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x68, 0x1a, 0x32, 0x0a, 0x07, 0x44, 0x65, - 0x63, 0x6c, 0x61, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x66, - 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x66, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, + 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x6d, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x6d, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, - 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x12, 0x33, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, - 0x74, 0x32, 0x35, 0x32, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x1d, 0x0a, - 0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x65, - 0x69, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x72, 0x69, 0x10, 0x01, 0x42, 0x27, 0x5a, 0x25, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x64, 0x45, 0x74, 0x68, 0x2f, 0x6a, 0x75, 0x6e, 0x6f, 0x2f, 0x70, 0x32, - 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x1d, + 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x57, + 0x65, 0x69, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x72, 0x69, 0x10, 0x01, 0x42, 0x27, 0x5a, + 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x64, 0x45, 0x74, 0x68, 0x2f, 0x6a, 0x75, 0x6e, 0x6f, 0x2f, 0x70, + 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -992,24 +1002,25 @@ var file_receipt_proto_depIdxs = []int32{ 11, // 8: Receipt.ExecutionResources.builtins:type_name -> Receipt.ExecutionResources.BuiltinCounter 12, // 9: Receipt.ExecutionResources.l1_gas:type_name -> Felt252 12, // 10: Receipt.ExecutionResources.l1_data_gas:type_name -> Felt252 - 12, // 11: Receipt.ExecutionResources.total_l1_gas:type_name -> Felt252 - 12, // 12: Receipt.Common.actual_fee:type_name -> Felt252 - 0, // 13: Receipt.Common.price_unit:type_name -> PriceUnit - 1, // 14: Receipt.Common.messages_sent:type_name -> MessageToL1 - 4, // 15: Receipt.Common.execution_resources:type_name -> Receipt.ExecutionResources - 5, // 16: Receipt.Invoke.common:type_name -> Receipt.Common - 5, // 17: Receipt.L1Handler.common:type_name -> Receipt.Common - 13, // 18: Receipt.L1Handler.msg_hash:type_name -> Hash256 - 5, // 19: Receipt.Declare.common:type_name -> Receipt.Common - 5, // 20: Receipt.Deploy.common:type_name -> Receipt.Common - 12, // 21: Receipt.Deploy.contract_address:type_name -> Felt252 - 5, // 22: Receipt.DeployAccount.common:type_name -> Receipt.Common - 12, // 23: Receipt.DeployAccount.contract_address:type_name -> Felt252 - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 12, // 11: Receipt.ExecutionResources.l2_gas:type_name -> Felt252 + 12, // 12: Receipt.ExecutionResources.total_l1_gas:type_name -> Felt252 + 12, // 13: Receipt.Common.actual_fee:type_name -> Felt252 + 0, // 14: Receipt.Common.price_unit:type_name -> PriceUnit + 1, // 15: Receipt.Common.messages_sent:type_name -> MessageToL1 + 4, // 16: Receipt.Common.execution_resources:type_name -> Receipt.ExecutionResources + 5, // 17: Receipt.Invoke.common:type_name -> Receipt.Common + 5, // 18: Receipt.L1Handler.common:type_name -> Receipt.Common + 13, // 19: Receipt.L1Handler.msg_hash:type_name -> Hash256 + 5, // 20: Receipt.Declare.common:type_name -> Receipt.Common + 5, // 21: Receipt.Deploy.common:type_name -> Receipt.Common + 12, // 22: Receipt.Deploy.contract_address:type_name -> Felt252 + 5, // 23: Receipt.DeployAccount.common:type_name -> Receipt.Common + 12, // 24: Receipt.DeployAccount.contract_address:type_name -> Felt252 + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_receipt_proto_init() } diff --git a/p2p/gen/state.pb.go b/p2p/gen/state.pb.go index 381f7b42b0..d35cee3e07 100644 --- a/p2p/gen/state.pb.go +++ b/p2p/gen/state.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.0 +// protoc-gen-go v1.36.2 // protoc (unknown) // source: state.proto diff --git a/p2p/gen/transaction.pb.go b/p2p/gen/transaction.pb.go index ed5487ea0d..a969c4960c 100644 --- a/p2p/gen/transaction.pb.go +++ b/p2p/gen/transaction.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.0 +// protoc-gen-go v1.36.2 // protoc (unknown) // source: transaction.proto @@ -73,9 +73,12 @@ func (x *ResourceLimits) GetMaxPricePerUnit() *Felt252 { } type ResourceBounds struct { - state protoimpl.MessageState `protogen:"open.v1"` - L1Gas *ResourceLimits `protobuf:"bytes,1,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` - L2Gas *ResourceLimits `protobuf:"bytes,2,opt,name=l2_gas,json=l2Gas,proto3" json:"l2_gas,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + L1Gas *ResourceLimits `protobuf:"bytes,1,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` + // This can be None only in transactions that don't support l2 gas. + // Starting from 0.14.0, MempoolTransaction and ConsensusTransaction shouldn't have None here. + L1DataGas *ResourceLimits `protobuf:"bytes,2,opt,name=l1_data_gas,json=l1DataGas,proto3,oneof" json:"l1_data_gas,omitempty"` + L2Gas *ResourceLimits `protobuf:"bytes,3,opt,name=l2_gas,json=l2Gas,proto3" json:"l2_gas,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -117,6 +120,13 @@ func (x *ResourceBounds) GetL1Gas() *ResourceLimits { return nil } +func (x *ResourceBounds) GetL1DataGas() *ResourceLimits { + if x != nil { + return x.L1DataGas + } + return nil +} + func (x *ResourceBounds) GetL2Gas() *ResourceLimits { if x != nil { return x.L2Gas @@ -1602,293 +1612,297 @@ var file_transaction_proto_rawDesc = []byte{ 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x69, 0x63, 0x65, 0x50, 0x65, 0x72, 0x55, 0x6e, - 0x69, 0x74, 0x22, 0x60, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, - 0x75, 0x6e, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x05, 0x6c, 0x31, 0x47, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x06, - 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x05, 0x6c, - 0x32, 0x47, 0x61, 0x73, 0x22, 0x32, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, - 0x32, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x22, 0x85, 0x1f, 0x0a, 0x0b, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6c, - 0x61, 0x72, 0x65, 0x5f, 0x76, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x54, + 0x69, 0x74, 0x22, 0xa6, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x05, 0x6c, 0x31, 0x47, 0x61, 0x73, 0x12, 0x34, 0x0a, + 0x0b, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x73, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x06, 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x52, 0x05, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, + 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x22, 0x32, 0x0a, 0x10, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x1e, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, + 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x22, + 0x85, 0x1f, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x37, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x76, 0x30, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x30, 0x48, 0x00, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x30, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x5f, 0x76, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, - 0x72, 0x65, 0x56, 0x30, 0x48, 0x00, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, - 0x30, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x76, 0x31, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, - 0x09, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x31, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x65, - 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x76, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x72, 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, + 0x31, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x76, 0x32, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x32, 0x48, 0x00, 0x52, + 0x09, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x32, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x76, 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, - 0x6c, 0x61, 0x72, 0x65, 0x56, 0x32, 0x48, 0x00, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, - 0x65, 0x56, 0x32, 0x12, 0x37, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x5f, 0x76, - 0x33, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x33, 0x48, - 0x00, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x33, 0x12, 0x2d, 0x0a, 0x06, - 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x4a, 0x0a, 0x11, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x76, 0x31, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x56, 0x31, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x31, 0x12, 0x4a, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x76, 0x33, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x33, - 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x56, 0x33, 0x12, 0x34, 0x0a, 0x09, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x76, 0x30, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x30, 0x48, 0x00, 0x52, - 0x08, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x30, 0x12, 0x34, 0x0a, 0x09, 0x69, 0x6e, 0x76, - 0x6f, 0x6b, 0x65, 0x5f, 0x76, 0x31, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, - 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x31, 0x12, - 0x34, 0x0a, 0x09, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x76, 0x33, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x33, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x76, - 0x6f, 0x6b, 0x65, 0x56, 0x33, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x31, 0x5f, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x56, 0x30, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, - 0x12, 0x30, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, - 0x68, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, - 0x73, 0x68, 0x1a, 0xa7, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x30, - 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x06, 0x6d, - 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, - 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x1a, 0xc7, 0x01, 0x0a, - 0x09, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x31, 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x07, - 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, - 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x1a, 0xfe, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6c, 0x61, - 0x72, 0x65, 0x56, 0x32, 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, - 0x32, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x12, 0x35, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, - 0x48, 0x61, 0x73, 0x68, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x1a, 0xba, 0x04, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6c, - 0x61, 0x72, 0x65, 0x56, 0x33, 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, - 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, - 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, - 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, - 0x73, 0x68, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, - 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x38, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, - 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, - 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x74, 0x69, - 0x70, 0x12, 0x2f, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, - 0x32, 0x35, 0x32, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x40, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x64, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x15, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, - 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x19, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, - 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x17, 0x66, 0x65, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x4d, 0x6f, 0x64, 0x65, 0x1a, 0x9b, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, - 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x6c, 0x61, 0x72, 0x65, 0x56, 0x33, 0x48, 0x00, 0x52, 0x09, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, + 0x65, 0x56, 0x33, 0x12, 0x2d, 0x0a, 0x06, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x12, 0x4a, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x76, 0x31, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x31, 0x48, 0x00, 0x52, 0x0f, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x31, 0x12, 0x4a, + 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x76, 0x33, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x33, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x33, 0x12, 0x34, 0x0a, 0x09, 0x69, 0x6e, + 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x76, 0x30, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x56, 0x30, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x30, + 0x12, 0x34, 0x0a, 0x09, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x76, 0x31, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, + 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x31, 0x12, 0x34, 0x0a, 0x09, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, + 0x5f, 0x76, 0x33, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x33, + 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x33, 0x12, 0x39, 0x0a, 0x0a, + 0x6c, 0x31, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, + 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x56, 0x30, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x31, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x1a, 0xa7, 0x01, 0x0a, 0x09, 0x44, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x30, 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x07, 0x6d, 0x61, 0x78, + 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, + 0x74, 0x32, 0x35, 0x32, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, + 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, + 0x61, 0x73, 0x68, 0x1a, 0xc7, 0x01, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, + 0x31, 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x06, + 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, + 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, + 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x1a, 0xfe, 0x01, + 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x32, 0x12, 0x20, 0x0a, 0x06, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, + 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, + 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, + 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x11, 0x63, 0x6f, 0x6d, + 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x1a, 0xba, + 0x04, 0x0a, 0x09, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x56, 0x33, 0x12, 0x20, 0x0a, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2f, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, + 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, + 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x38, 0x0a, 0x0f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x2f, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, + 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, + 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x17, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, + 0x74, 0x32, 0x35, 0x32, 0x52, 0x15, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x1c, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, + 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x1a, 0x9b, 0x01, 0x0a, 0x06, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, + 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x0c, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0b, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x61, 0x6c, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, + 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0xfe, 0x01, 0x0a, 0x0f, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x31, 0x12, 0x21, 0x0a, + 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, + 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, + 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x61, 0x6c, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, + 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xf8, 0x03, 0x0a, 0x0f, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x33, 0x12, 0x2f, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x61, - 0x6c, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x6c, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, - 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x1a, 0xfe, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x31, 0x12, 0x21, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, - 0x32, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x12, 0x2b, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, - 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x61, 0x6c, 0x74, 0x12, 0x24, 0x0a, - 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, - 0x61, 0x74, 0x61, 0x1a, 0xf8, 0x03, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x33, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x0a, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, - 0x61, 0x73, 0x68, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, - 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x2b, - 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0b, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x61, 0x6c, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x63, - 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x38, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, - 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x2f, 0x0a, - 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, - 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x50, - 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, - 0x12, 0x4c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, - 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x1a, 0xe4, - 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x30, 0x12, 0x21, 0x0a, 0x07, 0x6d, - 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, + 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, + 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, + 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x03, 0x74, 0x69, 0x70, 0x12, 0x2f, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, + 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, + 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x19, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, + 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x17, 0x66, 0x65, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x1a, 0xe4, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, + 0x56, 0x30, 0x12, 0x21, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x06, 0x6d, + 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x14, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, + 0x35, 0x32, 0x52, 0x12, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, + 0x35, 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xc6, 0x01, 0x0a, + 0x08, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x31, 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x07, 0x6d, + 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x2f, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, - 0x22, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x14, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x12, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, - 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, - 0x6c, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xc6, 0x01, 0x0a, 0x08, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, - 0x56, 0x31, 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x1a, 0x82, 0x04, 0x0a, 0x08, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, + 0x56, 0x33, 0x12, 0x20, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, - 0x06, 0x6d, 0x61, 0x78, 0x46, 0x65, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, - 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, - 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x1a, 0x82, - 0x04, 0x0a, 0x08, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x56, 0x33, 0x12, 0x20, 0x0a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, - 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, - 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x74, 0x69, 0x70, - 0x12, 0x2f, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, - 0x35, 0x32, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x40, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x15, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x1c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, - 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x1a, 0xb3, 0x01, 0x0a, 0x0b, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x56, 0x30, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x14, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, - 0x12, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, - 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x42, 0x05, 0x0a, 0x03, 0x74, 0x78, 0x6e, - 0x22, 0x6c, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, - 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x07, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x22, 0x3f, - 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x9c, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x18, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x18, 0x0a, - 0x03, 0x66, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x46, 0x69, 0x6e, - 0x48, 0x00, 0x52, 0x03, 0x66, 0x69, 0x6e, 0x42, 0x15, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x40, - 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, - 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x64, 0x45, 0x74, 0x68, 0x2f, 0x6a, 0x75, 0x6e, - 0x6f, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, + 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x0f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x03, 0x74, 0x69, 0x70, 0x12, 0x2f, 0x0a, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x61, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x6d, 0x61, + 0x73, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, + 0x32, 0x35, 0x32, 0x52, 0x15, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x1c, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x52, 0x19, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x1a, + 0x66, 0x65, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x52, 0x17, 0x66, 0x65, 0x65, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, + 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x1a, 0xb3, 0x01, 0x0a, 0x0b, 0x4c, + 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x56, 0x30, 0x12, 0x1e, 0x0a, 0x05, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, + 0x32, 0x35, 0x32, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, + 0x0a, 0x14, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, + 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x12, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x61, + 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, + 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, + 0x42, 0x05, 0x0a, 0x03, 0x74, 0x78, 0x6e, 0x22, 0x6c, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x22, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x07, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x22, 0x3f, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x09, + 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x69, 0x74, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x01, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x53, 0x0a, 0x18, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, + 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, + 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x00, 0x52, 0x16, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x12, 0x18, 0x0a, 0x03, 0x66, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x04, 0x2e, 0x46, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x66, 0x69, 0x6e, 0x42, 0x15, + 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x40, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x64, + 0x45, 0x74, 0x68, 0x2f, 0x6a, 0x75, 0x6e, 0x6f, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1936,97 +1950,98 @@ var file_transaction_proto_depIdxs = []int32{ 19, // 0: ResourceLimits.max_amount:type_name -> Felt252 19, // 1: ResourceLimits.max_price_per_unit:type_name -> Felt252 0, // 2: ResourceBounds.l1_gas:type_name -> ResourceLimits - 0, // 3: ResourceBounds.l2_gas:type_name -> ResourceLimits - 19, // 4: AccountSignature.parts:type_name -> Felt252 - 8, // 5: Transaction.declare_v0:type_name -> Transaction.DeclareV0 - 9, // 6: Transaction.declare_v1:type_name -> Transaction.DeclareV1 - 10, // 7: Transaction.declare_v2:type_name -> Transaction.DeclareV2 - 11, // 8: Transaction.declare_v3:type_name -> Transaction.DeclareV3 - 12, // 9: Transaction.deploy:type_name -> Transaction.Deploy - 13, // 10: Transaction.deploy_account_v1:type_name -> Transaction.DeployAccountV1 - 14, // 11: Transaction.deploy_account_v3:type_name -> Transaction.DeployAccountV3 - 15, // 12: Transaction.invoke_v0:type_name -> Transaction.InvokeV0 - 16, // 13: Transaction.invoke_v1:type_name -> Transaction.InvokeV1 - 17, // 14: Transaction.invoke_v3:type_name -> Transaction.InvokeV3 - 18, // 15: Transaction.l1_handler:type_name -> Transaction.L1HandlerV0 - 20, // 16: Transaction.transaction_hash:type_name -> Hash - 3, // 17: TransactionWithReceipt.transaction:type_name -> Transaction - 21, // 18: TransactionWithReceipt.receipt:type_name -> Receipt - 22, // 19: TransactionsRequest.iteration:type_name -> Iteration - 4, // 20: TransactionsResponse.transaction_with_receipt:type_name -> TransactionWithReceipt - 23, // 21: TransactionsResponse.fin:type_name -> Fin - 3, // 22: Transactions.transactions:type_name -> Transaction - 24, // 23: Transaction.DeclareV0.sender:type_name -> Address - 19, // 24: Transaction.DeclareV0.max_fee:type_name -> Felt252 - 2, // 25: Transaction.DeclareV0.signature:type_name -> AccountSignature - 20, // 26: Transaction.DeclareV0.class_hash:type_name -> Hash - 24, // 27: Transaction.DeclareV1.sender:type_name -> Address - 19, // 28: Transaction.DeclareV1.max_fee:type_name -> Felt252 - 2, // 29: Transaction.DeclareV1.signature:type_name -> AccountSignature - 20, // 30: Transaction.DeclareV1.class_hash:type_name -> Hash - 19, // 31: Transaction.DeclareV1.nonce:type_name -> Felt252 - 24, // 32: Transaction.DeclareV2.sender:type_name -> Address - 19, // 33: Transaction.DeclareV2.max_fee:type_name -> Felt252 - 2, // 34: Transaction.DeclareV2.signature:type_name -> AccountSignature - 20, // 35: Transaction.DeclareV2.class_hash:type_name -> Hash - 19, // 36: Transaction.DeclareV2.nonce:type_name -> Felt252 - 20, // 37: Transaction.DeclareV2.compiled_class_hash:type_name -> Hash - 24, // 38: Transaction.DeclareV3.sender:type_name -> Address - 2, // 39: Transaction.DeclareV3.signature:type_name -> AccountSignature - 20, // 40: Transaction.DeclareV3.class_hash:type_name -> Hash - 19, // 41: Transaction.DeclareV3.nonce:type_name -> Felt252 - 20, // 42: Transaction.DeclareV3.compiled_class_hash:type_name -> Hash - 1, // 43: Transaction.DeclareV3.resource_bounds:type_name -> ResourceBounds - 19, // 44: Transaction.DeclareV3.paymaster_data:type_name -> Felt252 - 19, // 45: Transaction.DeclareV3.account_deployment_data:type_name -> Felt252 - 25, // 46: Transaction.DeclareV3.nonce_data_availability_mode:type_name -> VolitionDomain - 25, // 47: Transaction.DeclareV3.fee_data_availability_mode:type_name -> VolitionDomain - 20, // 48: Transaction.Deploy.class_hash:type_name -> Hash - 19, // 49: Transaction.Deploy.address_salt:type_name -> Felt252 - 19, // 50: Transaction.Deploy.calldata:type_name -> Felt252 - 19, // 51: Transaction.DeployAccountV1.max_fee:type_name -> Felt252 - 2, // 52: Transaction.DeployAccountV1.signature:type_name -> AccountSignature - 20, // 53: Transaction.DeployAccountV1.class_hash:type_name -> Hash - 19, // 54: Transaction.DeployAccountV1.nonce:type_name -> Felt252 - 19, // 55: Transaction.DeployAccountV1.address_salt:type_name -> Felt252 - 19, // 56: Transaction.DeployAccountV1.calldata:type_name -> Felt252 - 2, // 57: Transaction.DeployAccountV3.signature:type_name -> AccountSignature - 20, // 58: Transaction.DeployAccountV3.class_hash:type_name -> Hash - 19, // 59: Transaction.DeployAccountV3.nonce:type_name -> Felt252 - 19, // 60: Transaction.DeployAccountV3.address_salt:type_name -> Felt252 - 19, // 61: Transaction.DeployAccountV3.calldata:type_name -> Felt252 - 1, // 62: Transaction.DeployAccountV3.resource_bounds:type_name -> ResourceBounds - 19, // 63: Transaction.DeployAccountV3.paymaster_data:type_name -> Felt252 - 25, // 64: Transaction.DeployAccountV3.nonce_data_availability_mode:type_name -> VolitionDomain - 25, // 65: Transaction.DeployAccountV3.fee_data_availability_mode:type_name -> VolitionDomain - 19, // 66: Transaction.InvokeV0.max_fee:type_name -> Felt252 - 2, // 67: Transaction.InvokeV0.signature:type_name -> AccountSignature - 24, // 68: Transaction.InvokeV0.address:type_name -> Address - 19, // 69: Transaction.InvokeV0.entry_point_selector:type_name -> Felt252 - 19, // 70: Transaction.InvokeV0.calldata:type_name -> Felt252 - 24, // 71: Transaction.InvokeV1.sender:type_name -> Address - 19, // 72: Transaction.InvokeV1.max_fee:type_name -> Felt252 - 2, // 73: Transaction.InvokeV1.signature:type_name -> AccountSignature - 19, // 74: Transaction.InvokeV1.calldata:type_name -> Felt252 - 19, // 75: Transaction.InvokeV1.nonce:type_name -> Felt252 - 24, // 76: Transaction.InvokeV3.sender:type_name -> Address - 2, // 77: Transaction.InvokeV3.signature:type_name -> AccountSignature - 19, // 78: Transaction.InvokeV3.calldata:type_name -> Felt252 - 1, // 79: Transaction.InvokeV3.resource_bounds:type_name -> ResourceBounds - 19, // 80: Transaction.InvokeV3.paymaster_data:type_name -> Felt252 - 19, // 81: Transaction.InvokeV3.account_deployment_data:type_name -> Felt252 - 25, // 82: Transaction.InvokeV3.nonce_data_availability_mode:type_name -> VolitionDomain - 25, // 83: Transaction.InvokeV3.fee_data_availability_mode:type_name -> VolitionDomain - 19, // 84: Transaction.InvokeV3.nonce:type_name -> Felt252 - 19, // 85: Transaction.L1HandlerV0.nonce:type_name -> Felt252 - 24, // 86: Transaction.L1HandlerV0.address:type_name -> Address - 19, // 87: Transaction.L1HandlerV0.entry_point_selector:type_name -> Felt252 - 19, // 88: Transaction.L1HandlerV0.calldata:type_name -> Felt252 - 89, // [89:89] is the sub-list for method output_type - 89, // [89:89] is the sub-list for method input_type - 89, // [89:89] is the sub-list for extension type_name - 89, // [89:89] is the sub-list for extension extendee - 0, // [0:89] is the sub-list for field type_name + 0, // 3: ResourceBounds.l1_data_gas:type_name -> ResourceLimits + 0, // 4: ResourceBounds.l2_gas:type_name -> ResourceLimits + 19, // 5: AccountSignature.parts:type_name -> Felt252 + 8, // 6: Transaction.declare_v0:type_name -> Transaction.DeclareV0 + 9, // 7: Transaction.declare_v1:type_name -> Transaction.DeclareV1 + 10, // 8: Transaction.declare_v2:type_name -> Transaction.DeclareV2 + 11, // 9: Transaction.declare_v3:type_name -> Transaction.DeclareV3 + 12, // 10: Transaction.deploy:type_name -> Transaction.Deploy + 13, // 11: Transaction.deploy_account_v1:type_name -> Transaction.DeployAccountV1 + 14, // 12: Transaction.deploy_account_v3:type_name -> Transaction.DeployAccountV3 + 15, // 13: Transaction.invoke_v0:type_name -> Transaction.InvokeV0 + 16, // 14: Transaction.invoke_v1:type_name -> Transaction.InvokeV1 + 17, // 15: Transaction.invoke_v3:type_name -> Transaction.InvokeV3 + 18, // 16: Transaction.l1_handler:type_name -> Transaction.L1HandlerV0 + 20, // 17: Transaction.transaction_hash:type_name -> Hash + 3, // 18: TransactionWithReceipt.transaction:type_name -> Transaction + 21, // 19: TransactionWithReceipt.receipt:type_name -> Receipt + 22, // 20: TransactionsRequest.iteration:type_name -> Iteration + 4, // 21: TransactionsResponse.transaction_with_receipt:type_name -> TransactionWithReceipt + 23, // 22: TransactionsResponse.fin:type_name -> Fin + 3, // 23: Transactions.transactions:type_name -> Transaction + 24, // 24: Transaction.DeclareV0.sender:type_name -> Address + 19, // 25: Transaction.DeclareV0.max_fee:type_name -> Felt252 + 2, // 26: Transaction.DeclareV0.signature:type_name -> AccountSignature + 20, // 27: Transaction.DeclareV0.class_hash:type_name -> Hash + 24, // 28: Transaction.DeclareV1.sender:type_name -> Address + 19, // 29: Transaction.DeclareV1.max_fee:type_name -> Felt252 + 2, // 30: Transaction.DeclareV1.signature:type_name -> AccountSignature + 20, // 31: Transaction.DeclareV1.class_hash:type_name -> Hash + 19, // 32: Transaction.DeclareV1.nonce:type_name -> Felt252 + 24, // 33: Transaction.DeclareV2.sender:type_name -> Address + 19, // 34: Transaction.DeclareV2.max_fee:type_name -> Felt252 + 2, // 35: Transaction.DeclareV2.signature:type_name -> AccountSignature + 20, // 36: Transaction.DeclareV2.class_hash:type_name -> Hash + 19, // 37: Transaction.DeclareV2.nonce:type_name -> Felt252 + 20, // 38: Transaction.DeclareV2.compiled_class_hash:type_name -> Hash + 24, // 39: Transaction.DeclareV3.sender:type_name -> Address + 2, // 40: Transaction.DeclareV3.signature:type_name -> AccountSignature + 20, // 41: Transaction.DeclareV3.class_hash:type_name -> Hash + 19, // 42: Transaction.DeclareV3.nonce:type_name -> Felt252 + 20, // 43: Transaction.DeclareV3.compiled_class_hash:type_name -> Hash + 1, // 44: Transaction.DeclareV3.resource_bounds:type_name -> ResourceBounds + 19, // 45: Transaction.DeclareV3.paymaster_data:type_name -> Felt252 + 19, // 46: Transaction.DeclareV3.account_deployment_data:type_name -> Felt252 + 25, // 47: Transaction.DeclareV3.nonce_data_availability_mode:type_name -> VolitionDomain + 25, // 48: Transaction.DeclareV3.fee_data_availability_mode:type_name -> VolitionDomain + 20, // 49: Transaction.Deploy.class_hash:type_name -> Hash + 19, // 50: Transaction.Deploy.address_salt:type_name -> Felt252 + 19, // 51: Transaction.Deploy.calldata:type_name -> Felt252 + 19, // 52: Transaction.DeployAccountV1.max_fee:type_name -> Felt252 + 2, // 53: Transaction.DeployAccountV1.signature:type_name -> AccountSignature + 20, // 54: Transaction.DeployAccountV1.class_hash:type_name -> Hash + 19, // 55: Transaction.DeployAccountV1.nonce:type_name -> Felt252 + 19, // 56: Transaction.DeployAccountV1.address_salt:type_name -> Felt252 + 19, // 57: Transaction.DeployAccountV1.calldata:type_name -> Felt252 + 2, // 58: Transaction.DeployAccountV3.signature:type_name -> AccountSignature + 20, // 59: Transaction.DeployAccountV3.class_hash:type_name -> Hash + 19, // 60: Transaction.DeployAccountV3.nonce:type_name -> Felt252 + 19, // 61: Transaction.DeployAccountV3.address_salt:type_name -> Felt252 + 19, // 62: Transaction.DeployAccountV3.calldata:type_name -> Felt252 + 1, // 63: Transaction.DeployAccountV3.resource_bounds:type_name -> ResourceBounds + 19, // 64: Transaction.DeployAccountV3.paymaster_data:type_name -> Felt252 + 25, // 65: Transaction.DeployAccountV3.nonce_data_availability_mode:type_name -> VolitionDomain + 25, // 66: Transaction.DeployAccountV3.fee_data_availability_mode:type_name -> VolitionDomain + 19, // 67: Transaction.InvokeV0.max_fee:type_name -> Felt252 + 2, // 68: Transaction.InvokeV0.signature:type_name -> AccountSignature + 24, // 69: Transaction.InvokeV0.address:type_name -> Address + 19, // 70: Transaction.InvokeV0.entry_point_selector:type_name -> Felt252 + 19, // 71: Transaction.InvokeV0.calldata:type_name -> Felt252 + 24, // 72: Transaction.InvokeV1.sender:type_name -> Address + 19, // 73: Transaction.InvokeV1.max_fee:type_name -> Felt252 + 2, // 74: Transaction.InvokeV1.signature:type_name -> AccountSignature + 19, // 75: Transaction.InvokeV1.calldata:type_name -> Felt252 + 19, // 76: Transaction.InvokeV1.nonce:type_name -> Felt252 + 24, // 77: Transaction.InvokeV3.sender:type_name -> Address + 2, // 78: Transaction.InvokeV3.signature:type_name -> AccountSignature + 19, // 79: Transaction.InvokeV3.calldata:type_name -> Felt252 + 1, // 80: Transaction.InvokeV3.resource_bounds:type_name -> ResourceBounds + 19, // 81: Transaction.InvokeV3.paymaster_data:type_name -> Felt252 + 19, // 82: Transaction.InvokeV3.account_deployment_data:type_name -> Felt252 + 25, // 83: Transaction.InvokeV3.nonce_data_availability_mode:type_name -> VolitionDomain + 25, // 84: Transaction.InvokeV3.fee_data_availability_mode:type_name -> VolitionDomain + 19, // 85: Transaction.InvokeV3.nonce:type_name -> Felt252 + 19, // 86: Transaction.L1HandlerV0.nonce:type_name -> Felt252 + 24, // 87: Transaction.L1HandlerV0.address:type_name -> Address + 19, // 88: Transaction.L1HandlerV0.entry_point_selector:type_name -> Felt252 + 19, // 89: Transaction.L1HandlerV0.calldata:type_name -> Felt252 + 90, // [90:90] is the sub-list for method output_type + 90, // [90:90] is the sub-list for method input_type + 90, // [90:90] is the sub-list for extension type_name + 90, // [90:90] is the sub-list for extension extendee + 0, // [0:90] is the sub-list for field type_name } func init() { file_transaction_proto_init() } @@ -2036,6 +2051,7 @@ func file_transaction_proto_init() { } file_common_proto_init() file_receipt_proto_init() + file_transaction_proto_msgTypes[1].OneofWrappers = []any{} file_transaction_proto_msgTypes[3].OneofWrappers = []any{ (*Transaction_DeclareV0_)(nil), (*Transaction_DeclareV1_)(nil), From 77670e8850eaeced50e13e219ff0c37d8045594b Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 15 Jan 2025 11:24:50 +0300 Subject: [PATCH 21/34] Update gas fields --- adapters/core2p2p/block.go | 10 ++++++---- adapters/p2p2core/block.go | 17 ++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/adapters/core2p2p/block.go b/adapters/core2p2p/block.go index 6b48044b43..84162c4d7f 100644 --- a/adapters/core2p2p/block.go +++ b/adapters/core2p2p/block.go @@ -47,16 +47,18 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, }, Receipts: AdaptHash(commitments.ReceiptCommitment), ProtocolVersion: header.ProtocolVersion, - GasPriceFri: AdaptUint128(header.L1GasPriceSTRK), + L1GasPriceFri: AdaptUint128(header.L1GasPriceSTRK), Signatures: utils.Map(header.Signatures, adaptSignature), StateDiffCommitment: &gen.StateDiffCommitment{ StateDiffLength: stateDiffLength, Root: AdaptHash(stateDiffCommitment), }, - GasPriceWei: AdaptUint128(header.L1GasPriceETH), - DataGasPriceFri: AdaptUint128(header.L1DataGasPrice.PriceInFri), - DataGasPriceWei: AdaptUint128(header.L1DataGasPrice.PriceInWei), + L1GasPriceWei: AdaptUint128(header.L1GasPriceETH), + L1DataGasPriceFri: AdaptUint128(header.L1DataGasPrice.PriceInFri), + L1DataGasPriceWei: AdaptUint128(header.L1DataGasPrice.PriceInWei), L1DataAvailabilityMode: adaptL1DA(header.L1DAMode), + L2GasPriceFri: AdaptUint128(header.L2GasPriceSTRK), + L2GasPriceWei: AdaptUint128(header.L2GasPriceETH), } } diff --git a/adapters/p2p2core/block.go b/adapters/p2p2core/block.go index 5f1e596a3a..0eda515830 100644 --- a/adapters/p2p2core/block.go +++ b/adapters/p2p2core/block.go @@ -34,17 +34,20 @@ func AdaptBlockHeader(h *gen.SignedBlockHeader, eventsBloom *bloom.BloomFilter) Timestamp: h.Time, ProtocolVersion: h.ProtocolVersion, EventsBloom: eventsBloom, - L1GasPriceETH: AdaptUint128(h.GasPriceWei), - L2GasPriceETH: &felt.Zero, // TODO: Fix when we have l2 gas price + L1GasPriceETH: AdaptUint128(h.L1GasPriceWei), + L2GasPriceETH: AdaptUint128(h.L2GasPriceWei), Signatures: utils.Map(h.Signatures, adaptSignature), - L1GasPriceSTRK: AdaptUint128(h.GasPriceFri), - L2GasPriceSTRK: &felt.Zero, // TODO: Fix when we have l2 gas price + L1GasPriceSTRK: AdaptUint128(h.L1GasPriceFri), + L2GasPriceSTRK: AdaptUint128(h.L2GasPriceFri), L1DAMode: adaptDA(h.L1DataAvailabilityMode), L1DataGasPrice: &core.GasPrice{ - PriceInWei: AdaptUint128(h.DataGasPriceWei), - PriceInFri: AdaptUint128(h.DataGasPriceFri), + PriceInWei: AdaptUint128(h.L1DataGasPriceWei), + PriceInFri: AdaptUint128(h.L1DataGasPriceFri), + }, + L2GasPrice: &core.GasPrice{ + PriceInWei: AdaptUint128(h.L2GasPriceWei), + PriceInFri: AdaptUint128(h.L2GasPriceFri), }, - L2GasPrice: nil, // todo pass correct value once it's in the p2p spec } } From 4d4630da45a350809135c4e303916baa17aa264c Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 15 Jan 2025 11:25:37 +0300 Subject: [PATCH 22/34] Add l2GasPrice nil check --- adapters/core2p2p/block.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/adapters/core2p2p/block.go b/adapters/core2p2p/block.go index 84162c4d7f..e60de97bdc 100644 --- a/adapters/core2p2p/block.go +++ b/adapters/core2p2p/block.go @@ -30,6 +30,20 @@ func adaptSignature(sig []*felt.Felt) *gen.ConsensusSignature { func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, stateDiffCommitment *felt.Felt, stateDiffLength uint64, ) *gen.SignedBlockHeader { + var l2GasPriceSTRK, l2GasPriceETH *felt.Felt + + if header.L2GasPriceSTRK != nil { + l2GasPriceSTRK = header.L2GasPriceSTRK + } else { + l2GasPriceSTRK = &felt.Zero + } + + if header.L2GasPriceETH != nil { + l2GasPriceETH = header.L2GasPriceETH + } else { + l2GasPriceETH = &felt.Zero + } + return &gen.SignedBlockHeader{ BlockHash: AdaptHash(header.Hash), ParentHash: AdaptHash(header.ParentHash), @@ -57,8 +71,8 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, L1DataGasPriceFri: AdaptUint128(header.L1DataGasPrice.PriceInFri), L1DataGasPriceWei: AdaptUint128(header.L1DataGasPrice.PriceInWei), L1DataAvailabilityMode: adaptL1DA(header.L1DAMode), - L2GasPriceFri: AdaptUint128(header.L2GasPriceSTRK), - L2GasPriceWei: AdaptUint128(header.L2GasPriceETH), + L2GasPriceFri: AdaptUint128(l2GasPriceSTRK), + L2GasPriceWei: AdaptUint128(l2GasPriceETH), } } From 04f527eefe71101e9d8fccb0f26b684e7ec9e2c0 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 15 Jan 2025 11:25:56 +0300 Subject: [PATCH 23/34] Add l2 gas --- adapters/core2p2p/receipt.go | 4 +++- adapters/core2p2p/transaction.go | 5 +++-- adapters/p2p2core/receipt.go | 2 ++ adapters/sn2core/sn2core.go | 1 + core/receipt.go | 1 + core/transaction.go | 1 + starknet/transaction.go | 2 ++ 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/adapters/core2p2p/receipt.go b/adapters/core2p2p/receipt.go index a592210995..467e556434 100644 --- a/adapters/core2p2p/receipt.go +++ b/adapters/core2p2p/receipt.go @@ -104,9 +104,10 @@ func AdaptExecutionResources(er *core.ExecutionResources) *gen.Receipt_Execution return nil } - var l1Gas, l1DataGas, totalL1Gas *felt.Felt + var l1Gas, l2Gas, l1DataGas, totalL1Gas *felt.Felt if da := er.DataAvailability; da != nil { // todo(kirill) check that it might be null l1Gas = new(felt.Felt).SetUint64(da.L1Gas) + l2Gas = new(felt.Felt).SetUint64(da.L2Gas) l1DataGas = new(felt.Felt).SetUint64(da.L1DataGas) } if tgs := er.TotalGasConsumed; tgs != nil { @@ -130,6 +131,7 @@ func AdaptExecutionResources(er *core.ExecutionResources) *gen.Receipt_Execution Steps: uint32(er.Steps), MemoryHoles: uint32(er.MemoryHoles), L1Gas: AdaptFelt(l1Gas), + L2Gas: AdaptFelt(l2Gas), L1DataGas: AdaptFelt(l1DataGas), TotalL1Gas: AdaptFelt(totalL1Gas), } diff --git a/adapters/core2p2p/transaction.go b/adapters/core2p2p/transaction.go index 9529ec4c21..0fa2c5ac12 100644 --- a/adapters/core2p2p/transaction.go +++ b/adapters/core2p2p/transaction.go @@ -161,8 +161,9 @@ func adaptResourceLimits(bounds core.ResourceBounds) *gen.ResourceLimits { func adaptResourceBounds(rb map[core.Resource]core.ResourceBounds) *gen.ResourceBounds { return &gen.ResourceBounds{ - L1Gas: adaptResourceLimits(rb[core.ResourceL1Gas]), - L2Gas: adaptResourceLimits(rb[core.ResourceL2Gas]), + L1Gas: adaptResourceLimits(rb[core.ResourceL1Gas]), + L1DataGas: adaptResourceLimits(rb[core.ResourceL1DataGas]), + L2Gas: adaptResourceLimits(rb[core.ResourceL2Gas]), } } diff --git a/adapters/p2p2core/receipt.go b/adapters/p2p2core/receipt.go index a159233554..10a2ce9021 100644 --- a/adapters/p2p2core/receipt.go +++ b/adapters/p2p2core/receipt.go @@ -58,12 +58,14 @@ func adaptExecutionResources(er *gen.Receipt_ExecutionResources) *core.Execution }, DataAvailability: &core.DataAvailability{ L1Gas: feltToUint64(er.L1Gas), + L2Gas: feltToUint64(er.L2Gas), L1DataGas: feltToUint64(er.L1DataGas), }, MemoryHoles: uint64(er.MemoryHoles), Steps: uint64(er.Steps), // todo SPEC 32 -> 64 bytes TotalGasConsumed: &core.GasConsumed{ L1Gas: feltToUint64(er.TotalL1Gas), + L2Gas: feltToUint64(er.L2Gas), // total_l1_data_gas = l1_data_gas, because there's only one place that can generate l1_data_gas costs L1DataGas: feltToUint64(er.L1DataGas), }, diff --git a/adapters/sn2core/sn2core.go b/adapters/sn2core/sn2core.go index f3c4b7e405..003fa31931 100644 --- a/adapters/sn2core/sn2core.go +++ b/adapters/sn2core/sn2core.go @@ -90,6 +90,7 @@ func adaptGasConsumed(response *starknet.GasConsumed) *core.GasConsumed { return &core.GasConsumed{ L1Gas: response.L1Gas, L1DataGas: response.L1DataGas, + L2Gas: response.L2Gas, } } diff --git a/core/receipt.go b/core/receipt.go index 0e0f071f96..92f3e85f44 100644 --- a/core/receipt.go +++ b/core/receipt.go @@ -12,6 +12,7 @@ import ( type GasConsumed struct { L1Gas uint64 L1DataGas uint64 + L2Gas uint64 } type TransactionReceipt struct { diff --git a/core/transaction.go b/core/transaction.go index de5dfc74d2..9f20566c00 100644 --- a/core/transaction.go +++ b/core/transaction.go @@ -105,6 +105,7 @@ type ExecutionResources struct { type DataAvailability struct { L1Gas uint64 L1DataGas uint64 + L2Gas uint64 } type BuiltinInstanceCounter struct { diff --git a/starknet/transaction.go b/starknet/transaction.go index 3584336aa4..9b35a083a7 100644 --- a/starknet/transaction.go +++ b/starknet/transaction.go @@ -220,6 +220,7 @@ type ExecutionResources struct { type DataAvailability struct { L1Gas uint64 `json:"l1_gas"` L1DataGas uint64 `json:"l1_data_gas"` + L2Gas uint64 `json:"l2_gas"` } type BuiltinInstanceCounter struct { @@ -240,6 +241,7 @@ type BuiltinInstanceCounter struct { type GasConsumed struct { L1Gas uint64 `json:"l1_gas"` L1DataGas uint64 `json:"l1_data_gas"` + L2Gas uint64 `json:"l2_gas"` } type TransactionReceipt struct { From 6c97e6ecd5d8cdcfc545ebc29483513ef1b26252 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Thu, 16 Jan 2025 18:09:22 +0300 Subject: [PATCH 24/34] Fix rebase issues --- sync/sync.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sync/sync.go b/sync/sync.go index 06eb24d695..9451cd1ec3 100644 --- a/sync/sync.go +++ b/sync/sync.go @@ -682,8 +682,10 @@ func (s *Synchronizer) storeEmptyPending(latestHeader *core.Header) error { Timestamp: uint64(time.Now().Unix()), ProtocolVersion: latestHeader.ProtocolVersion, EventsBloom: core.EventsBloom(receipts), - GasPrice: latestHeader.GasPrice, - GasPriceSTRK: latestHeader.GasPriceSTRK, + L1GasPriceETH: latestHeader.L1GasPriceETH, + L1GasPriceSTRK: latestHeader.L1GasPriceSTRK, + L2GasPriceETH: latestHeader.L2GasPriceETH, + L2GasPriceSTRK: latestHeader.L2GasPriceSTRK, }, Transactions: make([]core.Transaction, 0), Receipts: receipts, From c0179fd57b0a618e81c909295c258dbc789968ad Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Mon, 20 Jan 2025 14:52:45 +0300 Subject: [PATCH 25/34] Add totalL1DataGas --- adapters/core2p2p/receipt.go | 16 +-- adapters/p2p2core/receipt.go | 2 +- p2p/gen/class.pb.go | 2 +- p2p/gen/common.pb.go | 2 +- p2p/gen/event.pb.go | 2 +- p2p/gen/header.pb.go | 2 +- p2p/gen/receipt.pb.go | 229 ++++++++++++++++++----------------- p2p/gen/state.pb.go | 2 +- p2p/gen/transaction.pb.go | 2 +- p2p/spec/receipt.proto | 5 +- rpc/helpers.go | 18 +-- rpc/transaction.go | 1 + 12 files changed, 150 insertions(+), 133 deletions(-) diff --git a/adapters/core2p2p/receipt.go b/adapters/core2p2p/receipt.go index 467e556434..8a3c36f244 100644 --- a/adapters/core2p2p/receipt.go +++ b/adapters/core2p2p/receipt.go @@ -104,7 +104,7 @@ func AdaptExecutionResources(er *core.ExecutionResources) *gen.Receipt_Execution return nil } - var l1Gas, l2Gas, l1DataGas, totalL1Gas *felt.Felt + var l1Gas, l1DataGas, l2Gas, totalL1Gas, totalL1DataGas *felt.Felt if da := er.DataAvailability; da != nil { // todo(kirill) check that it might be null l1Gas = new(felt.Felt).SetUint64(da.L1Gas) l2Gas = new(felt.Felt).SetUint64(da.L2Gas) @@ -112,6 +112,7 @@ func AdaptExecutionResources(er *core.ExecutionResources) *gen.Receipt_Execution } if tgs := er.TotalGasConsumed; tgs != nil { totalL1Gas = new(felt.Felt).SetUint64(tgs.L1Gas) + totalL1DataGas = new(felt.Felt).SetUint64(tgs.L1DataGas) } return &gen.Receipt_ExecutionResources{ @@ -128,11 +129,12 @@ func AdaptExecutionResources(er *core.ExecutionResources) *gen.Receipt_Execution MulMod: uint32(er.BuiltinInstanceCounter.MulMod), RangeCheck96: uint32(er.BuiltinInstanceCounter.RangeCheck96), }, - Steps: uint32(er.Steps), - MemoryHoles: uint32(er.MemoryHoles), - L1Gas: AdaptFelt(l1Gas), - L2Gas: AdaptFelt(l2Gas), - L1DataGas: AdaptFelt(l1DataGas), - TotalL1Gas: AdaptFelt(totalL1Gas), + Steps: uint32(er.Steps), + MemoryHoles: uint32(er.MemoryHoles), + L1Gas: AdaptFelt(l1Gas), + L1DataGas: AdaptFelt(l1DataGas), + TotalL1Gas: AdaptFelt(totalL1Gas), + TotalL1DataGas: AdaptFelt(totalL1DataGas), + L2Gas: AdaptFelt(l2Gas), } } diff --git a/adapters/p2p2core/receipt.go b/adapters/p2p2core/receipt.go index 10a2ce9021..e804cca9b8 100644 --- a/adapters/p2p2core/receipt.go +++ b/adapters/p2p2core/receipt.go @@ -67,7 +67,7 @@ func adaptExecutionResources(er *gen.Receipt_ExecutionResources) *core.Execution L1Gas: feltToUint64(er.TotalL1Gas), L2Gas: feltToUint64(er.L2Gas), // total_l1_data_gas = l1_data_gas, because there's only one place that can generate l1_data_gas costs - L1DataGas: feltToUint64(er.L1DataGas), + L1DataGas: feltToUint64(er.TotalL1DataGas), }, } } diff --git a/p2p/gen/class.pb.go b/p2p/gen/class.pb.go index f24e1ff989..450f9d9d2d 100644 --- a/p2p/gen/class.pb.go +++ b/p2p/gen/class.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc (unknown) // source: class.proto diff --git a/p2p/gen/common.pb.go b/p2p/gen/common.pb.go index bfd7c64e6d..ae8f060bc5 100644 --- a/p2p/gen/common.pb.go +++ b/p2p/gen/common.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc (unknown) // source: common.proto diff --git a/p2p/gen/event.pb.go b/p2p/gen/event.pb.go index 9daf64a07a..35fca2f450 100644 --- a/p2p/gen/event.pb.go +++ b/p2p/gen/event.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc (unknown) // source: event.proto diff --git a/p2p/gen/header.pb.go b/p2p/gen/header.pb.go index 6d2eef53f6..50757857bc 100644 --- a/p2p/gen/header.pb.go +++ b/p2p/gen/header.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc (unknown) // source: header.proto diff --git a/p2p/gen/receipt.pb.go b/p2p/gen/receipt.pb.go index c02b9685ee..da83004651 100644 --- a/p2p/gen/receipt.pb.go +++ b/p2p/gen/receipt.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc (unknown) // source: receipt.proto @@ -301,16 +301,17 @@ func (*Receipt_DeprecatedDeploy) isReceipt_Type() {} func (*Receipt_DeployAccount_) isReceipt_Type() {} type Receipt_ExecutionResources struct { - state protoimpl.MessageState `protogen:"open.v1"` - Builtins *Receipt_ExecutionResources_BuiltinCounter `protobuf:"bytes,1,opt,name=builtins,proto3" json:"builtins,omitempty"` - Steps uint32 `protobuf:"varint,2,opt,name=steps,proto3" json:"steps,omitempty"` - MemoryHoles uint32 `protobuf:"varint,3,opt,name=memory_holes,json=memoryHoles,proto3" json:"memory_holes,omitempty"` - L1Gas *Felt252 `protobuf:"bytes,4,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` - L1DataGas *Felt252 `protobuf:"bytes,5,opt,name=l1_data_gas,json=l1DataGas,proto3" json:"l1_data_gas,omitempty"` - L2Gas *Felt252 `protobuf:"bytes,6,opt,name=l2_gas,json=l2Gas,proto3" json:"l2_gas,omitempty"` - TotalL1Gas *Felt252 `protobuf:"bytes,7,opt,name=total_l1_gas,json=totalL1Gas,proto3" json:"total_l1_gas,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Builtins *Receipt_ExecutionResources_BuiltinCounter `protobuf:"bytes,1,opt,name=builtins,proto3" json:"builtins,omitempty"` + Steps uint32 `protobuf:"varint,2,opt,name=steps,proto3" json:"steps,omitempty"` + MemoryHoles uint32 `protobuf:"varint,3,opt,name=memory_holes,json=memoryHoles,proto3" json:"memory_holes,omitempty"` + L1Gas *Felt252 `protobuf:"bytes,4,opt,name=l1_gas,json=l1Gas,proto3" json:"l1_gas,omitempty"` + L1DataGas *Felt252 `protobuf:"bytes,5,opt,name=l1_data_gas,json=l1DataGas,proto3" json:"l1_data_gas,omitempty"` + TotalL1Gas *Felt252 `protobuf:"bytes,6,opt,name=total_l1_gas,json=totalL1Gas,proto3" json:"total_l1_gas,omitempty"` + TotalL1DataGas *Felt252 `protobuf:"bytes,7,opt,name=total_l1_data_gas,json=totalL1DataGas,proto3" json:"total_l1_data_gas,omitempty"` + L2Gas *Felt252 `protobuf:"bytes,8,opt,name=l2_gas,json=l2Gas,proto3" json:"l2_gas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Receipt_ExecutionResources) Reset() { @@ -378,16 +379,23 @@ func (x *Receipt_ExecutionResources) GetL1DataGas() *Felt252 { return nil } -func (x *Receipt_ExecutionResources) GetL2Gas() *Felt252 { +func (x *Receipt_ExecutionResources) GetTotalL1Gas() *Felt252 { if x != nil { - return x.L2Gas + return x.TotalL1Gas } return nil } -func (x *Receipt_ExecutionResources) GetTotalL1Gas() *Felt252 { +func (x *Receipt_ExecutionResources) GetTotalL1DataGas() *Felt252 { if x != nil { - return x.TotalL1Gas + return x.TotalL1DataGas + } + return nil +} + +func (x *Receipt_ExecutionResources) GetL2Gas() *Felt252 { + if x != nil { + return x.L2Gas } return nil } @@ -852,7 +860,7 @@ var file_receipt_proto_rawDesc = []byte{ 0x72, 0x65, 0x73, 0x73, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x2d, 0x0a, 0x0f, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xbd, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xf2, 0x0c, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x48, 0x00, 0x52, 0x06, 0x69, @@ -870,7 +878,7 @@ var file_receipt_proto_rawDesc = []byte{ 0x6f, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0xe5, 0x04, 0x0a, 0x12, 0x45, 0x78, + 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x9a, 0x05, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x45, 0x78, 0x65, @@ -884,80 +892,84 @@ var file_receipt_proto_rawDesc = []byte{ 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6c, 0x31, 0x47, 0x61, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, - 0x32, 0x52, 0x09, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x12, 0x1f, 0x0a, 0x06, - 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, - 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x12, 0x2a, 0x0a, - 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0a, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x31, 0x47, 0x61, 0x73, 0x1a, 0xb5, 0x02, 0x0a, 0x0e, 0x42, 0x75, - 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, - 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, - 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x63, 0x64, 0x73, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x63, 0x64, 0x73, 0x61, 0x12, 0x13, 0x0a, 0x05, - 0x65, 0x63, 0x5f, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x65, 0x63, 0x4f, - 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, 0x65, 0x6e, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x08, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, - 0x63, 0x63, 0x61, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6b, 0x65, 0x63, 0x63, - 0x61, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x61, 0x64, 0x64, - 0x4d, 0x6f, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x75, 0x6c, 0x5f, 0x6d, 0x6f, 0x64, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x75, 0x6c, 0x4d, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x0d, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x39, 0x36, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x39, - 0x36, 0x1a, 0x99, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0a, - 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x09, 0x61, 0x63, 0x74, 0x75, - 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x75, - 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, - 0x12, 0x31, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, - 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x6f, 0x4c, 0x31, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x53, - 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x12, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, - 0x72, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, - 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x1a, 0x31, 0x0a, - 0x06, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, - 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x1a, 0x59, 0x0a, 0x09, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x27, 0x0a, + 0x32, 0x52, 0x09, 0x6c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x0c, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0a, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x4c, 0x31, 0x47, 0x61, 0x73, 0x12, 0x33, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x6c, 0x31, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0e, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x4c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x47, 0x61, 0x73, 0x12, 0x1f, 0x0a, + 0x06, 0x6c, 0x32, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x6c, 0x32, 0x47, 0x61, 0x73, 0x1a, 0xb5, + 0x02, 0x0a, 0x0e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x07, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x63, 0x64, 0x73, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x65, 0x63, 0x64, 0x73, + 0x61, 0x12, 0x13, 0x0a, 0x05, 0x65, 0x63, 0x5f, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x04, 0x65, 0x63, 0x4f, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, + 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x65, 0x64, 0x65, 0x72, 0x73, + 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x65, 0x69, 0x64, 0x6f, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x06, 0x6b, 0x65, 0x63, 0x63, 0x61, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, + 0x17, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x06, 0x61, 0x64, 0x64, 0x4d, 0x6f, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x75, 0x6c, 0x5f, + 0x6d, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x75, 0x6c, 0x4d, 0x6f, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x39, 0x36, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x39, 0x36, 0x1a, 0x99, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, + 0x09, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x29, 0x0a, 0x0a, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, + 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x09, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x4c, 0x31, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x13, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x52, 0x12, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, + 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0c, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x1a, 0x31, 0x0a, 0x06, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x27, 0x0a, 0x06, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x59, 0x0a, 0x09, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x08, 0x6d, + 0x73, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x48, 0x61, 0x73, 0x68, 0x32, 0x35, 0x36, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x68, + 0x1a, 0x32, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x66, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x27, + 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0f, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x6d, 0x0a, 0x0d, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x32, - 0x35, 0x36, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x48, 0x61, 0x73, 0x68, 0x1a, 0x32, 0x0a, 0x07, 0x44, - 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, - 0x66, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, - 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x6d, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x12, 0x33, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, - 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x1d, - 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x57, - 0x65, 0x69, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x72, 0x69, 0x10, 0x01, 0x42, 0x27, 0x5a, - 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x64, 0x45, 0x74, 0x68, 0x2f, 0x6a, 0x75, 0x6e, 0x6f, 0x2f, 0x70, - 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x2a, 0x1d, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x69, 0x74, + 0x12, 0x07, 0x0a, 0x03, 0x57, 0x65, 0x69, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x72, 0x69, + 0x10, 0x01, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x4e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x64, 0x45, 0x74, 0x68, 0x2f, 0x6a, + 0x75, 0x6e, 0x6f, 0x2f, 0x70, 0x32, 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1002,25 +1014,26 @@ var file_receipt_proto_depIdxs = []int32{ 11, // 8: Receipt.ExecutionResources.builtins:type_name -> Receipt.ExecutionResources.BuiltinCounter 12, // 9: Receipt.ExecutionResources.l1_gas:type_name -> Felt252 12, // 10: Receipt.ExecutionResources.l1_data_gas:type_name -> Felt252 - 12, // 11: Receipt.ExecutionResources.l2_gas:type_name -> Felt252 - 12, // 12: Receipt.ExecutionResources.total_l1_gas:type_name -> Felt252 - 12, // 13: Receipt.Common.actual_fee:type_name -> Felt252 - 0, // 14: Receipt.Common.price_unit:type_name -> PriceUnit - 1, // 15: Receipt.Common.messages_sent:type_name -> MessageToL1 - 4, // 16: Receipt.Common.execution_resources:type_name -> Receipt.ExecutionResources - 5, // 17: Receipt.Invoke.common:type_name -> Receipt.Common - 5, // 18: Receipt.L1Handler.common:type_name -> Receipt.Common - 13, // 19: Receipt.L1Handler.msg_hash:type_name -> Hash256 - 5, // 20: Receipt.Declare.common:type_name -> Receipt.Common - 5, // 21: Receipt.Deploy.common:type_name -> Receipt.Common - 12, // 22: Receipt.Deploy.contract_address:type_name -> Felt252 - 5, // 23: Receipt.DeployAccount.common:type_name -> Receipt.Common - 12, // 24: Receipt.DeployAccount.contract_address:type_name -> Felt252 - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 12, // 11: Receipt.ExecutionResources.total_l1_gas:type_name -> Felt252 + 12, // 12: Receipt.ExecutionResources.total_l1_data_gas:type_name -> Felt252 + 12, // 13: Receipt.ExecutionResources.l2_gas:type_name -> Felt252 + 12, // 14: Receipt.Common.actual_fee:type_name -> Felt252 + 0, // 15: Receipt.Common.price_unit:type_name -> PriceUnit + 1, // 16: Receipt.Common.messages_sent:type_name -> MessageToL1 + 4, // 17: Receipt.Common.execution_resources:type_name -> Receipt.ExecutionResources + 5, // 18: Receipt.Invoke.common:type_name -> Receipt.Common + 5, // 19: Receipt.L1Handler.common:type_name -> Receipt.Common + 13, // 20: Receipt.L1Handler.msg_hash:type_name -> Hash256 + 5, // 21: Receipt.Declare.common:type_name -> Receipt.Common + 5, // 22: Receipt.Deploy.common:type_name -> Receipt.Common + 12, // 23: Receipt.Deploy.contract_address:type_name -> Felt252 + 5, // 24: Receipt.DeployAccount.common:type_name -> Receipt.Common + 12, // 25: Receipt.DeployAccount.contract_address:type_name -> Felt252 + 26, // [26:26] is the sub-list for method output_type + 26, // [26:26] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_receipt_proto_init() } diff --git a/p2p/gen/state.pb.go b/p2p/gen/state.pb.go index d35cee3e07..db05d6dfcd 100644 --- a/p2p/gen/state.pb.go +++ b/p2p/gen/state.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc (unknown) // source: state.proto diff --git a/p2p/gen/transaction.pb.go b/p2p/gen/transaction.pb.go index a969c4960c..a214124ee7 100644 --- a/p2p/gen/transaction.pb.go +++ b/p2p/gen/transaction.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.2 +// protoc-gen-go v1.36.3 // protoc (unknown) // source: transaction.proto diff --git a/p2p/spec/receipt.proto b/p2p/spec/receipt.proto index 0ae7c7b511..697a577a94 100644 --- a/p2p/spec/receipt.proto +++ b/p2p/spec/receipt.proto @@ -39,8 +39,9 @@ message Receipt { uint32 memory_holes = 3; Felt252 l1_gas = 4; Felt252 l1_data_gas = 5; - Felt252 l2_gas = 6; - Felt252 total_l1_gas = 7; + Felt252 total_l1_gas = 6; + Felt252 total_l1_data_gas = 7; + Felt252 l2_gas = 8; } message Common { diff --git a/rpc/helpers.go b/rpc/helpers.go index 10f8770274..65bc9f83a7 100644 --- a/rpc/helpers.go +++ b/rpc/helpers.go @@ -110,19 +110,19 @@ func adaptExecutionResources(resources *core.ExecutionResources) *ExecutionResou Poseidon: resources.BuiltinInstanceCounter.Poseidon, SegmentArena: resources.BuiltinInstanceCounter.SegmentArena, }, - DataAvailability: &DataAvailability{}, } - if resources.DataAvailability != nil { - res.L1Gas = resources.DataAvailability.L1Gas - res.L1DataGas = resources.DataAvailability.L1DataGas + if da := resources.DataAvailability; da != nil { res.DataAvailability = &DataAvailability{ - L1Gas: resources.DataAvailability.L1Gas, - L1DataGas: resources.DataAvailability.L1DataGas, + L1Gas: da.L1Gas, + L2Gas: da.L2Gas, + L1DataGas: da.L1DataGas, } } - - res.L2Gas = 0 // TODO: Use L2Gas when available - + if tgc := resources.TotalGasConsumed; tgc != nil { + res.L1Gas = tgc.L1Gas + res.L2Gas = tgc.L2Gas + res.L1DataGas = tgc.L1DataGas + } return res } diff --git a/rpc/transaction.go b/rpc/transaction.go index ed35f723ba..0aad707896 100644 --- a/rpc/transaction.go +++ b/rpc/transaction.go @@ -262,6 +262,7 @@ type ComputationResources struct { type DataAvailability struct { L1Gas uint64 `json:"l1_gas"` L1DataGas uint64 `json:"l1_data_gas"` + L2Gas uint64 `json:"l2_gas"` } type ExecutionResources struct { From 1608195fa9c9a5a5e66c10773a3033780d40b6d0 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Mon, 20 Jan 2025 15:51:10 +0300 Subject: [PATCH 26/34] Remove L2GasPriceSTRK and L2GasPriceETH fields --- adapters/core2p2p/block.go | 18 ++---------------- adapters/p2p2core/block.go | 2 -- adapters/sn2core/sn2core.go | 2 -- adapters/sn2core/sn2core_test.go | 4 ++-- core/block.go | 4 ---- rpc/block.go | 18 ++++++++++++++---- rpc/simulation.go | 4 ++-- rpc/simulation_pkg_test.go | 11 ++++++----- sync/sync.go | 3 +-- 9 files changed, 27 insertions(+), 39 deletions(-) diff --git a/adapters/core2p2p/block.go b/adapters/core2p2p/block.go index e60de97bdc..37e71310b2 100644 --- a/adapters/core2p2p/block.go +++ b/adapters/core2p2p/block.go @@ -30,20 +30,6 @@ func adaptSignature(sig []*felt.Felt) *gen.ConsensusSignature { func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, stateDiffCommitment *felt.Felt, stateDiffLength uint64, ) *gen.SignedBlockHeader { - var l2GasPriceSTRK, l2GasPriceETH *felt.Felt - - if header.L2GasPriceSTRK != nil { - l2GasPriceSTRK = header.L2GasPriceSTRK - } else { - l2GasPriceSTRK = &felt.Zero - } - - if header.L2GasPriceETH != nil { - l2GasPriceETH = header.L2GasPriceETH - } else { - l2GasPriceETH = &felt.Zero - } - return &gen.SignedBlockHeader{ BlockHash: AdaptHash(header.Hash), ParentHash: AdaptHash(header.ParentHash), @@ -71,8 +57,8 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, L1DataGasPriceFri: AdaptUint128(header.L1DataGasPrice.PriceInFri), L1DataGasPriceWei: AdaptUint128(header.L1DataGasPrice.PriceInWei), L1DataAvailabilityMode: adaptL1DA(header.L1DAMode), - L2GasPriceFri: AdaptUint128(l2GasPriceSTRK), - L2GasPriceWei: AdaptUint128(l2GasPriceETH), + L2GasPriceFri: AdaptUint128(header.L2GasPrice.PriceInFri), + L2GasPriceWei: AdaptUint128(header.L2GasPrice.PriceInWei), } } diff --git a/adapters/p2p2core/block.go b/adapters/p2p2core/block.go index 0eda515830..e6aa26e6f0 100644 --- a/adapters/p2p2core/block.go +++ b/adapters/p2p2core/block.go @@ -35,10 +35,8 @@ func AdaptBlockHeader(h *gen.SignedBlockHeader, eventsBloom *bloom.BloomFilter) ProtocolVersion: h.ProtocolVersion, EventsBloom: eventsBloom, L1GasPriceETH: AdaptUint128(h.L1GasPriceWei), - L2GasPriceETH: AdaptUint128(h.L2GasPriceWei), Signatures: utils.Map(h.Signatures, adaptSignature), L1GasPriceSTRK: AdaptUint128(h.L1GasPriceFri), - L2GasPriceSTRK: AdaptUint128(h.L2GasPriceFri), L1DAMode: adaptDA(h.L1DataAvailabilityMode), L1DataGasPrice: &core.GasPrice{ PriceInWei: AdaptUint128(h.L1DataGasPriceWei), diff --git a/adapters/sn2core/sn2core.go b/adapters/sn2core/sn2core.go index 003fa31931..1696d95c66 100644 --- a/adapters/sn2core/sn2core.go +++ b/adapters/sn2core/sn2core.go @@ -51,9 +51,7 @@ func AdaptBlock(response *starknet.Block, sig *starknet.Signature) (*core.Block, EventCount: eventCount, EventsBloom: core.EventsBloom(receipts), L1GasPriceETH: response.L1GasPriceETH(), - L2GasPriceETH: response.L2GasPriceETH(), L1GasPriceSTRK: response.L1GasPriceSTRK(), - L2GasPriceSTRK: response.L2GasPriceSTRK(), L1DAMode: core.L1DAMode(response.L1DAMode), L1DataGasPrice: (*core.GasPrice)(response.L1DataGasPrice), L2GasPrice: (*core.GasPrice)(response.L2GasPrice), diff --git a/adapters/sn2core/sn2core_test.go b/adapters/sn2core/sn2core_test.go index d86340e1a3..c99ce1a890 100644 --- a/adapters/sn2core/sn2core_test.go +++ b/adapters/sn2core/sn2core_test.go @@ -122,8 +122,8 @@ func TestAdaptBlock(t *testing.T) { assert.Equal(t, test.gasPriceSTRK, block.L1GasPriceSTRK) assert.Equal(t, test.gasPriceWEI, block.L1GasPriceETH) - assert.Equal(t, &felt.Zero, block.L2GasPriceSTRK) - assert.Equal(t, &felt.Zero, block.L2GasPriceETH) + assert.Equal(t, &felt.Zero, block.L2GasPrice.PriceInFri) + assert.Equal(t, &felt.Zero, block.L2GasPrice.PriceInWei) if test.l1DAGasPriceFRI != nil { assert.Equal(t, test.l1DAGasPriceFRI, block.L1DataGasPrice.PriceInFri) } diff --git a/core/block.go b/core/block.go index 29a65c22fb..69915ee1f5 100644 --- a/core/block.go +++ b/core/block.go @@ -37,14 +37,10 @@ type Header struct { // Amount of WEI charged per Gas spent on L1 L1GasPriceETH *felt.Felt `cbor:"gasprice"` // Amount of STRK charged per Gas spent on L2 - L2GasPriceETH *felt.Felt - // Sequencer signatures Signatures [][]*felt.Felt // Amount of STRK charged per Gas spent on L1 L1GasPriceSTRK *felt.Felt `cbor:"gaspricestrk"` // Amount of STRK charged per Gas spent on L2 - L2GasPriceSTRK *felt.Felt - // The mode of the L1 data availability L1DAMode L1DAMode // The gas price for L1 data availability L1DataGasPrice *GasPrice diff --git a/rpc/block.go b/rpc/block.go index 4f63677c77..936f3f8a53 100644 --- a/rpc/block.go +++ b/rpc/block.go @@ -319,6 +319,19 @@ func adaptBlockHeader(header *core.Header) BlockHeader { } } + var l2GasPrice ResourcePrice + if header.L2GasPrice != nil { + l2GasPrice = ResourcePrice{ + InWei: nilToZero(header.L2GasPrice.PriceInWei), + InFri: nilToZero(header.L2GasPrice.PriceInFri), + } + } else { + l2GasPrice = ResourcePrice{ + InWei: &felt.Zero, + InFri: &felt.Zero, + } + } + return BlockHeader{ Hash: header.Hash, ParentHash: header.ParentHash, @@ -330,10 +343,7 @@ func adaptBlockHeader(header *core.Header) BlockHeader { InWei: header.L1GasPriceETH, InFri: nilToZero(header.L1GasPriceSTRK), }, - L2GasPrice: &ResourcePrice{ - InWei: nilToZero(header.L2GasPriceETH), - InFri: nilToZero(header.L2GasPriceSTRK), - }, + L2GasPrice: &l2GasPrice, L1DataGasPrice: &l1DataGasPrice, L1DAMode: &l1DAMode, StarknetVersion: header.ProtocolVersion, diff --git a/rpc/simulation.go b/rpc/simulation.go index ec39819e9b..2327662193 100644 --- a/rpc/simulation.go +++ b/rpc/simulation.go @@ -149,11 +149,11 @@ func calculateFeeEstimate(overallFee *felt.Felt, l1DataGas uint64, feeUnit FeeUn switch feeUnit { case FRI: l1GasPrice = header.L1GasPriceSTRK - l2GasPrice = header.L2GasPriceSTRK + l2GasPrice = header.L2GasPrice.PriceInFri l1DataGasPrice = header.L1DataGasPrice.PriceInFri case WEI: l1GasPrice = header.L1GasPriceETH - l2GasPrice = header.L2GasPriceETH + l2GasPrice = header.L2GasPrice.PriceInWei l1DataGasPrice = header.L1DataGasPrice.PriceInWei } diff --git a/rpc/simulation_pkg_test.go b/rpc/simulation_pkg_test.go index 44f0c35e37..c167fefed3 100644 --- a/rpc/simulation_pkg_test.go +++ b/rpc/simulation_pkg_test.go @@ -10,18 +10,19 @@ import ( func TestCalculateFeeEstimate(t *testing.T) { l1GasPriceETH := new(felt.Felt).SetUint64(200) - l2GasPriceETH := new(felt.Felt).SetUint64(70) l1GasPriceSTRK := new(felt.Felt).SetUint64(100) - l2GasPriceSTRK := new(felt.Felt).SetUint64(50) + l2GasPrice := &core.GasPrice{ + PriceInWei: new(felt.Felt).SetUint64(100), + PriceInFri: new(felt.Felt).SetUint64(50), + } l1DataGasPrice := &core.GasPrice{ PriceInWei: new(felt.Felt).SetUint64(10), PriceInFri: new(felt.Felt).SetUint64(5), } header := &core.Header{ L1GasPriceETH: l1GasPriceETH, - L2GasPriceETH: l2GasPriceETH, + L2GasPrice: l2GasPrice, L1GasPriceSTRK: l1GasPriceSTRK, - L2GasPriceSTRK: l2GasPriceSTRK, L1DataGasPrice: l1DataGasPrice, } l1DataGas := uint64(500) @@ -30,7 +31,7 @@ func TestCalculateFeeEstimate(t *testing.T) { feeEstimate := calculateFeeEstimate(overallFee, l1DataGas, FRI, header) assert.Equal(t, l1GasPriceSTRK, feeEstimate.L1GasPrice) - assert.Equal(t, l2GasPriceSTRK, feeEstimate.L2GasPrice) + assert.Equal(t, l2GasPrice.PriceInFri, feeEstimate.L2GasPrice) assert.Equal(t, l1DataGasPrice.PriceInFri, feeEstimate.L1DataGasPrice) assert.Equal(t, overallFee, feeEstimate.OverallFee) assert.Equal(t, FRI, *feeEstimate.Unit) diff --git a/sync/sync.go b/sync/sync.go index 9451cd1ec3..aa2ddab6b0 100644 --- a/sync/sync.go +++ b/sync/sync.go @@ -684,8 +684,7 @@ func (s *Synchronizer) storeEmptyPending(latestHeader *core.Header) error { EventsBloom: core.EventsBloom(receipts), L1GasPriceETH: latestHeader.L1GasPriceETH, L1GasPriceSTRK: latestHeader.L1GasPriceSTRK, - L2GasPriceETH: latestHeader.L2GasPriceETH, - L2GasPriceSTRK: latestHeader.L2GasPriceSTRK, + L2GasPrice: latestHeader.L2GasPrice, }, Transactions: make([]core.Transaction, 0), Receipts: receipts, From d4e0c0d8c0c96b88f92d9790d333ae3a148b856e Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Tue, 21 Jan 2025 12:08:24 +0300 Subject: [PATCH 27/34] Add 0.13.4 test --- adapters/sn2core/sn2core_test.go | 53 +++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/adapters/sn2core/sn2core_test.go b/adapters/sn2core/sn2core_test.go index c99ce1a890..82cccc0d5e 100644 --- a/adapters/sn2core/sn2core_test.go +++ b/adapters/sn2core/sn2core_test.go @@ -21,21 +21,23 @@ func TestAdaptBlock(t *testing.T) { protocolVersion string network utils.Network sig *starknet.Signature - gasPriceWEI *felt.Felt - gasPriceSTRK *felt.Felt + l1GasPriceWEI *felt.Felt + l1GasPriceSTRK *felt.Felt l1DAGasPriceWEI *felt.Felt l1DAGasPriceFRI *felt.Felt + l2GasPriceWEI *felt.Felt + l2GasPriceFRI *felt.Felt }{ { - number: 147, - network: utils.Mainnet, - gasPriceWEI: &felt.Zero, + number: 147, + network: utils.Mainnet, + l1GasPriceWEI: &felt.Zero, }, { number: 11817, protocolVersion: "0.10.1", network: utils.Mainnet, - gasPriceWEI: utils.HexToFelt(t, "0x27ad16775"), + l1GasPriceWEI: utils.HexToFelt(t, "0x27ad16775"), }, { number: 304740, @@ -44,7 +46,7 @@ func TestAdaptBlock(t *testing.T) { sig: &starknet.Signature{ Signature: []*felt.Felt{utils.HexToFelt(t, "0x44"), utils.HexToFelt(t, "0x37")}, }, - gasPriceWEI: utils.HexToFelt(t, "0x3bb2acbc"), + l1GasPriceWEI: utils.HexToFelt(t, "0x3bb2acbc"), }, { number: 319132, @@ -56,8 +58,8 @@ func TestAdaptBlock(t *testing.T) { utils.HexToFelt(t, "0x6bef4745194c9447fdc8dd3aec4fc738ab0a560b0d2c7bf62fbf58aef3abfc5"), }, }, - gasPriceWEI: utils.HexToFelt(t, "0x3b9aca08"), - gasPriceSTRK: utils.HexToFelt(t, "0x2540be400"), + l1GasPriceWEI: utils.HexToFelt(t, "0x3b9aca08"), + l1GasPriceSTRK: utils.HexToFelt(t, "0x2540be400"), }, { number: 330363, @@ -69,11 +71,28 @@ func TestAdaptBlock(t *testing.T) { utils.HexToFelt(t, "0x343e605de3957e664746ba8ef82f2b0f9d53cda3d75dcb078290b8edd010165"), }, }, - gasPriceWEI: utils.HexToFelt(t, "0x3b9aca0a"), - gasPriceSTRK: utils.HexToFelt(t, "0x2b6fdb70"), + l1GasPriceWEI: utils.HexToFelt(t, "0x3b9aca0a"), + l1GasPriceSTRK: utils.HexToFelt(t, "0x2b6fdb70"), l1DAGasPriceWEI: utils.HexToFelt(t, "0x5265a14ef"), l1DAGasPriceFRI: utils.HexToFelt(t, "0x3c0c00c87"), }, + { + number: 64164, + network: utils.SepoliaIntegration, + protocolVersion: "0.13.4", + sig: &starknet.Signature{ + Signature: []*felt.Felt{ + utils.HexToFelt(t, "0x2a1658d74c85266cec309b15fb623ae7b18854a8e08e84834067fd68f07d15a"), + utils.HexToFelt(t, "0x5304bd3e7151d87fabe5977a1d19c2cc9025cce27a2ce0b26a46633386add94"), + }, + }, + l1GasPriceWEI: utils.HexToFelt(t, "0xcd62576b"), + l1GasPriceSTRK: utils.HexToFelt(t, "0x17842b1d0815"), + l1DAGasPriceWEI: utils.HexToFelt(t, "0x31ea"), + l1DAGasPriceFRI: utils.HexToFelt(t, "0x5b70ba9"), + l2GasPriceWEI: utils.HexToFelt(t, "0x15081"), + l2GasPriceFRI: utils.HexToFelt(t, "0x268771a6"), + }, } ctx := context.Background() @@ -120,16 +139,20 @@ func TestAdaptBlock(t *testing.T) { assert.Empty(t, block.Signatures) } - assert.Equal(t, test.gasPriceSTRK, block.L1GasPriceSTRK) - assert.Equal(t, test.gasPriceWEI, block.L1GasPriceETH) - assert.Equal(t, &felt.Zero, block.L2GasPrice.PriceInFri) - assert.Equal(t, &felt.Zero, block.L2GasPrice.PriceInWei) + assert.Equal(t, test.l1GasPriceSTRK, block.L1GasPriceSTRK) + assert.Equal(t, test.l1GasPriceWEI, block.L1GasPriceETH) if test.l1DAGasPriceFRI != nil { assert.Equal(t, test.l1DAGasPriceFRI, block.L1DataGasPrice.PriceInFri) } if test.l1DAGasPriceFRI != nil { assert.Equal(t, test.l1DAGasPriceWEI, block.L1DataGasPrice.PriceInWei) } + if test.l2GasPriceFRI != nil { + assert.Equal(t, test.l2GasPriceFRI, block.L2GasPrice.PriceInFri) + } + if test.l2GasPriceWEI != nil { + assert.Equal(t, test.l2GasPriceWEI, block.L2GasPrice.PriceInWei) + } }) } } From 28aac77276ff2d282efedfb127beaef6dc9df38e Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Tue, 21 Jan 2025 13:59:30 +0300 Subject: [PATCH 28/34] Fix tests --- rpc/helpers.go | 1 + rpc/transaction_test.go | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/rpc/helpers.go b/rpc/helpers.go index 65bc9f83a7..4408ef00dc 100644 --- a/rpc/helpers.go +++ b/rpc/helpers.go @@ -110,6 +110,7 @@ func adaptExecutionResources(resources *core.ExecutionResources) *ExecutionResou Poseidon: resources.BuiltinInstanceCounter.Poseidon, SegmentArena: resources.BuiltinInstanceCounter.SegmentArena, }, + DataAvailability: &DataAvailability{}, } if da := resources.DataAvailability; da != nil { res.DataAvailability = &DataAvailability{ diff --git a/rpc/transaction_test.go b/rpc/transaction_test.go index cf04708de9..56cb07f9a0 100644 --- a/rpc/transaction_test.go +++ b/rpc/transaction_test.go @@ -582,7 +582,8 @@ func TestTransactionReceiptByHash(t *testing.T) { "l2_gas": 0, "data_availability": { "l1_data_gas": 0, - "l1_gas": 0 + "l1_gas": 0, + "l2_gas": 0 }, "steps": 29 } @@ -615,7 +616,8 @@ func TestTransactionReceiptByHash(t *testing.T) { "l2_gas": 0, "data_availability": { "l1_data_gas": 0, - "l1_gas": 0 + "l1_gas": 0, + "l2_gas": 0 }, "steps": 31 } @@ -658,7 +660,8 @@ func TestTransactionReceiptByHash(t *testing.T) { "l2_gas": 0, "data_availability": { "l1_data_gas": 0, - "l1_gas": 0 + "l1_gas": 0, + "l2_gas": 0 }, "steps": 31 } @@ -698,7 +701,8 @@ func TestTransactionReceiptByHash(t *testing.T) { "l2_gas": 0, "data_availability": { "l1_data_gas": 0, - "l1_gas": 0 + "l1_gas": 0, + "l2_gas": 0 }, "steps": 31 } @@ -733,7 +737,8 @@ func TestTransactionReceiptByHash(t *testing.T) { "l2_gas": 0, "data_availability": { "l1_data_gas": 0, - "l1_gas": 0 + "l1_gas": 0, + "l2_gas": 0 }, "steps": 0 } @@ -800,7 +805,8 @@ func TestTransactionReceiptByHash(t *testing.T) { "l2_gas": 0, "data_availability": { "l1_data_gas": 0, - "l1_gas": 0 + "l1_gas": 0, + "l2_gas": 0 } }, "actual_fee": { @@ -861,11 +867,12 @@ func TestTransactionReceiptByHash(t *testing.T) { "poseidon_builtin_applications": 4, "range_check_builtin_applications": 157, "l1_data_gas": 192, - "l1_gas": 0, + "l1_gas": 117620, "l2_gas": 0, "data_availability": { "l1_gas": 0, - "l1_data_gas": 192 + "l1_data_gas": 192, + "l2_gas": 0 } } }` From 6c8e07ec7c13a4c849cc07cdd2a71836eaffccdb Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Tue, 21 Jan 2025 14:37:47 +0300 Subject: [PATCH 29/34] Bump cairo-lang-starknet-classes from 2.7.1 to 2.10.0-rc.1 --- starknet/compiler/rust/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starknet/compiler/rust/Cargo.toml b/starknet/compiler/rust/Cargo.toml index c6bbe4a1ae..7a0eae2870 100644 --- a/starknet/compiler/rust/Cargo.toml +++ b/starknet/compiler/rust/Cargo.toml @@ -11,7 +11,7 @@ overflow-checks = true [dependencies] serde = "1.0.208" serde_json = { version = "1.0.125", features = ["raw_value"] } -cairo-lang-starknet-classes = "2.7.1" +cairo-lang-starknet-classes = "=2.10.0-rc.1" [lib] crate-type = ["staticlib"] From 26b4ac567e5a37104e7a295912cab576cb6763af Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Tue, 21 Jan 2025 15:06:22 +0300 Subject: [PATCH 30/34] Add L1DataGas resource bound to adapters --- adapters/p2p2core/transaction.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/adapters/p2p2core/transaction.go b/adapters/p2p2core/transaction.go index 485e0ba5cc..74c9398496 100644 --- a/adapters/p2p2core/transaction.go +++ b/adapters/p2p2core/transaction.go @@ -106,8 +106,9 @@ func AdaptTransaction(t *gen.Transaction, network *utils.Network) core.Transacti CompiledClassHash: AdaptHash(tx.CompiledClassHash), Tip: tx.Tip, ResourceBounds: map[core.Resource]core.ResourceBounds{ - core.ResourceL1Gas: adaptResourceLimits(tx.ResourceBounds.L1Gas), - core.ResourceL2Gas: adaptResourceLimits(tx.ResourceBounds.L2Gas), + core.ResourceL1Gas: adaptResourceLimits(tx.ResourceBounds.L1Gas), + core.ResourceL2Gas: adaptResourceLimits(tx.ResourceBounds.L2Gas), + core.ResourceL1DataGas: adaptResourceLimits(tx.ResourceBounds.L1DataGas), }, PaymasterData: utils.Map(tx.PaymasterData, AdaptFelt), AccountDeploymentData: utils.Map(tx.AccountDeploymentData, AdaptFelt), @@ -189,8 +190,9 @@ func AdaptTransaction(t *gen.Transaction, network *utils.Network) core.Transacti Nonce: AdaptFelt(tx.Nonce), Tip: tx.Tip, ResourceBounds: map[core.Resource]core.ResourceBounds{ - core.ResourceL1Gas: adaptResourceLimits(tx.ResourceBounds.L1Gas), - core.ResourceL2Gas: adaptResourceLimits(tx.ResourceBounds.L2Gas), + core.ResourceL1Gas: adaptResourceLimits(tx.ResourceBounds.L1Gas), + core.ResourceL2Gas: adaptResourceLimits(tx.ResourceBounds.L2Gas), + core.ResourceL1DataGas: adaptResourceLimits(tx.ResourceBounds.L1DataGas), }, PaymasterData: utils.Map(tx.PaymasterData, AdaptFelt), NonceDAMode: nDAMode, @@ -268,8 +270,9 @@ func AdaptTransaction(t *gen.Transaction, network *utils.Network) core.Transacti EntryPointSelector: nil, Tip: tx.Tip, ResourceBounds: map[core.Resource]core.ResourceBounds{ - core.ResourceL1Gas: adaptResourceLimits(tx.ResourceBounds.L1Gas), - core.ResourceL2Gas: adaptResourceLimits(tx.ResourceBounds.L2Gas), + core.ResourceL1Gas: adaptResourceLimits(tx.ResourceBounds.L1Gas), + core.ResourceL2Gas: adaptResourceLimits(tx.ResourceBounds.L2Gas), + core.ResourceL1DataGas: adaptResourceLimits(tx.ResourceBounds.L1DataGas), }, PaymasterData: utils.Map(tx.PaymasterData, AdaptFelt), NonceDAMode: nDAMode, From a5338d28227b81fe5819440e3c6e4103d2f04087 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 22 Jan 2025 12:12:58 +0300 Subject: [PATCH 31/34] Add nil check --- core/transaction.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/transaction.go b/core/transaction.go index 9f20566c00..38d2fe67cf 100644 --- a/core/transaction.go +++ b/core/transaction.go @@ -481,7 +481,7 @@ func tipAndResourcesHash(tip uint64, resourceBounds map[Resource]ResourceBounds) } // l1_data_gas resource bounds were added in 0.13.4 - if bounds, ok := resourceBounds[ResourceL1DataGas]; ok { + if bounds, ok := resourceBounds[ResourceL1DataGas]; ok && bounds.MaxPricePerUnit != nil { l1DataBounds := new(felt.Felt).SetBytes(bounds.Bytes(ResourceL1DataGas)) elems = append(elems, l1DataBounds) } From da345c191973d6adabecd936f9399760d75de486 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 22 Jan 2025 12:29:25 +0300 Subject: [PATCH 32/34] Add network check --- p2p/sync/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/sync/sync.go b/p2p/sync/sync.go index 90c39dfc54..6f2f7ef985 100644 --- a/p2p/sync/sync.go +++ b/p2p/sync/sync.go @@ -358,7 +358,7 @@ func (s *Service) adaptAndSanityCheckBlock(ctx context.Context, header *gen.Sign return } - if blockVer.LessThan(core.Ver0_13_2) { + if blockVer.LessThan(core.Ver0_13_2) && s.network.L2ChainID == "SN_SEPOLIA" { expectedHash := hashstorage.SepoliaBlockHashesMap[coreBlock.Number] post0132Hash, _, err := core.Post0132Hash(coreBlock, stateDiff) if err != nil { From 454c9b76d2bcb013db4c27b5b4a25700114949b1 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 22 Jan 2025 12:39:37 +0300 Subject: [PATCH 33/34] Add mil check --- adapters/core2p2p/block.go | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/adapters/core2p2p/block.go b/adapters/core2p2p/block.go index 37e71310b2..6fb5f09e84 100644 --- a/adapters/core2p2p/block.go +++ b/adapters/core2p2p/block.go @@ -30,6 +30,21 @@ func adaptSignature(sig []*felt.Felt) *gen.ConsensusSignature { func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, stateDiffCommitment *felt.Felt, stateDiffLength uint64, ) *gen.SignedBlockHeader { + var l1DataGasPriceFri, l1DataGasPriceWei, l2GasPriceFri, l2GasPriceWei *felt.Felt + if l1DataGasPrice := header.L1DataGasPrice; l1DataGasPrice != nil { + l1DataGasPriceFri = l1DataGasPrice.PriceInFri + l1DataGasPriceWei = l1DataGasPrice.PriceInWei + } else { + l1DataGasPriceFri = &felt.Zero + l1DataGasPriceWei = &felt.Zero + } + if l2GasPrice := header.L2GasPrice; l2GasPrice != nil { + l2GasPriceFri = l2GasPrice.PriceInFri + l2GasPriceWei = l2GasPrice.PriceInWei + } else { + l2GasPriceFri = &felt.Zero + l2GasPriceWei = &felt.Zero + } return &gen.SignedBlockHeader{ BlockHash: AdaptHash(header.Hash), ParentHash: AdaptHash(header.ParentHash), @@ -54,11 +69,11 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, Root: AdaptHash(stateDiffCommitment), }, L1GasPriceWei: AdaptUint128(header.L1GasPriceETH), - L1DataGasPriceFri: AdaptUint128(header.L1DataGasPrice.PriceInFri), - L1DataGasPriceWei: AdaptUint128(header.L1DataGasPrice.PriceInWei), + L1DataGasPriceFri: AdaptUint128(l1DataGasPriceFri), + L1DataGasPriceWei: AdaptUint128(l1DataGasPriceWei), L1DataAvailabilityMode: adaptL1DA(header.L1DAMode), - L2GasPriceFri: AdaptUint128(header.L2GasPrice.PriceInFri), - L2GasPriceWei: AdaptUint128(header.L2GasPrice.PriceInWei), + L2GasPriceFri: AdaptUint128(l2GasPriceFri), + L2GasPriceWei: AdaptUint128(l2GasPriceWei), } } From 9ab791d43de52067eaedbb88ef967885ec94d214 Mon Sep 17 00:00:00 2001 From: AnkushinDaniil Date: Wed, 22 Jan 2025 12:44:18 +0300 Subject: [PATCH 34/34] Remove L2GasPriceETH and L2GasPriceSTRK methods --- starknet/block.go | 16 ---------------- starknet/block_test.go | 30 ------------------------------ 2 files changed, 46 deletions(-) delete mode 100644 starknet/block_test.go diff --git a/starknet/block.go b/starknet/block.go index 39ad3ad55b..ceabe842af 100644 --- a/starknet/block.go +++ b/starknet/block.go @@ -53,22 +53,6 @@ func (b *Block) L1GasPriceSTRK() *felt.Felt { return b.GasPriceFRI } -// TODO: Fix when we have l2 gas price -func (b *Block) L2GasPriceETH() *felt.Felt { - if b.L2GasPrice != nil { - return b.L2GasPrice.PriceInWei - } - return &felt.Zero -} - -// TODO: Fix when we have l2 gas price -func (b *Block) L2GasPriceSTRK() *felt.Felt { - if b.L2GasPrice != nil { - return b.L2GasPrice.PriceInFri - } - return &felt.Zero -} - type L1DAMode uint const ( diff --git a/starknet/block_test.go b/starknet/block_test.go deleted file mode 100644 index 73dd158bab..0000000000 --- a/starknet/block_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package starknet_test - -import ( - "testing" - - "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/starknet" - "github.com/stretchr/testify/assert" -) - -func TestL2GasPrice(t *testing.T) { - t.Run("L2GasPrice is not set", func(t *testing.T) { - block := starknet.Block{} - assert.Equal(t, &felt.Zero, block.L2GasPriceETH()) - assert.Equal(t, &felt.Zero, block.L2GasPriceSTRK()) - }) - - t.Run("L2GasPrice is set", func(t *testing.T) { - gasPriceWei := new(felt.Felt).SetUint64(100) - gasPriceFri := new(felt.Felt).SetUint64(50) - block := starknet.Block{ - L2GasPrice: &starknet.GasPrice{ - PriceInWei: gasPriceWei, - PriceInFri: gasPriceFri, - }, - } - assert.Equal(t, gasPriceWei, block.L2GasPriceETH()) - assert.Equal(t, gasPriceFri, block.L2GasPriceSTRK()) - }) -}