From 2653ae9e0ec69d5082f9c8672472c11938d0be91 Mon Sep 17 00:00:00 2001 From: Daniil Ankushin Date: Wed, 8 Jan 2025 13:40:57 +0900 Subject: [PATCH] p2p restructure (#2342) Refactor: Restructure `p2p` package. This commit focuses on restructuring the `p2p` package to improve organization and maintainability. Key updates include: 1. **Package Restructure**: - Renamed `peers.go` to `codec.go`. - Refactored the folder structure: - Moved generated protobuf files to a new `gen` directory. - Grouped related files into subdirectories (`peers`, `sync`, etc.). - Simplified and clarified the organization of the `p2p` package. 2. **Adapter Function Updates**: - Updated adapter functions in multiple files (e.g., `block.go`, `class.go`, `felt.go`, `receipt.go`, `state.go`, and `transaction.go`) to reference the `gen` package instead of `spec`. 3. **Import Statement Updates**: - Updated all import statements to replace `spec` with `gen`. 4. **Makefile Changes**: - Added a new `generate-buf` target to support protobuf generation using the `buf` tool. 5. **Protobuf Tooling**: - Switched from `protoc` to `buf` for managing protobuf files. This restructuring streamlines the `p2p` package, enhancing its readability and modularity while transitioning to the `gen` package for consistency across the codebase. --- Makefile | 4 + adapters/core2p2p/block.go | 30 +- adapters/core2p2p/class.go | 26 +- adapters/core2p2p/felt.go | 24 +- adapters/core2p2p/receipt.go | 58 +- adapters/core2p2p/state.go | 12 +- adapters/core2p2p/transaction.go | 68 +- adapters/p2p2core/block.go | 14 +- adapters/p2p2core/class.go | 20 +- adapters/p2p2core/felt.go | 12 +- adapters/p2p2core/felt_test.go | 4 +- adapters/p2p2core/receipt.go | 22 +- adapters/p2p2core/state.go | 10 +- adapters/p2p2core/transaction.go | 36 +- buf.gen.yaml | 6 + buf.yaml | 12 + p2p/{peers.go => codec.go} | 0 p2p/gen/class.pb.go | 714 +++++ p2p/gen/common.pb.go | 973 +++++++ p2p/gen/event.pb.go | 313 +++ p2p/gen/header.pb.go | 625 +++++ p2p/gen/receipt.pb.go | 1048 ++++++++ p2p/gen/state.pb.go | 482 ++++ p2p/gen/transaction.pb.go | 2074 +++++++++++++++ p2p/gossip_tracer.go | 2 +- p2p/p2p.go | 25 +- p2p/{starknet => peers}/handlers.go | 85 +- p2p/{starknet => peers}/iterator.go | 2 +- p2p/{starknet => peers}/iterator_test.go | 2 +- p2p/{starknet/p2p/proto => spec}/class.proto | 6 +- p2p/{starknet/p2p/proto => spec}/common.proto | 4 +- p2p/{starknet/p2p/proto => spec}/event.proto | 6 +- p2p/{starknet/p2p/proto => spec}/header.proto | 6 +- p2p/{starknet/p2p/proto => spec}/notes.md | 0 .../p2p/proto => spec}/receipt.proto | 6 +- p2p/{starknet/p2p/proto => spec}/state.proto | 6 +- .../p2p/proto => spec}/transaction.proto | 8 +- p2p/starknet/spec/class.pb.go | 830 ------ p2p/starknet/spec/common.pb.go | 1167 -------- p2p/starknet/spec/event.pb.go | 358 --- p2p/starknet/spec/header.pb.go | 696 ----- p2p/starknet/spec/receipt.pb.go | 1207 --------- p2p/starknet/spec/state.pb.go | 555 ---- p2p/starknet/spec/transaction.pb.go | 2337 ----------------- p2p/{starknet => sync}/bytereader.go | 2 +- p2p/{starknet => sync}/bytereader_pkg_test.go | 2 +- p2p/{starknet => sync}/client.go | 26 +- p2p/{starknet => sync}/ids.go | 2 +- p2p/{ => sync}/sync.go | 109 +- 49 files changed, 6568 insertions(+), 7468 deletions(-) create mode 100644 buf.gen.yaml create mode 100644 buf.yaml rename p2p/{peers.go => codec.go} (100%) create mode 100644 p2p/gen/class.pb.go create mode 100644 p2p/gen/common.pb.go create mode 100644 p2p/gen/event.pb.go create mode 100644 p2p/gen/header.pb.go create mode 100644 p2p/gen/receipt.pb.go create mode 100644 p2p/gen/state.pb.go create mode 100644 p2p/gen/transaction.pb.go rename p2p/{starknet => peers}/handlers.go (80%) rename p2p/{starknet => peers}/iterator.go (99%) rename p2p/{starknet => peers}/iterator_test.go (99%) rename p2p/{starknet/p2p/proto => spec}/class.proto (92%) rename p2p/{starknet/p2p/proto => spec}/common.proto (94%) rename p2p/{starknet/p2p/proto => spec}/event.proto (83%) rename p2p/{starknet/p2p/proto => spec}/header.proto (96%) rename p2p/{starknet/p2p/proto => spec}/notes.md (100%) rename p2p/{starknet/p2p/proto => spec}/receipt.proto (93%) rename p2p/{starknet/p2p/proto => spec}/state.proto (92%) rename p2p/{starknet/p2p/proto => spec}/transaction.proto (97%) delete mode 100644 p2p/starknet/spec/class.pb.go delete mode 100644 p2p/starknet/spec/common.pb.go delete mode 100644 p2p/starknet/spec/event.pb.go delete mode 100644 p2p/starknet/spec/header.pb.go delete mode 100644 p2p/starknet/spec/receipt.pb.go delete mode 100644 p2p/starknet/spec/state.pb.go delete mode 100644 p2p/starknet/spec/transaction.pb.go rename p2p/{starknet => sync}/bytereader.go (94%) rename p2p/{starknet => sync}/bytereader_pkg_test.go (96%) rename p2p/{starknet => sync}/client.go (66%) rename p2p/{starknet => sync}/ids.go (96%) rename p2p/{ => sync}/sync.go (82%) diff --git a/Makefile b/Makefile index 6e0b8e0f0c..007e2d0525 100644 --- a/Makefile +++ b/Makefile @@ -57,8 +57,12 @@ core-rust: compiler: $(MAKE) -C starknet/compiler/rust $(VM_TARGET) +generate-buf: ## Generate protobuf files + @buf generate + generate: ## Generate mocks and code mkdir -p mocks + generate-buf go generate ./... clean-testcache: ## Clean Go test cache diff --git a/adapters/core2p2p/block.go b/adapters/core2p2p/block.go index fa3c5b446d..3a57bc35cc 100644 --- a/adapters/core2p2p/block.go +++ b/adapters/core2p2p/block.go @@ -5,23 +5,23 @@ import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) -func AdaptBlockID(header *core.Header) *spec.BlockID { +func AdaptBlockID(header *core.Header) *gen.BlockID { if header == nil { return nil } - return &spec.BlockID{ + return &gen.BlockID{ Number: header.Number, Header: AdaptHash(header.Hash), } } -func AdaptSignature(sig []*felt.Felt) *spec.ConsensusSignature { - return &spec.ConsensusSignature{ +func AdaptSignature(sig []*felt.Felt) *gen.ConsensusSignature { + return &gen.ConsensusSignature{ R: AdaptFelt(sig[0]), S: AdaptFelt(sig[1]), } @@ -29,19 +29,19 @@ func AdaptSignature(sig []*felt.Felt) *spec.ConsensusSignature { func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, stateDiffCommitment *felt.Felt, stateDiffLength uint64, -) *spec.SignedBlockHeader { - return &spec.SignedBlockHeader{ +) *gen.SignedBlockHeader { + return &gen.SignedBlockHeader{ BlockHash: AdaptHash(header.Hash), ParentHash: AdaptHash(header.ParentHash), Number: header.Number, Time: header.Timestamp, SequencerAddress: AdaptAddress(header.SequencerAddress), StateRoot: AdaptHash(header.GlobalStateRoot), - Transactions: &spec.Patricia{ + Transactions: &gen.Patricia{ NLeaves: header.TransactionCount, Root: AdaptHash(commitments.TransactionCommitment), }, - Events: &spec.Patricia{ + Events: &gen.Patricia{ NLeaves: header.EventCount, Root: AdaptHash(commitments.EventCommitment), }, @@ -49,7 +49,7 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, ProtocolVersion: header.ProtocolVersion, GasPriceFri: AdaptUint128(header.GasPriceSTRK), Signatures: utils.Map(header.Signatures, AdaptSignature), - StateDiffCommitment: &spec.StateDiffCommitment{ + StateDiffCommitment: &gen.StateDiffCommitment{ StateDiffLength: stateDiffLength, Root: AdaptHash(stateDiffCommitment), }, @@ -60,23 +60,23 @@ func AdaptHeader(header *core.Header, commitments *core.BlockCommitments, } } -func adaptL1DA(da core.L1DAMode) spec.L1DataAvailabilityMode { +func adaptL1DA(da core.L1DAMode) gen.L1DataAvailabilityMode { switch da { case core.Calldata: - return spec.L1DataAvailabilityMode_Calldata + return gen.L1DataAvailabilityMode_Calldata case core.Blob: - return spec.L1DataAvailabilityMode_Blob + return gen.L1DataAvailabilityMode_Blob default: panic(fmt.Errorf("unknown L1DAMode %v", da)) } } -func AdaptEvent(e *core.Event, txH *felt.Felt) *spec.Event { +func AdaptEvent(e *core.Event, txH *felt.Felt) *gen.Event { if e == nil { return nil } - return &spec.Event{ + return &gen.Event{ TransactionHash: AdaptHash(txH), FromAddress: AdaptFelt(e.From), Keys: utils.Map(e.Keys, AdaptFelt), diff --git a/adapters/core2p2p/class.go b/adapters/core2p2p/class.go index 66c9d9d088..81c0a37098 100644 --- a/adapters/core2p2p/class.go +++ b/adapters/core2p2p/class.go @@ -4,11 +4,11 @@ import ( "fmt" "github.com/NethermindEth/juno/core" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) -func AdaptClass(class core.Class) *spec.Class { +func AdaptClass(class core.Class) *gen.Class { if class == nil { return nil } @@ -20,9 +20,9 @@ func AdaptClass(class core.Class) *spec.Class { switch v := class.(type) { case *core.Cairo0Class: - return &spec.Class{ - Class: &spec.Class_Cairo0{ - Cairo0: &spec.Cairo0Class{ + return &gen.Class{ + Class: &gen.Class_Cairo0{ + Cairo0: &gen.Cairo0Class{ Abi: string(v.Abi), Externals: utils.Map(v.Externals, adaptEntryPoint), L1Handlers: utils.Map(v.L1Handlers, adaptEntryPoint), @@ -34,11 +34,11 @@ func AdaptClass(class core.Class) *spec.Class { ClassHash: AdaptHash(hash), } case *core.Cairo1Class: - return &spec.Class{ - Class: &spec.Class_Cairo1{ - Cairo1: &spec.Cairo1Class{ + return &gen.Class{ + Class: &gen.Class_Cairo1{ + Cairo1: &gen.Cairo1Class{ Abi: v.Abi, - EntryPoints: &spec.Cairo1EntryPoints{ + EntryPoints: &gen.Cairo1EntryPoints{ Externals: utils.Map(v.EntryPoints.External, adaptSierra), L1Handlers: utils.Map(v.EntryPoints.L1Handler, adaptSierra), Constructors: utils.Map(v.EntryPoints.Constructor, adaptSierra), @@ -55,15 +55,15 @@ func AdaptClass(class core.Class) *spec.Class { } } -func adaptSierra(e core.SierraEntryPoint) *spec.SierraEntryPoint { - return &spec.SierraEntryPoint{ +func adaptSierra(e core.SierraEntryPoint) *gen.SierraEntryPoint { + return &gen.SierraEntryPoint{ Index: e.Index, Selector: AdaptFelt(e.Selector), } } -func adaptEntryPoint(e core.EntryPoint) *spec.EntryPoint { - return &spec.EntryPoint{ +func adaptEntryPoint(e core.EntryPoint) *gen.EntryPoint { + return &gen.EntryPoint{ Selector: AdaptFelt(e.Selector), Offset: e.Offset.Uint64(), } diff --git a/adapters/core2p2p/felt.go b/adapters/core2p2p/felt.go index 67cf3cfc84..f8eeeeb701 100644 --- a/adapters/core2p2p/felt.go +++ b/adapters/core2p2p/felt.go @@ -2,55 +2,55 @@ package core2p2p import ( "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) -func AdaptHash(f *felt.Felt) *spec.Hash { +func AdaptHash(f *felt.Felt) *gen.Hash { if f == nil { return nil } - return &spec.Hash{ + return &gen.Hash{ Elements: f.Marshal(), } } -func AdaptAccountSignature(signature []*felt.Felt) *spec.AccountSignature { - return &spec.AccountSignature{ +func AdaptAccountSignature(signature []*felt.Felt) *gen.AccountSignature { + return &gen.AccountSignature{ Parts: utils.Map(signature, AdaptFelt), } } -func AdaptFelt(f *felt.Felt) *spec.Felt252 { +func AdaptFelt(f *felt.Felt) *gen.Felt252 { if f == nil { return nil } - return &spec.Felt252{ + return &gen.Felt252{ Elements: f.Marshal(), } } -func AdaptFeltSlice(sl []*felt.Felt) []*spec.Felt252 { +func AdaptFeltSlice(sl []*felt.Felt) []*gen.Felt252 { return utils.Map(sl, AdaptFelt) } -func AdaptAddress(f *felt.Felt) *spec.Address { +func AdaptAddress(f *felt.Felt) *gen.Address { if f == nil { return nil } - return &spec.Address{ + return &gen.Address{ Elements: f.Marshal(), } } -func AdaptUint128(f *felt.Felt) *spec.Uint128 { +func AdaptUint128(f *felt.Felt) *gen.Uint128 { // bits represents value in little endian byte order // i.e. first is least significant byte bits := f.Bits() - return &spec.Uint128{ + return &gen.Uint128{ Low: bits[0], High: bits[1], } diff --git a/adapters/core2p2p/receipt.go b/adapters/core2p2p/receipt.go index 9067524e73..24bc43476e 100644 --- a/adapters/core2p2p/receipt.go +++ b/adapters/core2p2p/receipt.go @@ -3,55 +3,55 @@ package core2p2p import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) // Core Transaction receipt does not contain all the information required to create p2p spec Receipt, therefore, // we have to pass the transaction as well. -func AdaptReceipt(r *core.TransactionReceipt, txn core.Transaction) *spec.Receipt { +func AdaptReceipt(r *core.TransactionReceipt, txn core.Transaction) *gen.Receipt { if r == nil || txn == nil { return nil } switch t := txn.(type) { case *core.InvokeTransaction: - return &spec.Receipt{ - Type: &spec.Receipt_Invoke_{ - Invoke: &spec.Receipt_Invoke{ + return &gen.Receipt{ + Type: &gen.Receipt_Invoke_{ + Invoke: &gen.Receipt_Invoke{ Common: receiptCommon(r), }, }, } case *core.L1HandlerTransaction: - return &spec.Receipt{ - Type: &spec.Receipt_L1Handler_{ - L1Handler: &spec.Receipt_L1Handler{ + return &gen.Receipt{ + Type: &gen.Receipt_L1Handler_{ + L1Handler: &gen.Receipt_L1Handler{ Common: receiptCommon(r), - MsgHash: &spec.Hash256{Elements: t.MessageHash()}, + MsgHash: &gen.Hash256{Elements: t.MessageHash()}, }, }, } case *core.DeclareTransaction: - return &spec.Receipt{ - Type: &spec.Receipt_Declare_{ - Declare: &spec.Receipt_Declare{ + return &gen.Receipt{ + Type: &gen.Receipt_Declare_{ + Declare: &gen.Receipt_Declare{ Common: receiptCommon(r), }, }, } case *core.DeployTransaction: - return &spec.Receipt{ - Type: &spec.Receipt_DeprecatedDeploy{ - DeprecatedDeploy: &spec.Receipt_Deploy{ + return &gen.Receipt{ + Type: &gen.Receipt_DeprecatedDeploy{ + DeprecatedDeploy: &gen.Receipt_Deploy{ Common: receiptCommon(r), ContractAddress: AdaptFelt(t.ContractAddress), }, }, } case *core.DeployAccountTransaction: - return &spec.Receipt{ - Type: &spec.Receipt_DeployAccount_{ - DeployAccount: &spec.Receipt_DeployAccount{ + return &gen.Receipt{ + Type: &gen.Receipt_DeployAccount_{ + DeployAccount: &gen.Receipt_DeployAccount{ Common: receiptCommon(r), ContractAddress: AdaptFelt(t.ContractAddress), }, @@ -62,7 +62,7 @@ func AdaptReceipt(r *core.TransactionReceipt, txn core.Transaction) *spec.Receip } } -func receiptCommon(r *core.TransactionReceipt) *spec.Receipt_Common { +func receiptCommon(r *core.TransactionReceipt) *gen.Receipt_Common { var revertReason *string if r.RevertReason != "" { revertReason = &r.RevertReason @@ -70,7 +70,7 @@ func receiptCommon(r *core.TransactionReceipt) *spec.Receipt_Common { revertReason = utils.Ptr("") } - return &spec.Receipt_Common{ + return &gen.Receipt_Common{ ActualFee: AdaptFelt(r.Fee), PriceUnit: adaptPriceUnit(r.FeeUnit), MessagesSent: utils.Map(r.L2ToL1Message, AdaptMessageToL1), @@ -79,26 +79,26 @@ func receiptCommon(r *core.TransactionReceipt) *spec.Receipt_Common { } } -func adaptPriceUnit(unit core.FeeUnit) spec.PriceUnit { +func adaptPriceUnit(unit core.FeeUnit) gen.PriceUnit { switch unit { case core.WEI: - return spec.PriceUnit_Wei + return gen.PriceUnit_Wei case core.STRK: - return spec.PriceUnit_Fri // todo(kirill) recheck + return gen.PriceUnit_Fri // todo(kirill) recheck default: panic("unreachable adaptPriceUnit") } } -func AdaptMessageToL1(mL1 *core.L2ToL1Message) *spec.MessageToL1 { - return &spec.MessageToL1{ +func AdaptMessageToL1(mL1 *core.L2ToL1Message) *gen.MessageToL1 { + return &gen.MessageToL1{ FromAddress: AdaptFelt(mL1.From), Payload: utils.Map(mL1.Payload, AdaptFelt), - ToAddress: &spec.EthereumAddress{Elements: mL1.To.Bytes()}, + ToAddress: &gen.EthereumAddress{Elements: mL1.To.Bytes()}, } } -func AdaptExecutionResources(er *core.ExecutionResources) *spec.Receipt_ExecutionResources { +func AdaptExecutionResources(er *core.ExecutionResources) *gen.Receipt_ExecutionResources { if er == nil { return nil } @@ -112,8 +112,8 @@ func AdaptExecutionResources(er *core.ExecutionResources) *spec.Receipt_Executio totalL1Gas = new(felt.Felt).SetUint64(tgs.L1Gas) } - return &spec.Receipt_ExecutionResources{ - Builtins: &spec.Receipt_ExecutionResources_BuiltinCounter{ + return &gen.Receipt_ExecutionResources{ + Builtins: &gen.Receipt_ExecutionResources_BuiltinCounter{ Bitwise: uint32(er.BuiltinInstanceCounter.Bitwise), Ecdsa: uint32(er.BuiltinInstanceCounter.Ecsda), EcOp: uint32(er.BuiltinInstanceCounter.EcOp), diff --git a/adapters/core2p2p/state.go b/adapters/core2p2p/state.go index ef4d023541..f6146c9ab5 100644 --- a/adapters/core2p2p/state.go +++ b/adapters/core2p2p/state.go @@ -2,12 +2,12 @@ package core2p2p import ( "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) -func AdaptContractDiff(addr, nonce, classHash *felt.Felt, storageDiff map[felt.Felt]*felt.Felt) *spec.ContractDiff { - return &spec.ContractDiff{ +func AdaptContractDiff(addr, nonce, classHash *felt.Felt, storageDiff map[felt.Felt]*felt.Felt) *gen.ContractDiff { + return &gen.ContractDiff{ Address: AdaptAddress(addr), Nonce: AdaptFelt(nonce), ClassHash: AdaptHash(classHash), // This will need to be set if deployed_contracts and replaced_classes are removed from StateDiff @@ -16,9 +16,9 @@ func AdaptContractDiff(addr, nonce, classHash *felt.Felt, storageDiff map[felt.F } } -func AdaptStorageDiff(diff map[felt.Felt]*felt.Felt) []*spec.ContractStoredValue { - return utils.ToSlice(diff, func(key felt.Felt, value *felt.Felt) *spec.ContractStoredValue { - return &spec.ContractStoredValue{ +func AdaptStorageDiff(diff map[felt.Felt]*felt.Felt) []*gen.ContractStoredValue { + return utils.ToSlice(diff, func(key felt.Felt, value *felt.Felt) *gen.ContractStoredValue { + return &gen.ContractStoredValue{ Key: AdaptFelt(&key), Value: AdaptFelt(value), } diff --git a/adapters/core2p2p/transaction.go b/adapters/core2p2p/transaction.go index 5b0f8baffb..9529ec4c21 100644 --- a/adapters/core2p2p/transaction.go +++ b/adapters/core2p2p/transaction.go @@ -5,17 +5,17 @@ import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) //nolint:funlen,gocyclo -func AdaptTransaction(transaction core.Transaction) *spec.Transaction { +func AdaptTransaction(transaction core.Transaction) *gen.Transaction { if transaction == nil { return nil } - var specTx spec.Transaction + var specTx gen.Transaction switch tx := transaction.(type) { case *core.DeployTransaction: @@ -23,8 +23,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { case *core.DeployAccountTransaction: switch { case tx.Version.Is(1): - specTx.Txn = &spec.Transaction_DeployAccountV1_{ - DeployAccountV1: &spec.Transaction_DeployAccountV1{ + specTx.Txn = &gen.Transaction_DeployAccountV1_{ + DeployAccountV1: &gen.Transaction_DeployAccountV1{ MaxFee: AdaptFelt(tx.MaxFee), Signature: AdaptAccountSignature(tx.Signature()), ClassHash: AdaptHash(tx.ClassHash), @@ -34,8 +34,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { }, } case tx.Version.Is(3): - specTx.Txn = &spec.Transaction_DeployAccountV3_{ - DeployAccountV3: &spec.Transaction_DeployAccountV3{ + specTx.Txn = &gen.Transaction_DeployAccountV3_{ + DeployAccountV3: &gen.Transaction_DeployAccountV3{ Signature: AdaptAccountSignature(tx.Signature()), ClassHash: AdaptHash(tx.ClassHash), Nonce: AdaptFelt(tx.Nonce), @@ -54,8 +54,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { case *core.DeclareTransaction: switch { case tx.Version.Is(0): - specTx.Txn = &spec.Transaction_DeclareV0_{ - DeclareV0: &spec.Transaction_DeclareV0{ + specTx.Txn = &gen.Transaction_DeclareV0_{ + DeclareV0: &gen.Transaction_DeclareV0{ Sender: AdaptAddress(tx.SenderAddress), MaxFee: AdaptFelt(tx.MaxFee), Signature: AdaptAccountSignature(tx.Signature()), @@ -63,8 +63,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { }, } case tx.Version.Is(1): - specTx.Txn = &spec.Transaction_DeclareV1_{ - DeclareV1: &spec.Transaction_DeclareV1{ + specTx.Txn = &gen.Transaction_DeclareV1_{ + DeclareV1: &gen.Transaction_DeclareV1{ Sender: AdaptAddress(tx.SenderAddress), MaxFee: AdaptFelt(tx.MaxFee), Signature: AdaptAccountSignature(tx.Signature()), @@ -73,8 +73,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { }, } case tx.Version.Is(2): - specTx.Txn = &spec.Transaction_DeclareV2_{ - DeclareV2: &spec.Transaction_DeclareV2{ + specTx.Txn = &gen.Transaction_DeclareV2_{ + DeclareV2: &gen.Transaction_DeclareV2{ Sender: AdaptAddress(tx.SenderAddress), MaxFee: AdaptFelt(tx.MaxFee), Signature: AdaptAccountSignature(tx.Signature()), @@ -84,8 +84,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { }, } case tx.Version.Is(3): - specTx.Txn = &spec.Transaction_DeclareV3_{ - DeclareV3: &spec.Transaction_DeclareV3{ + specTx.Txn = &gen.Transaction_DeclareV3_{ + DeclareV3: &gen.Transaction_DeclareV3{ Sender: AdaptAddress(tx.SenderAddress), Signature: AdaptAccountSignature(tx.Signature()), ClassHash: AdaptHash(tx.ClassHash), @@ -105,8 +105,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { case *core.InvokeTransaction: switch { case tx.Version.Is(0): - specTx.Txn = &spec.Transaction_InvokeV0_{ - InvokeV0: &spec.Transaction_InvokeV0{ + specTx.Txn = &gen.Transaction_InvokeV0_{ + InvokeV0: &gen.Transaction_InvokeV0{ MaxFee: AdaptFelt(tx.MaxFee), Signature: AdaptAccountSignature(tx.Signature()), Address: AdaptAddress(tx.ContractAddress), @@ -115,8 +115,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { }, } case tx.Version.Is(1): - specTx.Txn = &spec.Transaction_InvokeV1_{ - InvokeV1: &spec.Transaction_InvokeV1{ + specTx.Txn = &gen.Transaction_InvokeV1_{ + InvokeV1: &gen.Transaction_InvokeV1{ Sender: AdaptAddress(tx.SenderAddress), MaxFee: AdaptFelt(tx.MaxFee), Signature: AdaptAccountSignature(tx.Signature()), @@ -125,8 +125,8 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { }, } case tx.Version.Is(3): - specTx.Txn = &spec.Transaction_InvokeV3_{ - InvokeV3: &spec.Transaction_InvokeV3{ + specTx.Txn = &gen.Transaction_InvokeV3_{ + InvokeV3: &gen.Transaction_InvokeV3{ Sender: AdaptAddress(tx.SenderAddress), Signature: AdaptAccountSignature(tx.Signature()), Calldata: AdaptFeltSlice(tx.CallData), @@ -151,24 +151,24 @@ func AdaptTransaction(transaction core.Transaction) *spec.Transaction { return &specTx } -func adaptResourceLimits(bounds core.ResourceBounds) *spec.ResourceLimits { +func adaptResourceLimits(bounds core.ResourceBounds) *gen.ResourceLimits { maxAmount := new(felt.Felt).SetUint64(bounds.MaxAmount) - return &spec.ResourceLimits{ + return &gen.ResourceLimits{ MaxAmount: AdaptFelt(maxAmount), MaxPricePerUnit: AdaptFelt(bounds.MaxPricePerUnit), } } -func adaptResourceBounds(rb map[core.Resource]core.ResourceBounds) *spec.ResourceBounds { - return &spec.ResourceBounds{ +func adaptResourceBounds(rb map[core.Resource]core.ResourceBounds) *gen.ResourceBounds { + return &gen.ResourceBounds{ L1Gas: adaptResourceLimits(rb[core.ResourceL1Gas]), L2Gas: adaptResourceLimits(rb[core.ResourceL2Gas]), } } -func adaptDeployTransaction(tx *core.DeployTransaction) *spec.Transaction_Deploy_ { - return &spec.Transaction_Deploy_{ - Deploy: &spec.Transaction_Deploy{ +func adaptDeployTransaction(tx *core.DeployTransaction) *gen.Transaction_Deploy_ { + return &gen.Transaction_Deploy_{ + Deploy: &gen.Transaction_Deploy{ ClassHash: AdaptHash(tx.ClassHash), AddressSalt: AdaptFelt(tx.ContractAddressSalt), Calldata: AdaptFeltSlice(tx.ConstructorCallData), @@ -177,9 +177,9 @@ func adaptDeployTransaction(tx *core.DeployTransaction) *spec.Transaction_Deploy } } -func adaptL1HandlerTransaction(tx *core.L1HandlerTransaction) *spec.Transaction_L1Handler { - return &spec.Transaction_L1Handler{ - L1Handler: &spec.Transaction_L1HandlerV0{ +func adaptL1HandlerTransaction(tx *core.L1HandlerTransaction) *gen.Transaction_L1Handler { + return &gen.Transaction_L1Handler{ + L1Handler: &gen.Transaction_L1HandlerV0{ Nonce: AdaptFelt(tx.Nonce), Address: AdaptAddress(tx.ContractAddress), EntryPointSelector: AdaptFelt(tx.EntryPointSelector), @@ -188,12 +188,12 @@ func adaptL1HandlerTransaction(tx *core.L1HandlerTransaction) *spec.Transaction_ } } -func adaptVolitionDomain(mode core.DataAvailabilityMode) spec.VolitionDomain { +func adaptVolitionDomain(mode core.DataAvailabilityMode) gen.VolitionDomain { switch mode { case core.DAModeL1: - return spec.VolitionDomain_L1 + return gen.VolitionDomain_L1 case core.DAModeL2: - return spec.VolitionDomain_L2 + return gen.VolitionDomain_L2 default: panic("unreachable in adaptVolitionDomain") } diff --git a/adapters/p2p2core/block.go b/adapters/p2p2core/block.go index e593a3d6c8..e39e826c4b 100644 --- a/adapters/p2p2core/block.go +++ b/adapters/p2p2core/block.go @@ -5,12 +5,12 @@ import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" "github.com/bits-and-blooms/bloom/v3" ) -func AdaptEvent(e *spec.Event) *core.Event { +func AdaptEvent(e *gen.Event) *core.Event { if e == nil { return nil } @@ -22,7 +22,7 @@ func AdaptEvent(e *spec.Event) *core.Event { } } -func AdaptBlockHeader(h *spec.SignedBlockHeader, eventsBloom *bloom.BloomFilter) *core.Header { +func AdaptBlockHeader(h *gen.SignedBlockHeader, eventsBloom *bloom.BloomFilter) *core.Header { return &core.Header{ Hash: AdaptHash(h.BlockHash), ParentHash: AdaptHash(h.ParentHash), @@ -45,15 +45,15 @@ func AdaptBlockHeader(h *spec.SignedBlockHeader, eventsBloom *bloom.BloomFilter) } } -func adaptSignature(cs *spec.ConsensusSignature) []*felt.Felt { +func adaptSignature(cs *gen.ConsensusSignature) []*felt.Felt { return []*felt.Felt{AdaptFelt(cs.R), AdaptFelt(cs.S)} } -func adaptDA(da spec.L1DataAvailabilityMode) core.L1DAMode { +func adaptDA(da gen.L1DataAvailabilityMode) core.L1DAMode { switch da { - case spec.L1DataAvailabilityMode_Calldata: + case gen.L1DataAvailabilityMode_Calldata: return core.Calldata - case spec.L1DataAvailabilityMode_Blob: + case gen.L1DataAvailabilityMode_Blob: return core.Blob default: panic(fmt.Errorf("unsupported DA mode %v", da)) diff --git a/adapters/p2p2core/class.go b/adapters/p2p2core/class.go index 3962787253..d0991ae6b7 100644 --- a/adapters/p2p2core/class.go +++ b/adapters/p2p2core/class.go @@ -8,20 +8,20 @@ import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/crypto" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/starknet" "github.com/NethermindEth/juno/starknet/compiler" "github.com/NethermindEth/juno/utils" ) -func AdaptClass(class *spec.Class) core.Class { +func AdaptClass(class *gen.Class) core.Class { if class == nil { return nil } switch cls := class.Class.(type) { - case *spec.Class_Cairo0: - adaptEP := func(points []*spec.EntryPoint) []core.EntryPoint { + case *gen.Class_Cairo0: + adaptEP := func(points []*gen.EntryPoint) []core.EntryPoint { // usage of NonNilSlice is essential because relevant core class fields are non nil return utils.Map(utils.NonNilSlice(points), adaptEntryPoint) } @@ -34,7 +34,7 @@ func AdaptClass(class *spec.Class) core.Class { Constructors: adaptEP(cairo0.Constructors), Program: cairo0.Program, } - case *spec.Class_Cairo1: + case *gen.Class_Cairo1: cairo1 := cls.Cairo1 abiHash := crypto.StarknetKeccak([]byte(cairo1.Abi)) @@ -44,7 +44,7 @@ func AdaptClass(class *spec.Class) core.Class { panic(err) } - adaptEP := func(points []*spec.SierraEntryPoint) []core.SierraEntryPoint { + adaptEP := func(points []*gen.SierraEntryPoint) []core.SierraEntryPoint { // usage of NonNilSlice is essential because relevant core class fields are non nil return utils.Map(utils.NonNilSlice(points), adaptSierra) } @@ -72,26 +72,26 @@ func AdaptClass(class *spec.Class) core.Class { } } -func adaptSierra(e *spec.SierraEntryPoint) core.SierraEntryPoint { +func adaptSierra(e *gen.SierraEntryPoint) core.SierraEntryPoint { return core.SierraEntryPoint{ Index: e.Index, Selector: AdaptFelt(e.Selector), } } -func adaptEntryPoint(e *spec.EntryPoint) core.EntryPoint { +func adaptEntryPoint(e *gen.EntryPoint) core.EntryPoint { return core.EntryPoint{ Selector: AdaptFelt(e.Selector), Offset: new(felt.Felt).SetUint64(e.Offset), } } -func createCompiledClass(cairo1 *spec.Cairo1Class) (*core.CompiledClass, error) { +func createCompiledClass(cairo1 *gen.Cairo1Class) (*core.CompiledClass, error) { if cairo1 == nil { return nil, nil } - adapt := func(ep *spec.SierraEntryPoint) starknet.SierraEntryPoint { + adapt := func(ep *gen.SierraEntryPoint) starknet.SierraEntryPoint { return starknet.SierraEntryPoint{ Index: ep.Index, Selector: AdaptFelt(ep.Selector), diff --git a/adapters/p2p2core/felt.go b/adapters/p2p2core/felt.go index 5be1c354fc..f317ae0aa4 100644 --- a/adapters/p2p2core/felt.go +++ b/adapters/p2p2core/felt.go @@ -4,24 +4,24 @@ import ( "encoding/binary" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" "github.com/ethereum/go-ethereum/common" ) -func AdaptHash(h *spec.Hash) *felt.Felt { +func AdaptHash(h *gen.Hash) *felt.Felt { return adapt(h) } -func AdaptAddress(h *spec.Address) *felt.Felt { +func AdaptAddress(h *gen.Address) *felt.Felt { return adapt(h) } -func AdaptEthAddress(h *spec.EthereumAddress) common.Address { +func AdaptEthAddress(h *gen.EthereumAddress) common.Address { return common.BytesToAddress(h.Elements) } -func AdaptFelt(f *spec.Felt252) *felt.Felt { +func AdaptFelt(f *gen.Felt252) *felt.Felt { return adapt(f) } @@ -33,7 +33,7 @@ func adapt(v interface{ GetElements() []byte }) *felt.Felt { return new(felt.Felt).SetBytes(v.GetElements()) } -func AdaptUint128(u *spec.Uint128) *felt.Felt { +func AdaptUint128(u *gen.Uint128) *felt.Felt { if u == nil { return nil } diff --git a/adapters/p2p2core/felt_test.go b/adapters/p2p2core/felt_test.go index 46853b06e8..7be5e8e175 100644 --- a/adapters/p2p2core/felt_test.go +++ b/adapters/p2p2core/felt_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" "github.com/stretchr/testify/assert" ) @@ -29,7 +29,7 @@ func TestAdaptUint128(t *testing.T) { } for _, c := range cases { - result := AdaptUint128(&spec.Uint128{ + result := AdaptUint128(&gen.Uint128{ Low: c.Low, High: c.High, }) diff --git a/adapters/p2p2core/receipt.go b/adapters/p2p2core/receipt.go index b00ac531aa..6fdbe405e7 100644 --- a/adapters/p2p2core/receipt.go +++ b/adapters/p2p2core/receipt.go @@ -3,24 +3,24 @@ package p2p2core import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) // todo change type of txHash to spec -func AdaptReceipt(r *spec.Receipt, txHash *felt.Felt) *core.TransactionReceipt { - var common *spec.Receipt_Common +func AdaptReceipt(r *gen.Receipt, txHash *felt.Felt) *core.TransactionReceipt { + var common *gen.Receipt_Common switch r.Type.(type) { - case *spec.Receipt_Invoke_: + case *gen.Receipt_Invoke_: common = r.GetInvoke().GetCommon() - case *spec.Receipt_Declare_: + case *gen.Receipt_Declare_: common = r.GetDeclare().GetCommon() - case *spec.Receipt_DeployAccount_: + case *gen.Receipt_DeployAccount_: common = r.GetDeployAccount().GetCommon() - case *spec.Receipt_L1Handler_: + case *gen.Receipt_L1Handler_: common = r.GetL1Handler().GetCommon() - case *spec.Receipt_DeprecatedDeploy: + case *gen.Receipt_DeprecatedDeploy: common = r.GetDeprecatedDeploy().GetCommon() } @@ -37,7 +37,7 @@ func AdaptReceipt(r *spec.Receipt, txHash *felt.Felt) *core.TransactionReceipt { } } -func adaptExecutionResources(er *spec.Receipt_ExecutionResources) *core.ExecutionResources { +func adaptExecutionResources(er *gen.Receipt_ExecutionResources) *core.ExecutionResources { if er == nil { return nil } @@ -70,7 +70,7 @@ func adaptExecutionResources(er *spec.Receipt_ExecutionResources) *core.Executio } } -func adaptMessageToL1(m *spec.MessageToL1) *core.L2ToL1Message { +func adaptMessageToL1(m *gen.MessageToL1) *core.L2ToL1Message { return &core.L2ToL1Message{ From: AdaptFelt(m.FromAddress), To: AdaptEthAddress(m.ToAddress), @@ -78,7 +78,7 @@ func adaptMessageToL1(m *spec.MessageToL1) *core.L2ToL1Message { } } -func feltToUint64(f *spec.Felt252) uint64 { +func feltToUint64(f *gen.Felt252) uint64 { var result uint64 if adapted := AdaptFelt(f); adapted != nil { result = adapted.Uint64() diff --git a/adapters/p2p2core/state.go b/adapters/p2p2core/state.go index 59bad84772..153d07ee6d 100644 --- a/adapters/p2p2core/state.go +++ b/adapters/p2p2core/state.go @@ -7,11 +7,11 @@ import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" "github.com/NethermindEth/juno/db" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) -func AdaptStateDiff(reader core.StateReader, contractDiffs []*spec.ContractDiff, classes []*spec.Class) *core.StateDiff { +func AdaptStateDiff(reader core.StateReader, contractDiffs []*gen.ContractDiff, classes []*gen.Class) *core.StateDiff { var ( declaredV0Classes []*felt.Felt declaredV1Classes = make(map[felt.Felt]*felt.Felt) @@ -86,13 +86,13 @@ func AdaptStateDiff(reader core.StateReader, contractDiffs []*spec.ContractDiff, } } -func adaptStoredValue(v *spec.ContractStoredValue) (felt.Felt, *felt.Felt) { +func adaptStoredValue(v *gen.ContractStoredValue) (felt.Felt, *felt.Felt) { return *AdaptFelt(v.Key), AdaptFelt(v.Value) } type addrToClassHash struct { - addr *spec.Address - classHash *spec.Hash + addr *gen.Address + classHash *gen.Hash } // todo rename diff --git a/adapters/p2p2core/transaction.go b/adapters/p2p2core/transaction.go index de52215083..485e0ba5cc 100644 --- a/adapters/p2p2core/transaction.go +++ b/adapters/p2p2core/transaction.go @@ -5,19 +5,19 @@ import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" ) //nolint:funlen,gocyclo -func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transaction { +func AdaptTransaction(t *gen.Transaction, network *utils.Network) core.Transaction { if t == nil { return nil } // can Txn be nil? switch t.Txn.(type) { - case *spec.Transaction_DeclareV0_: + case *gen.Transaction_DeclareV0_: tx := t.GetDeclareV0() declareTx := &core.DeclareTransaction{ TransactionHash: AdaptHash(t.TransactionHash), @@ -39,7 +39,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return declareTx - case *spec.Transaction_DeclareV1_: + case *gen.Transaction_DeclareV1_: tx := t.GetDeclareV1() declareTx := &core.DeclareTransaction{ TransactionHash: AdaptHash(t.TransactionHash), @@ -61,7 +61,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return declareTx - case *spec.Transaction_DeclareV2_: + case *gen.Transaction_DeclareV2_: tx := t.GetDeclareV2() declareTx := &core.DeclareTransaction{ TransactionHash: AdaptHash(t.TransactionHash), @@ -82,7 +82,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return declareTx - case *spec.Transaction_DeclareV3_: + case *gen.Transaction_DeclareV3_: tx := t.GetDeclareV3() nDAMode, err := adaptVolitionDomain(tx.NonceDataAvailabilityMode) @@ -116,7 +116,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return declareTx - case *spec.Transaction_Deploy_: + case *gen.Transaction_Deploy_: tx := t.GetDeploy() addressSalt := AdaptFelt(tx.AddressSalt) @@ -132,7 +132,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return deployTx - case *spec.Transaction_DeployAccountV1_: + case *gen.Transaction_DeployAccountV1_: tx := t.GetDeployAccountV1() addressSalt := AdaptFelt(tx.AddressSalt) @@ -159,7 +159,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return deployAccTx - case *spec.Transaction_DeployAccountV3_: + case *gen.Transaction_DeployAccountV3_: tx := t.GetDeployAccountV3() nDAMode, err := adaptVolitionDomain(tx.NonceDataAvailabilityMode) @@ -198,7 +198,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return deployAccTx - case *spec.Transaction_InvokeV0_: + case *gen.Transaction_InvokeV0_: tx := t.GetInvokeV0() invTx := &core.InvokeTransaction{ TransactionHash: AdaptHash(t.TransactionHash), @@ -221,7 +221,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return invTx - case *spec.Transaction_InvokeV1_: + case *gen.Transaction_InvokeV1_: tx := t.GetInvokeV1() invTx := &core.InvokeTransaction{ TransactionHash: AdaptHash(t.TransactionHash), @@ -243,7 +243,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return invTx - case *spec.Transaction_InvokeV3_: + case *gen.Transaction_InvokeV3_: tx := t.GetInvokeV3() nDAMode, err := adaptVolitionDomain(tx.NonceDataAvailabilityMode) @@ -278,7 +278,7 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } return invTx - case *spec.Transaction_L1Handler: + case *gen.Transaction_L1Handler: tx := t.GetL1Handler() l1Tx := &core.L1HandlerTransaction{ TransactionHash: AdaptHash(t.TransactionHash), @@ -295,14 +295,14 @@ func AdaptTransaction(t *spec.Transaction, network *utils.Network) core.Transact } } -func adaptResourceLimits(limits *spec.ResourceLimits) core.ResourceBounds { +func adaptResourceLimits(limits *gen.ResourceLimits) core.ResourceBounds { return core.ResourceBounds{ MaxAmount: AdaptFelt(limits.MaxAmount).Uint64(), MaxPricePerUnit: AdaptFelt(limits.MaxPricePerUnit), } } -func adaptAccountSignature(s *spec.AccountSignature) []*felt.Felt { +func adaptAccountSignature(s *gen.AccountSignature) []*felt.Felt { return utils.Map(s.Parts, AdaptFelt) } @@ -310,11 +310,11 @@ func txVersion(v uint64) *core.TransactionVersion { return new(core.TransactionVersion).SetUint64(v) } -func adaptVolitionDomain(v spec.VolitionDomain) (core.DataAvailabilityMode, error) { +func adaptVolitionDomain(v gen.VolitionDomain) (core.DataAvailabilityMode, error) { switch v { - case spec.VolitionDomain_L1: + case gen.VolitionDomain_L1: return core.DAModeL1, nil - case spec.VolitionDomain_L2: + case gen.VolitionDomain_L2: return core.DAModeL2, nil default: return 0, fmt.Errorf("unknown volition domain %d", v) diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000000..db961ae4b4 --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,6 @@ +version: v2 +clean: true +plugins: + - remote: buf.build/protocolbuffers/go + out: p2p/gen + opt: paths=source_relative diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000000..3a2036cad1 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,12 @@ +version: v2 + +modules: + - path: p2p/spec/ +lint: + use: + - DEFAULT +breaking: + use: + - FILE + + diff --git a/p2p/peers.go b/p2p/codec.go similarity index 100% rename from p2p/peers.go rename to p2p/codec.go diff --git a/p2p/gen/class.pb.go b/p2p/gen/class.pb.go new file mode 100644 index 0000000000..12937ec6be --- /dev/null +++ b/p2p/gen/class.pb.go @@ -0,0 +1,714 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: class.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EntryPoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + Selector *Felt252 `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EntryPoint) Reset() { + *x = EntryPoint{} + mi := &file_class_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EntryPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntryPoint) ProtoMessage() {} + +func (x *EntryPoint) ProtoReflect() protoreflect.Message { + mi := &file_class_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EntryPoint.ProtoReflect.Descriptor instead. +func (*EntryPoint) Descriptor() ([]byte, []int) { + return file_class_proto_rawDescGZIP(), []int{0} +} + +func (x *EntryPoint) GetSelector() *Felt252 { + if x != nil { + return x.Selector + } + return nil +} + +func (x *EntryPoint) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +type Cairo0Class struct { + state protoimpl.MessageState `protogen:"open.v1"` + Abi string `protobuf:"bytes,1,opt,name=abi,proto3" json:"abi,omitempty"` + Externals []*EntryPoint `protobuf:"bytes,2,rep,name=externals,proto3" json:"externals,omitempty"` + L1Handlers []*EntryPoint `protobuf:"bytes,3,rep,name=l1_handlers,json=l1Handlers,proto3" json:"l1_handlers,omitempty"` + Constructors []*EntryPoint `protobuf:"bytes,4,rep,name=constructors,proto3" json:"constructors,omitempty"` + // Compressed in base64 representation. + Program string `protobuf:"bytes,5,opt,name=program,proto3" json:"program,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Cairo0Class) Reset() { + *x = Cairo0Class{} + mi := &file_class_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Cairo0Class) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cairo0Class) ProtoMessage() {} + +func (x *Cairo0Class) ProtoReflect() protoreflect.Message { + mi := &file_class_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cairo0Class.ProtoReflect.Descriptor instead. +func (*Cairo0Class) Descriptor() ([]byte, []int) { + return file_class_proto_rawDescGZIP(), []int{1} +} + +func (x *Cairo0Class) GetAbi() string { + if x != nil { + return x.Abi + } + return "" +} + +func (x *Cairo0Class) GetExternals() []*EntryPoint { + if x != nil { + return x.Externals + } + return nil +} + +func (x *Cairo0Class) GetL1Handlers() []*EntryPoint { + if x != nil { + return x.L1Handlers + } + return nil +} + +func (x *Cairo0Class) GetConstructors() []*EntryPoint { + if x != nil { + return x.Constructors + } + return nil +} + +func (x *Cairo0Class) GetProgram() string { + if x != nil { + return x.Program + } + return "" +} + +type SierraEntryPoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + Selector *Felt252 `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SierraEntryPoint) Reset() { + *x = SierraEntryPoint{} + mi := &file_class_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SierraEntryPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SierraEntryPoint) ProtoMessage() {} + +func (x *SierraEntryPoint) ProtoReflect() protoreflect.Message { + mi := &file_class_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SierraEntryPoint.ProtoReflect.Descriptor instead. +func (*SierraEntryPoint) Descriptor() ([]byte, []int) { + return file_class_proto_rawDescGZIP(), []int{2} +} + +func (x *SierraEntryPoint) GetIndex() uint64 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *SierraEntryPoint) GetSelector() *Felt252 { + if x != nil { + return x.Selector + } + return nil +} + +type Cairo1EntryPoints struct { + state protoimpl.MessageState `protogen:"open.v1"` + Externals []*SierraEntryPoint `protobuf:"bytes,1,rep,name=externals,proto3" json:"externals,omitempty"` + L1Handlers []*SierraEntryPoint `protobuf:"bytes,2,rep,name=l1_handlers,json=l1Handlers,proto3" json:"l1_handlers,omitempty"` + Constructors []*SierraEntryPoint `protobuf:"bytes,3,rep,name=constructors,proto3" json:"constructors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Cairo1EntryPoints) Reset() { + *x = Cairo1EntryPoints{} + mi := &file_class_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Cairo1EntryPoints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cairo1EntryPoints) ProtoMessage() {} + +func (x *Cairo1EntryPoints) ProtoReflect() protoreflect.Message { + mi := &file_class_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cairo1EntryPoints.ProtoReflect.Descriptor instead. +func (*Cairo1EntryPoints) Descriptor() ([]byte, []int) { + return file_class_proto_rawDescGZIP(), []int{3} +} + +func (x *Cairo1EntryPoints) GetExternals() []*SierraEntryPoint { + if x != nil { + return x.Externals + } + return nil +} + +func (x *Cairo1EntryPoints) GetL1Handlers() []*SierraEntryPoint { + if x != nil { + return x.L1Handlers + } + return nil +} + +func (x *Cairo1EntryPoints) GetConstructors() []*SierraEntryPoint { + if x != nil { + return x.Constructors + } + return nil +} + +type Cairo1Class struct { + state protoimpl.MessageState `protogen:"open.v1"` + Abi string `protobuf:"bytes,1,opt,name=abi,proto3" json:"abi,omitempty"` + EntryPoints *Cairo1EntryPoints `protobuf:"bytes,2,opt,name=entry_points,json=entryPoints,proto3" json:"entry_points,omitempty"` + Program []*Felt252 `protobuf:"bytes,3,rep,name=program,proto3" json:"program,omitempty"` + ContractClassVersion string `protobuf:"bytes,4,opt,name=contract_class_version,json=contractClassVersion,proto3" json:"contract_class_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Cairo1Class) Reset() { + *x = Cairo1Class{} + mi := &file_class_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Cairo1Class) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cairo1Class) ProtoMessage() {} + +func (x *Cairo1Class) ProtoReflect() protoreflect.Message { + mi := &file_class_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cairo1Class.ProtoReflect.Descriptor instead. +func (*Cairo1Class) Descriptor() ([]byte, []int) { + return file_class_proto_rawDescGZIP(), []int{4} +} + +func (x *Cairo1Class) GetAbi() string { + if x != nil { + return x.Abi + } + return "" +} + +func (x *Cairo1Class) GetEntryPoints() *Cairo1EntryPoints { + if x != nil { + return x.EntryPoints + } + return nil +} + +func (x *Cairo1Class) GetProgram() []*Felt252 { + if x != nil { + return x.Program + } + return nil +} + +func (x *Cairo1Class) GetContractClassVersion() string { + if x != nil { + return x.ContractClassVersion + } + return "" +} + +type Class struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Class: + // + // *Class_Cairo0 + // *Class_Cairo1 + Class isClass_Class `protobuf_oneof:"class"` + Domain uint32 `protobuf:"varint,3,opt,name=domain,proto3" json:"domain,omitempty"` + ClassHash *Hash `protobuf:"bytes,4,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Class) Reset() { + *x = Class{} + mi := &file_class_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Class) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Class) ProtoMessage() {} + +func (x *Class) ProtoReflect() protoreflect.Message { + mi := &file_class_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Class.ProtoReflect.Descriptor instead. +func (*Class) Descriptor() ([]byte, []int) { + return file_class_proto_rawDescGZIP(), []int{5} +} + +func (x *Class) GetClass() isClass_Class { + if x != nil { + return x.Class + } + return nil +} + +func (x *Class) GetCairo0() *Cairo0Class { + if x != nil { + if x, ok := x.Class.(*Class_Cairo0); ok { + return x.Cairo0 + } + } + return nil +} + +func (x *Class) GetCairo1() *Cairo1Class { + if x != nil { + if x, ok := x.Class.(*Class_Cairo1); ok { + return x.Cairo1 + } + } + return nil +} + +func (x *Class) GetDomain() uint32 { + if x != nil { + return x.Domain + } + return 0 +} + +func (x *Class) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +type isClass_Class interface { + isClass_Class() +} + +type Class_Cairo0 struct { + Cairo0 *Cairo0Class `protobuf:"bytes,1,opt,name=cairo0,proto3,oneof"` +} + +type Class_Cairo1 struct { + Cairo1 *Cairo1Class `protobuf:"bytes,2,opt,name=cairo1,proto3,oneof"` +} + +func (*Class_Cairo0) isClass_Class() {} + +func (*Class_Cairo1) isClass_Class() {} + +type ClassesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClassesRequest) Reset() { + *x = ClassesRequest{} + mi := &file_class_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClassesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassesRequest) ProtoMessage() {} + +func (x *ClassesRequest) ProtoReflect() protoreflect.Message { + mi := &file_class_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassesRequest.ProtoReflect.Descriptor instead. +func (*ClassesRequest) Descriptor() ([]byte, []int) { + return file_class_proto_rawDescGZIP(), []int{6} +} + +func (x *ClassesRequest) GetIteration() *Iteration { + if x != nil { + return x.Iteration + } + return nil +} + +// Responses are sent ordered by the order given in the request. +type ClassesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to ClassMessage: + // + // *ClassesResponse_Class + // *ClassesResponse_Fin + ClassMessage isClassesResponse_ClassMessage `protobuf_oneof:"class_message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClassesResponse) Reset() { + *x = ClassesResponse{} + mi := &file_class_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClassesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassesResponse) ProtoMessage() {} + +func (x *ClassesResponse) ProtoReflect() protoreflect.Message { + mi := &file_class_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClassesResponse.ProtoReflect.Descriptor instead. +func (*ClassesResponse) Descriptor() ([]byte, []int) { + return file_class_proto_rawDescGZIP(), []int{7} +} + +func (x *ClassesResponse) GetClassMessage() isClassesResponse_ClassMessage { + if x != nil { + return x.ClassMessage + } + return nil +} + +func (x *ClassesResponse) GetClass() *Class { + if x != nil { + if x, ok := x.ClassMessage.(*ClassesResponse_Class); ok { + return x.Class + } + } + return nil +} + +func (x *ClassesResponse) GetFin() *Fin { + if x != nil { + if x, ok := x.ClassMessage.(*ClassesResponse_Fin); ok { + return x.Fin + } + } + return nil +} + +type isClassesResponse_ClassMessage interface { + isClassesResponse_ClassMessage() +} + +type ClassesResponse_Class struct { + Class *Class `protobuf:"bytes,1,opt,name=class,proto3,oneof"` +} + +type ClassesResponse_Fin struct { + Fin *Fin `protobuf:"bytes,2,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its classes. +} + +func (*ClassesResponse_Class) isClassesResponse_ClassMessage() {} + +func (*ClassesResponse_Fin) isClassesResponse_ClassMessage() {} + +var File_class_proto protoreflect.FileDescriptor + +var file_class_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x0a, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, + 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x69, 0x72, + 0x6f, 0x30, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x62, 0x69, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x62, 0x69, 0x12, 0x29, 0x0a, 0x09, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x6c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x22, 0x4e, 0x0a, + 0x10, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, + 0x32, 0x35, 0x32, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xaf, 0x01, + 0x0a, 0x11, 0x43, 0x61, 0x69, 0x72, 0x6f, 0x31, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x53, 0x69, 0x65, 0x72, + 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x6c, 0x31, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x22, + 0xb0, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x69, 0x72, 0x6f, 0x31, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x61, 0x62, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x62, + 0x69, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x43, 0x61, 0x69, 0x72, 0x6f, 0x31, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x0b, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, + 0x32, 0x35, 0x32, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x34, 0x0a, 0x16, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x26, 0x0a, 0x06, + 0x63, 0x61, 0x69, 0x72, 0x6f, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x43, + 0x61, 0x69, 0x72, 0x6f, 0x30, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x00, 0x52, 0x06, 0x63, 0x61, + 0x69, 0x72, 0x6f, 0x30, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x61, 0x69, 0x72, 0x6f, 0x31, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x43, 0x61, 0x69, 0x72, 0x6f, 0x31, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x48, 0x00, 0x52, 0x06, 0x63, 0x61, 0x69, 0x72, 0x6f, 0x31, 0x12, 0x16, 0x0a, 0x06, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 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, 0x42, 0x07, 0x0a, 0x05, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x22, 0x3a, 0x0a, 0x0e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 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, + 0x5c, 0x0a, 0x0f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x00, 0x52, 0x05, 0x63, 0x6c, 0x61, + 0x73, 0x73, 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, 0x0f, 0x0a, 0x0d, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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 ( + file_class_proto_rawDescOnce sync.Once + file_class_proto_rawDescData = file_class_proto_rawDesc +) + +func file_class_proto_rawDescGZIP() []byte { + file_class_proto_rawDescOnce.Do(func() { + file_class_proto_rawDescData = protoimpl.X.CompressGZIP(file_class_proto_rawDescData) + }) + return file_class_proto_rawDescData +} + +var file_class_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_class_proto_goTypes = []any{ + (*EntryPoint)(nil), // 0: EntryPoint + (*Cairo0Class)(nil), // 1: Cairo0Class + (*SierraEntryPoint)(nil), // 2: SierraEntryPoint + (*Cairo1EntryPoints)(nil), // 3: Cairo1EntryPoints + (*Cairo1Class)(nil), // 4: Cairo1Class + (*Class)(nil), // 5: Class + (*ClassesRequest)(nil), // 6: ClassesRequest + (*ClassesResponse)(nil), // 7: ClassesResponse + (*Felt252)(nil), // 8: Felt252 + (*Hash)(nil), // 9: Hash + (*Iteration)(nil), // 10: Iteration + (*Fin)(nil), // 11: Fin +} +var file_class_proto_depIdxs = []int32{ + 8, // 0: EntryPoint.selector:type_name -> Felt252 + 0, // 1: Cairo0Class.externals:type_name -> EntryPoint + 0, // 2: Cairo0Class.l1_handlers:type_name -> EntryPoint + 0, // 3: Cairo0Class.constructors:type_name -> EntryPoint + 8, // 4: SierraEntryPoint.selector:type_name -> Felt252 + 2, // 5: Cairo1EntryPoints.externals:type_name -> SierraEntryPoint + 2, // 6: Cairo1EntryPoints.l1_handlers:type_name -> SierraEntryPoint + 2, // 7: Cairo1EntryPoints.constructors:type_name -> SierraEntryPoint + 3, // 8: Cairo1Class.entry_points:type_name -> Cairo1EntryPoints + 8, // 9: Cairo1Class.program:type_name -> Felt252 + 1, // 10: Class.cairo0:type_name -> Cairo0Class + 4, // 11: Class.cairo1:type_name -> Cairo1Class + 9, // 12: Class.class_hash:type_name -> Hash + 10, // 13: ClassesRequest.iteration:type_name -> Iteration + 5, // 14: ClassesResponse.class:type_name -> Class + 11, // 15: ClassesResponse.fin:type_name -> Fin + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_class_proto_init() } +func file_class_proto_init() { + if File_class_proto != nil { + return + } + file_common_proto_init() + file_class_proto_msgTypes[5].OneofWrappers = []any{ + (*Class_Cairo0)(nil), + (*Class_Cairo1)(nil), + } + file_class_proto_msgTypes[7].OneofWrappers = []any{ + (*ClassesResponse_Class)(nil), + (*ClassesResponse_Fin)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_class_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_class_proto_goTypes, + DependencyIndexes: file_class_proto_depIdxs, + MessageInfos: file_class_proto_msgTypes, + }.Build() + File_class_proto = out.File + file_class_proto_rawDesc = nil + file_class_proto_goTypes = nil + file_class_proto_depIdxs = nil +} diff --git a/p2p/gen/common.pb.go b/p2p/gen/common.pb.go new file mode 100644 index 0000000000..4ac4472347 --- /dev/null +++ b/p2p/gen/common.pb.go @@ -0,0 +1,973 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: common.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type L1DataAvailabilityMode int32 + +const ( + L1DataAvailabilityMode_Calldata L1DataAvailabilityMode = 0 + L1DataAvailabilityMode_Blob L1DataAvailabilityMode = 1 +) + +// Enum value maps for L1DataAvailabilityMode. +var ( + L1DataAvailabilityMode_name = map[int32]string{ + 0: "Calldata", + 1: "Blob", + } + L1DataAvailabilityMode_value = map[string]int32{ + "Calldata": 0, + "Blob": 1, + } +) + +func (x L1DataAvailabilityMode) Enum() *L1DataAvailabilityMode { + p := new(L1DataAvailabilityMode) + *p = x + return p +} + +func (x L1DataAvailabilityMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (L1DataAvailabilityMode) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[0].Descriptor() +} + +func (L1DataAvailabilityMode) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[0] +} + +func (x L1DataAvailabilityMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use L1DataAvailabilityMode.Descriptor instead. +func (L1DataAvailabilityMode) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{0} +} + +type VolitionDomain int32 + +const ( + VolitionDomain_L1 VolitionDomain = 0 + VolitionDomain_L2 VolitionDomain = 1 +) + +// Enum value maps for VolitionDomain. +var ( + VolitionDomain_name = map[int32]string{ + 0: "L1", + 1: "L2", + } + VolitionDomain_value = map[string]int32{ + "L1": 0, + "L2": 1, + } +) + +func (x VolitionDomain) Enum() *VolitionDomain { + p := new(VolitionDomain) + *p = x + return p +} + +func (x VolitionDomain) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VolitionDomain) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[1].Descriptor() +} + +func (VolitionDomain) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[1] +} + +func (x VolitionDomain) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VolitionDomain.Descriptor instead. +func (VolitionDomain) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{1} +} + +type Iteration_Direction int32 + +const ( + Iteration_Forward Iteration_Direction = 0 + Iteration_Backward Iteration_Direction = 1 +) + +// Enum value maps for Iteration_Direction. +var ( + Iteration_Direction_name = map[int32]string{ + 0: "Forward", + 1: "Backward", + } + Iteration_Direction_value = map[string]int32{ + "Forward": 0, + "Backward": 1, + } +) + +func (x Iteration_Direction) Enum() *Iteration_Direction { + p := new(Iteration_Direction) + *p = x + return p +} + +func (x Iteration_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Iteration_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_common_proto_enumTypes[2].Descriptor() +} + +func (Iteration_Direction) Type() protoreflect.EnumType { + return &file_common_proto_enumTypes[2] +} + +func (x Iteration_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Iteration_Direction.Descriptor instead. +func (Iteration_Direction) EnumDescriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{11, 0} +} + +type Felt252 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Felt252) Reset() { + *x = Felt252{} + mi := &file_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Felt252) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Felt252) ProtoMessage() {} + +func (x *Felt252) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Felt252.ProtoReflect.Descriptor instead. +func (*Felt252) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{0} +} + +func (x *Felt252) GetElements() []byte { + if x != nil { + return x.Elements + } + return nil +} + +// A hash value representable as a Felt252 +type Hash struct { + state protoimpl.MessageState `protogen:"open.v1"` + Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Hash) Reset() { + *x = Hash{} + mi := &file_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Hash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hash) ProtoMessage() {} + +func (x *Hash) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hash.ProtoReflect.Descriptor instead. +func (*Hash) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{1} +} + +func (x *Hash) GetElements() []byte { + if x != nil { + return x.Elements + } + return nil +} + +// A 256 bit hash value (like Keccak256) +type Hash256 struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Required to be 32 bytes long + Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Hash256) Reset() { + *x = Hash256{} + mi := &file_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Hash256) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hash256) ProtoMessage() {} + +func (x *Hash256) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hash256.ProtoReflect.Descriptor instead. +func (*Hash256) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{2} +} + +func (x *Hash256) GetElements() []byte { + if x != nil { + return x.Elements + } + return nil +} + +type Hashes struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*Hash `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Hashes) Reset() { + *x = Hashes{} + mi := &file_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Hashes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Hashes) ProtoMessage() {} + +func (x *Hashes) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Hashes.ProtoReflect.Descriptor instead. +func (*Hashes) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{3} +} + +func (x *Hashes) GetItems() []*Hash { + if x != nil { + return x.Items + } + return nil +} + +type Address struct { + state protoimpl.MessageState `protogen:"open.v1"` + Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Address) Reset() { + *x = Address{} + mi := &file_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Address) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Address) ProtoMessage() {} + +func (x *Address) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Address.ProtoReflect.Descriptor instead. +func (*Address) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{4} +} + +func (x *Address) GetElements() []byte { + if x != nil { + return x.Elements + } + return nil +} + +type PeerID struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PeerID) Reset() { + *x = PeerID{} + mi := &file_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PeerID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerID) ProtoMessage() {} + +func (x *PeerID) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerID.ProtoReflect.Descriptor instead. +func (*PeerID) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{5} +} + +func (x *PeerID) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +type Uint128 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Low uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"low,omitempty"` + High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"high,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Uint128) Reset() { + *x = Uint128{} + mi := &file_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Uint128) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Uint128) ProtoMessage() {} + +func (x *Uint128) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Uint128.ProtoReflect.Descriptor instead. +func (*Uint128) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{6} +} + +func (x *Uint128) GetLow() uint64 { + if x != nil { + return x.Low + } + return 0 +} + +func (x *Uint128) GetHigh() uint64 { + if x != nil { + return x.High + } + return 0 +} + +type ConsensusSignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + R *Felt252 `protobuf:"bytes,1,opt,name=r,proto3" json:"r,omitempty"` + S *Felt252 `protobuf:"bytes,2,opt,name=s,proto3" json:"s,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConsensusSignature) Reset() { + *x = ConsensusSignature{} + mi := &file_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConsensusSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConsensusSignature) ProtoMessage() {} + +func (x *ConsensusSignature) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConsensusSignature.ProtoReflect.Descriptor instead. +func (*ConsensusSignature) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{7} +} + +func (x *ConsensusSignature) GetR() *Felt252 { + if x != nil { + return x.R + } + return nil +} + +func (x *ConsensusSignature) GetS() *Felt252 { + if x != nil { + return x.S + } + return nil +} + +type Patricia struct { + state protoimpl.MessageState `protogen:"open.v1"` + NLeaves uint64 `protobuf:"varint,1,opt,name=n_leaves,json=nLeaves,proto3" json:"n_leaves,omitempty"` // needed to know the height, so as to how many nodes to expect in a proof. + // and also when receiving all leaves, how many to expect + Root *Hash `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Patricia) Reset() { + *x = Patricia{} + mi := &file_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Patricia) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Patricia) ProtoMessage() {} + +func (x *Patricia) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Patricia.ProtoReflect.Descriptor instead. +func (*Patricia) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{8} +} + +func (x *Patricia) GetNLeaves() uint64 { + if x != nil { + return x.NLeaves + } + return 0 +} + +func (x *Patricia) GetRoot() *Hash { + if x != nil { + return x.Root + } + return nil +} + +type StateDiffCommitment struct { + state protoimpl.MessageState `protogen:"open.v1"` + StateDiffLength uint64 `protobuf:"varint,1,opt,name=state_diff_length,json=stateDiffLength,proto3" json:"state_diff_length,omitempty"` + Root *Hash `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StateDiffCommitment) Reset() { + *x = StateDiffCommitment{} + mi := &file_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StateDiffCommitment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateDiffCommitment) ProtoMessage() {} + +func (x *StateDiffCommitment) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StateDiffCommitment.ProtoReflect.Descriptor instead. +func (*StateDiffCommitment) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{9} +} + +func (x *StateDiffCommitment) GetStateDiffLength() uint64 { + if x != nil { + return x.StateDiffLength + } + return 0 +} + +func (x *StateDiffCommitment) GetRoot() *Hash { + if x != nil { + return x.Root + } + return nil +} + +type BlockID struct { + state protoimpl.MessageState `protogen:"open.v1"` + Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` + Header *Hash `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockID) Reset() { + *x = BlockID{} + mi := &file_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockID) ProtoMessage() {} + +func (x *BlockID) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockID.ProtoReflect.Descriptor instead. +func (*BlockID) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{10} +} + +func (x *BlockID) GetNumber() uint64 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *BlockID) GetHeader() *Hash { + if x != nil { + return x.Header + } + return nil +} + +type Iteration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Start: + // + // *Iteration_BlockNumber + // *Iteration_Header + Start isIteration_Start `protobuf_oneof:"start"` + Direction Iteration_Direction `protobuf:"varint,3,opt,name=direction,proto3,enum=Iteration_Direction" json:"direction,omitempty"` + Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + Step uint64 `protobuf:"varint,5,opt,name=step,proto3" json:"step,omitempty"` // to allow interleaving from several nodes + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Iteration) Reset() { + *x = Iteration{} + mi := &file_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Iteration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Iteration) ProtoMessage() {} + +func (x *Iteration) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Iteration.ProtoReflect.Descriptor instead. +func (*Iteration) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{11} +} + +func (x *Iteration) GetStart() isIteration_Start { + if x != nil { + return x.Start + } + return nil +} + +func (x *Iteration) GetBlockNumber() uint64 { + if x != nil { + if x, ok := x.Start.(*Iteration_BlockNumber); ok { + return x.BlockNumber + } + } + return 0 +} + +func (x *Iteration) GetHeader() *Hash { + if x != nil { + if x, ok := x.Start.(*Iteration_Header); ok { + return x.Header + } + } + return nil +} + +func (x *Iteration) GetDirection() Iteration_Direction { + if x != nil { + return x.Direction + } + return Iteration_Forward +} + +func (x *Iteration) GetLimit() uint64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *Iteration) GetStep() uint64 { + if x != nil { + return x.Step + } + return 0 +} + +type isIteration_Start interface { + isIteration_Start() +} + +type Iteration_BlockNumber struct { + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3,oneof"` +} + +type Iteration_Header struct { + Header *Hash `protobuf:"bytes,2,opt,name=header,proto3,oneof"` +} + +func (*Iteration_BlockNumber) isIteration_Start() {} + +func (*Iteration_Header) isIteration_Start() {} + +// mark the end of a stream of messages +// TBD: may not be required if we open a stream per request. +type Fin struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Fin) Reset() { + *x = Fin{} + mi := &file_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Fin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fin) ProtoMessage() {} + +func (x *Fin) ProtoReflect() protoreflect.Message { + mi := &file_common_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fin.ProtoReflect.Descriptor instead. +func (*Fin) Descriptor() ([]byte, []int) { + return file_common_proto_rawDescGZIP(), []int{12} +} + +var File_common_proto protoreflect.FileDescriptor + +var file_common_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x25, + 0x0a, 0x07, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 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, 0x22, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 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, 0x25, 0x0a, 0x07, 0x48, 0x61, 0x73, + 0x68, 0x32, 0x35, 0x36, 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, 0x25, 0x0a, 0x06, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x25, 0x0a, 0x07, 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, 0x18, + 0x0a, 0x06, 0x50, 0x65, 0x65, 0x72, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x07, 0x55, 0x69, 0x6e, 0x74, + 0x31, 0x32, 0x38, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x03, 0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x04, 0x68, 0x69, 0x67, 0x68, 0x22, 0x44, 0x0a, 0x12, 0x43, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, + 0x16, 0x0a, 0x01, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, + 0x74, 0x32, 0x35, 0x32, 0x52, 0x01, 0x72, 0x12, 0x16, 0x0a, 0x01, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x01, 0x73, 0x22, + 0x40, 0x0a, 0x08, 0x50, 0x61, 0x74, 0x72, 0x69, 0x63, 0x69, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6e, + 0x5f, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6e, + 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x04, 0x72, 0x6f, 0x6f, + 0x74, 0x22, 0x5c, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, + 0x40, 0x0a, 0x07, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x22, 0xe0, 0x01, 0x0a, 0x09, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, + 0x74, 0x65, 0x70, 0x22, 0x26, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x42, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x22, 0x05, 0x0a, 0x03, 0x46, 0x69, 0x6e, 0x2a, 0x30, 0x0a, 0x16, 0x4c, + 0x31, 0x44, 0x61, 0x74, 0x61, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, + 0x61, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x62, 0x10, 0x01, 0x2a, 0x20, 0x0a, + 0x0e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, + 0x06, 0x0a, 0x02, 0x4c, 0x31, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x32, 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 ( + file_common_proto_rawDescOnce sync.Once + file_common_proto_rawDescData = file_common_proto_rawDesc +) + +func file_common_proto_rawDescGZIP() []byte { + file_common_proto_rawDescOnce.Do(func() { + file_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_proto_rawDescData) + }) + return file_common_proto_rawDescData +} + +var file_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_common_proto_goTypes = []any{ + (L1DataAvailabilityMode)(0), // 0: L1DataAvailabilityMode + (VolitionDomain)(0), // 1: VolitionDomain + (Iteration_Direction)(0), // 2: Iteration.Direction + (*Felt252)(nil), // 3: Felt252 + (*Hash)(nil), // 4: Hash + (*Hash256)(nil), // 5: Hash256 + (*Hashes)(nil), // 6: Hashes + (*Address)(nil), // 7: Address + (*PeerID)(nil), // 8: PeerID + (*Uint128)(nil), // 9: Uint128 + (*ConsensusSignature)(nil), // 10: ConsensusSignature + (*Patricia)(nil), // 11: Patricia + (*StateDiffCommitment)(nil), // 12: StateDiffCommitment + (*BlockID)(nil), // 13: BlockID + (*Iteration)(nil), // 14: Iteration + (*Fin)(nil), // 15: Fin +} +var file_common_proto_depIdxs = []int32{ + 4, // 0: Hashes.items:type_name -> Hash + 3, // 1: ConsensusSignature.r:type_name -> Felt252 + 3, // 2: ConsensusSignature.s:type_name -> Felt252 + 4, // 3: Patricia.root:type_name -> Hash + 4, // 4: StateDiffCommitment.root:type_name -> Hash + 4, // 5: BlockID.header:type_name -> Hash + 4, // 6: Iteration.header:type_name -> Hash + 2, // 7: Iteration.direction:type_name -> Iteration.Direction + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_common_proto_init() } +func file_common_proto_init() { + if File_common_proto != nil { + return + } + file_common_proto_msgTypes[11].OneofWrappers = []any{ + (*Iteration_BlockNumber)(nil), + (*Iteration_Header)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_common_proto_rawDesc, + NumEnums: 3, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_common_proto_goTypes, + DependencyIndexes: file_common_proto_depIdxs, + EnumInfos: file_common_proto_enumTypes, + MessageInfos: file_common_proto_msgTypes, + }.Build() + File_common_proto = out.File + file_common_proto_rawDesc = nil + file_common_proto_goTypes = nil + file_common_proto_depIdxs = nil +} diff --git a/p2p/gen/event.pb.go b/p2p/gen/event.pb.go new file mode 100644 index 0000000000..7aa6874e7d --- /dev/null +++ b/p2p/gen/event.pb.go @@ -0,0 +1,313 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: event.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Event struct { + state protoimpl.MessageState `protogen:"open.v1"` + TransactionHash *Hash `protobuf:"bytes,1,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` + FromAddress *Felt252 `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // looks like mistake? + Keys []*Felt252 `protobuf:"bytes,4,rep,name=keys,proto3" json:"keys,omitempty"` + Data []*Felt252 `protobuf:"bytes,5,rep,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Event) Reset() { + *x = Event{} + mi := &file_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_event_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_event_proto_rawDescGZIP(), []int{0} +} + +func (x *Event) GetTransactionHash() *Hash { + if x != nil { + return x.TransactionHash + } + return nil +} + +func (x *Event) GetFromAddress() *Felt252 { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *Event) GetKeys() []*Felt252 { + if x != nil { + return x.Keys + } + return nil +} + +func (x *Event) GetData() []*Felt252 { + if x != nil { + return x.Data + } + return nil +} + +type EventsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventsRequest) Reset() { + *x = EventsRequest{} + mi := &file_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventsRequest) ProtoMessage() {} + +func (x *EventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_event_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventsRequest.ProtoReflect.Descriptor instead. +func (*EventsRequest) Descriptor() ([]byte, []int) { + return file_event_proto_rawDescGZIP(), []int{1} +} + +func (x *EventsRequest) GetIteration() *Iteration { + if x != nil { + return x.Iteration + } + return nil +} + +// Responses are sent ordered by the order given in the request. +type EventsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to EventMessage: + // + // *EventsResponse_Event + // *EventsResponse_Fin + EventMessage isEventsResponse_EventMessage `protobuf_oneof:"event_message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventsResponse) Reset() { + *x = EventsResponse{} + mi := &file_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventsResponse) ProtoMessage() {} + +func (x *EventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_event_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventsResponse.ProtoReflect.Descriptor instead. +func (*EventsResponse) Descriptor() ([]byte, []int) { + return file_event_proto_rawDescGZIP(), []int{2} +} + +func (x *EventsResponse) GetEventMessage() isEventsResponse_EventMessage { + if x != nil { + return x.EventMessage + } + return nil +} + +func (x *EventsResponse) GetEvent() *Event { + if x != nil { + if x, ok := x.EventMessage.(*EventsResponse_Event); ok { + return x.Event + } + } + return nil +} + +func (x *EventsResponse) GetFin() *Fin { + if x != nil { + if x, ok := x.EventMessage.(*EventsResponse_Fin); ok { + return x.Fin + } + } + return nil +} + +type isEventsResponse_EventMessage interface { + isEventsResponse_EventMessage() +} + +type EventsResponse_Event struct { + Event *Event `protobuf:"bytes,1,opt,name=event,proto3,oneof"` +} + +type EventsResponse_Fin struct { + Fin *Fin `protobuf:"bytes,2,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its events. +} + +func (*EventsResponse_Event) isEventsResponse_EventMessage() {} + +func (*EventsResponse_Fin) isEventsResponse_EventMessage() {} + +var File_event_proto protoreflect.FileDescriptor + +var file_event_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x05, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 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, 0x12, 0x2b, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x04, 0x6b, 0x65, + 0x79, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x39, 0x0a, 0x0d, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x5b, 0x0a, 0x0e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 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, 0x0f, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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 ( + file_event_proto_rawDescOnce sync.Once + file_event_proto_rawDescData = file_event_proto_rawDesc +) + +func file_event_proto_rawDescGZIP() []byte { + file_event_proto_rawDescOnce.Do(func() { + file_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_event_proto_rawDescData) + }) + return file_event_proto_rawDescData +} + +var file_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_event_proto_goTypes = []any{ + (*Event)(nil), // 0: Event + (*EventsRequest)(nil), // 1: EventsRequest + (*EventsResponse)(nil), // 2: EventsResponse + (*Hash)(nil), // 3: Hash + (*Felt252)(nil), // 4: Felt252 + (*Iteration)(nil), // 5: Iteration + (*Fin)(nil), // 6: Fin +} +var file_event_proto_depIdxs = []int32{ + 3, // 0: Event.transaction_hash:type_name -> Hash + 4, // 1: Event.from_address:type_name -> Felt252 + 4, // 2: Event.keys:type_name -> Felt252 + 4, // 3: Event.data:type_name -> Felt252 + 5, // 4: EventsRequest.iteration:type_name -> Iteration + 0, // 5: EventsResponse.event:type_name -> Event + 6, // 6: EventsResponse.fin:type_name -> Fin + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_event_proto_init() } +func file_event_proto_init() { + if File_event_proto != nil { + return + } + file_common_proto_init() + file_event_proto_msgTypes[2].OneofWrappers = []any{ + (*EventsResponse_Event)(nil), + (*EventsResponse_Fin)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_event_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_event_proto_goTypes, + DependencyIndexes: file_event_proto_depIdxs, + MessageInfos: file_event_proto_msgTypes, + }.Build() + File_event_proto = out.File + file_event_proto_rawDesc = nil + file_event_proto_goTypes = nil + file_event_proto_depIdxs = nil +} diff --git a/p2p/gen/header.pb.go b/p2p/gen/header.pb.go new file mode 100644 index 0000000000..3723091acf --- /dev/null +++ b/p2p/gen/header.pb.go @@ -0,0 +1,625 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: header.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Note: commitments may change to be for the previous blocks like comet/tendermint +// hash of block header sent to L1 +type SignedBlockHeader struct { + state protoimpl.MessageState `protogen:"open.v1"` + BlockHash *Hash `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // For the structure of the block hash, see https://docs.starknet.io/documentation/architecture_and_concepts/Network_Architecture/header/#block_hash + ParentHash *Hash `protobuf:"bytes,2,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + Number uint64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` // This can be deduced from context. We can consider removing this field. + Time uint64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` // Encoded in Unix time. + SequencerAddress *Address `protobuf:"bytes,5,opt,name=sequencer_address,json=sequencerAddress,proto3" json:"sequencer_address,omitempty"` + StateRoot *Hash `protobuf:"bytes,6,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // Patricia root of contract and class patricia tries. Each of those tries are of height 251. Same as in L1. Later more trees will be included + StateDiffCommitment *StateDiffCommitment `protobuf:"bytes,7,opt,name=state_diff_commitment,json=stateDiffCommitment,proto3" json:"state_diff_commitment,omitempty"` // The state diff commitment returned by the Starknet Feeder Gateway + // For more info, see https://community.starknet.io/t/introducing-p2p-authentication-and-mismatch-resolution-in-v0-12-2/97993 + // The leaves contain a hash of the transaction hash and transaction signature. + Transactions *Patricia `protobuf:"bytes,8,opt,name=transactions,proto3" json:"transactions,omitempty"` // By order of execution. TBD: required? the client can execute (powerful machine) and match state diff + 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"` + // 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 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignedBlockHeader) Reset() { + *x = SignedBlockHeader{} + mi := &file_header_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignedBlockHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedBlockHeader) ProtoMessage() {} + +func (x *SignedBlockHeader) ProtoReflect() protoreflect.Message { + mi := &file_header_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignedBlockHeader.ProtoReflect.Descriptor instead. +func (*SignedBlockHeader) Descriptor() ([]byte, []int) { + return file_header_proto_rawDescGZIP(), []int{0} +} + +func (x *SignedBlockHeader) GetBlockHash() *Hash { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *SignedBlockHeader) GetParentHash() *Hash { + if x != nil { + return x.ParentHash + } + return nil +} + +func (x *SignedBlockHeader) GetNumber() uint64 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *SignedBlockHeader) GetTime() uint64 { + if x != nil { + return x.Time + } + return 0 +} + +func (x *SignedBlockHeader) GetSequencerAddress() *Address { + if x != nil { + return x.SequencerAddress + } + return nil +} + +func (x *SignedBlockHeader) GetStateRoot() *Hash { + if x != nil { + return x.StateRoot + } + return nil +} + +func (x *SignedBlockHeader) GetStateDiffCommitment() *StateDiffCommitment { + if x != nil { + return x.StateDiffCommitment + } + return nil +} + +func (x *SignedBlockHeader) GetTransactions() *Patricia { + if x != nil { + return x.Transactions + } + return nil +} + +func (x *SignedBlockHeader) GetEvents() *Patricia { + if x != nil { + return x.Events + } + return nil +} + +func (x *SignedBlockHeader) GetReceipts() *Hash { + if x != nil { + return x.Receipts + } + return nil +} + +func (x *SignedBlockHeader) GetProtocolVersion() string { + if x != nil { + return x.ProtocolVersion + } + return "" +} + +func (x *SignedBlockHeader) GetGasPriceFri() *Uint128 { + if x != nil { + return x.GasPriceFri + } + return nil +} + +func (x *SignedBlockHeader) GetGasPriceWei() *Uint128 { + if x != nil { + return x.GasPriceWei + } + return nil +} + +func (x *SignedBlockHeader) GetDataGasPriceFri() *Uint128 { + if x != nil { + return x.DataGasPriceFri + } + return nil +} + +func (x *SignedBlockHeader) GetDataGasPriceWei() *Uint128 { + if x != nil { + return x.DataGasPriceWei + } + return nil +} + +func (x *SignedBlockHeader) GetL1DataAvailabilityMode() L1DataAvailabilityMode { + if x != nil { + return x.L1DataAvailabilityMode + } + return L1DataAvailabilityMode_Calldata +} + +func (x *SignedBlockHeader) GetSignatures() []*ConsensusSignature { + if x != nil { + return x.Signatures + } + return nil +} + +// sent to all peers (except the ones this was received from, if any). +// for a fraction of peers, also send the GetBlockHeaders response (as if they asked for it for this block) +type NewBlock struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to MaybeFull: + // + // *NewBlock_Id + // *NewBlock_Header + MaybeFull isNewBlock_MaybeFull `protobuf_oneof:"maybe_full"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NewBlock) Reset() { + *x = NewBlock{} + mi := &file_header_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NewBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NewBlock) ProtoMessage() {} + +func (x *NewBlock) ProtoReflect() protoreflect.Message { + mi := &file_header_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NewBlock.ProtoReflect.Descriptor instead. +func (*NewBlock) Descriptor() ([]byte, []int) { + return file_header_proto_rawDescGZIP(), []int{1} +} + +func (x *NewBlock) GetMaybeFull() isNewBlock_MaybeFull { + if x != nil { + return x.MaybeFull + } + return nil +} + +func (x *NewBlock) GetId() *BlockID { + if x != nil { + if x, ok := x.MaybeFull.(*NewBlock_Id); ok { + return x.Id + } + } + return nil +} + +func (x *NewBlock) GetHeader() *BlockHeadersResponse { + if x != nil { + if x, ok := x.MaybeFull.(*NewBlock_Header); ok { + return x.Header + } + } + return nil +} + +type isNewBlock_MaybeFull interface { + isNewBlock_MaybeFull() +} + +type NewBlock_Id struct { + Id *BlockID `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type NewBlock_Header struct { + Header *BlockHeadersResponse `protobuf:"bytes,2,opt,name=header,proto3,oneof"` +} + +func (*NewBlock_Id) isNewBlock_MaybeFull() {} + +func (*NewBlock_Header) isNewBlock_MaybeFull() {} + +type BlockHeadersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockHeadersRequest) Reset() { + *x = BlockHeadersRequest{} + mi := &file_header_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockHeadersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockHeadersRequest) ProtoMessage() {} + +func (x *BlockHeadersRequest) ProtoReflect() protoreflect.Message { + mi := &file_header_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockHeadersRequest.ProtoReflect.Descriptor instead. +func (*BlockHeadersRequest) Descriptor() ([]byte, []int) { + return file_header_proto_rawDescGZIP(), []int{2} +} + +func (x *BlockHeadersRequest) GetIteration() *Iteration { + if x != nil { + return x.Iteration + } + return nil +} + +// Responses are sent ordered by the order given in the request. +type BlockHeadersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to HeaderMessage: + // + // *BlockHeadersResponse_Header + // *BlockHeadersResponse_Fin + HeaderMessage isBlockHeadersResponse_HeaderMessage `protobuf_oneof:"header_message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockHeadersResponse) Reset() { + *x = BlockHeadersResponse{} + mi := &file_header_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockHeadersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockHeadersResponse) ProtoMessage() {} + +func (x *BlockHeadersResponse) ProtoReflect() protoreflect.Message { + mi := &file_header_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockHeadersResponse.ProtoReflect.Descriptor instead. +func (*BlockHeadersResponse) Descriptor() ([]byte, []int) { + return file_header_proto_rawDescGZIP(), []int{3} +} + +func (x *BlockHeadersResponse) GetHeaderMessage() isBlockHeadersResponse_HeaderMessage { + if x != nil { + return x.HeaderMessage + } + return nil +} + +func (x *BlockHeadersResponse) GetHeader() *SignedBlockHeader { + if x != nil { + if x, ok := x.HeaderMessage.(*BlockHeadersResponse_Header); ok { + return x.Header + } + } + return nil +} + +func (x *BlockHeadersResponse) GetFin() *Fin { + if x != nil { + if x, ok := x.HeaderMessage.(*BlockHeadersResponse_Fin); ok { + return x.Fin + } + } + return nil +} + +type isBlockHeadersResponse_HeaderMessage interface { + isBlockHeadersResponse_HeaderMessage() +} + +type BlockHeadersResponse_Header struct { + Header *SignedBlockHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` +} + +type BlockHeadersResponse_Fin struct { + Fin *Fin `protobuf:"bytes,2,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its header. +} + +func (*BlockHeadersResponse_Header) isBlockHeadersResponse_HeaderMessage() {} + +func (*BlockHeadersResponse_Fin) isBlockHeadersResponse_HeaderMessage() {} + +type BlockProof struct { + state protoimpl.MessageState `protogen:"open.v1"` + Proof [][]byte `protobuf:"bytes,1,rep,name=proof,proto3" json:"proof,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockProof) Reset() { + *x = BlockProof{} + mi := &file_header_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockProof) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockProof) ProtoMessage() {} + +func (x *BlockProof) ProtoReflect() protoreflect.Message { + mi := &file_header_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockProof.ProtoReflect.Descriptor instead. +func (*BlockProof) Descriptor() ([]byte, []int) { + return file_header_proto_rawDescGZIP(), []int{4} +} + +func (x *BlockProof) GetProof() [][]byte { + if x != nil { + return x.Proof + } + return nil +} + +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, + 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, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, + 0x48, 0x61, 0x73, 0x68, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x11, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x10, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x48, 0x0a, 0x15, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x13, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x61, 0x74, 0x72, + 0x69, 0x63, 0x69, 0x61, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x61, 0x74, 0x72, 0x69, 0x63, 0x69, 0x61, 0x52, 0x06, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x08, + 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, +} + +var ( + file_header_proto_rawDescOnce sync.Once + file_header_proto_rawDescData = file_header_proto_rawDesc +) + +func file_header_proto_rawDescGZIP() []byte { + file_header_proto_rawDescOnce.Do(func() { + file_header_proto_rawDescData = protoimpl.X.CompressGZIP(file_header_proto_rawDescData) + }) + return file_header_proto_rawDescData +} + +var file_header_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_header_proto_goTypes = []any{ + (*SignedBlockHeader)(nil), // 0: SignedBlockHeader + (*NewBlock)(nil), // 1: NewBlock + (*BlockHeadersRequest)(nil), // 2: BlockHeadersRequest + (*BlockHeadersResponse)(nil), // 3: BlockHeadersResponse + (*BlockProof)(nil), // 4: BlockProof + (*Hash)(nil), // 5: Hash + (*Address)(nil), // 6: Address + (*StateDiffCommitment)(nil), // 7: StateDiffCommitment + (*Patricia)(nil), // 8: Patricia + (*Uint128)(nil), // 9: Uint128 + (L1DataAvailabilityMode)(0), // 10: L1DataAvailabilityMode + (*ConsensusSignature)(nil), // 11: ConsensusSignature + (*BlockID)(nil), // 12: BlockID + (*Iteration)(nil), // 13: Iteration + (*Fin)(nil), // 14: Fin +} +var file_header_proto_depIdxs = []int32{ + 5, // 0: SignedBlockHeader.block_hash:type_name -> Hash + 5, // 1: SignedBlockHeader.parent_hash:type_name -> Hash + 6, // 2: SignedBlockHeader.sequencer_address:type_name -> Address + 5, // 3: SignedBlockHeader.state_root:type_name -> Hash + 7, // 4: SignedBlockHeader.state_diff_commitment:type_name -> StateDiffCommitment + 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 +} + +func init() { file_header_proto_init() } +func file_header_proto_init() { + if File_header_proto != nil { + return + } + file_common_proto_init() + file_header_proto_msgTypes[1].OneofWrappers = []any{ + (*NewBlock_Id)(nil), + (*NewBlock_Header)(nil), + } + file_header_proto_msgTypes[3].OneofWrappers = []any{ + (*BlockHeadersResponse_Header)(nil), + (*BlockHeadersResponse_Fin)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_header_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_header_proto_goTypes, + DependencyIndexes: file_header_proto_depIdxs, + MessageInfos: file_header_proto_msgTypes, + }.Build() + File_header_proto = out.File + file_header_proto_rawDesc = nil + file_header_proto_goTypes = nil + file_header_proto_depIdxs = nil +} diff --git a/p2p/gen/receipt.pb.go b/p2p/gen/receipt.pb.go new file mode 100644 index 0000000000..9d3d970985 --- /dev/null +++ b/p2p/gen/receipt.pb.go @@ -0,0 +1,1048 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: receipt.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PriceUnit int32 + +const ( + PriceUnit_Wei PriceUnit = 0 + PriceUnit_Fri PriceUnit = 1 +) + +// Enum value maps for PriceUnit. +var ( + PriceUnit_name = map[int32]string{ + 0: "Wei", + 1: "Fri", + } + PriceUnit_value = map[string]int32{ + "Wei": 0, + "Fri": 1, + } +) + +func (x PriceUnit) Enum() *PriceUnit { + p := new(PriceUnit) + *p = x + return p +} + +func (x PriceUnit) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PriceUnit) Descriptor() protoreflect.EnumDescriptor { + return file_receipt_proto_enumTypes[0].Descriptor() +} + +func (PriceUnit) Type() protoreflect.EnumType { + return &file_receipt_proto_enumTypes[0] +} + +func (x PriceUnit) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PriceUnit.Descriptor instead. +func (PriceUnit) EnumDescriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{0} +} + +type MessageToL1 struct { + state protoimpl.MessageState `protogen:"open.v1"` + FromAddress *Felt252 `protobuf:"bytes,2,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + Payload []*Felt252 `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload,omitempty"` + ToAddress *EthereumAddress `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageToL1) Reset() { + *x = MessageToL1{} + mi := &file_receipt_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageToL1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageToL1) ProtoMessage() {} + +func (x *MessageToL1) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageToL1.ProtoReflect.Descriptor instead. +func (*MessageToL1) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{0} +} + +func (x *MessageToL1) GetFromAddress() *Felt252 { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *MessageToL1) GetPayload() []*Felt252 { + if x != nil { + return x.Payload + } + return nil +} + +func (x *MessageToL1) GetToAddress() *EthereumAddress { + if x != nil { + return x.ToAddress + } + return nil +} + +type EthereumAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EthereumAddress) Reset() { + *x = EthereumAddress{} + mi := &file_receipt_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EthereumAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumAddress) ProtoMessage() {} + +func (x *EthereumAddress) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumAddress.ProtoReflect.Descriptor instead. +func (*EthereumAddress) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{1} +} + +func (x *EthereumAddress) GetElements() []byte { + if x != nil { + return x.Elements + } + return nil +} + +type Receipt struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Type: + // + // *Receipt_Invoke_ + // *Receipt_L1Handler_ + // *Receipt_Declare_ + // *Receipt_DeprecatedDeploy + // *Receipt_DeployAccount_ + Type isReceipt_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt) Reset() { + *x = Receipt{} + mi := &file_receipt_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt) ProtoMessage() {} + +func (x *Receipt) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt.ProtoReflect.Descriptor instead. +func (*Receipt) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2} +} + +func (x *Receipt) GetType() isReceipt_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *Receipt) GetInvoke() *Receipt_Invoke { + if x != nil { + if x, ok := x.Type.(*Receipt_Invoke_); ok { + return x.Invoke + } + } + return nil +} + +func (x *Receipt) GetL1Handler() *Receipt_L1Handler { + if x != nil { + if x, ok := x.Type.(*Receipt_L1Handler_); ok { + return x.L1Handler + } + } + return nil +} + +func (x *Receipt) GetDeclare() *Receipt_Declare { + if x != nil { + if x, ok := x.Type.(*Receipt_Declare_); ok { + return x.Declare + } + } + return nil +} + +func (x *Receipt) GetDeprecatedDeploy() *Receipt_Deploy { + if x != nil { + if x, ok := x.Type.(*Receipt_DeprecatedDeploy); ok { + return x.DeprecatedDeploy + } + } + return nil +} + +func (x *Receipt) GetDeployAccount() *Receipt_DeployAccount { + if x != nil { + if x, ok := x.Type.(*Receipt_DeployAccount_); ok { + return x.DeployAccount + } + } + return nil +} + +type isReceipt_Type interface { + isReceipt_Type() +} + +type Receipt_Invoke_ struct { + Invoke *Receipt_Invoke `protobuf:"bytes,1,opt,name=invoke,proto3,oneof"` +} + +type Receipt_L1Handler_ struct { + L1Handler *Receipt_L1Handler `protobuf:"bytes,2,opt,name=l1_handler,json=l1Handler,proto3,oneof"` +} + +type Receipt_Declare_ struct { + Declare *Receipt_Declare `protobuf:"bytes,3,opt,name=declare,proto3,oneof"` +} + +type Receipt_DeprecatedDeploy struct { + DeprecatedDeploy *Receipt_Deploy `protobuf:"bytes,4,opt,name=deprecated_deploy,json=deprecatedDeploy,proto3,oneof"` +} + +type Receipt_DeployAccount_ struct { + DeployAccount *Receipt_DeployAccount `protobuf:"bytes,5,opt,name=deploy_account,json=deployAccount,proto3,oneof"` +} + +func (*Receipt_Invoke_) isReceipt_Type() {} + +func (*Receipt_L1Handler_) isReceipt_Type() {} + +func (*Receipt_Declare_) isReceipt_Type() {} + +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"` + TotalL1Gas *Felt252 `protobuf:"bytes,6,opt,name=total_l1_gas,json=totalL1Gas,proto3" json:"total_l1_gas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt_ExecutionResources) Reset() { + *x = Receipt_ExecutionResources{} + mi := &file_receipt_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt_ExecutionResources) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt_ExecutionResources) ProtoMessage() {} + +func (x *Receipt_ExecutionResources) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt_ExecutionResources.ProtoReflect.Descriptor instead. +func (*Receipt_ExecutionResources) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *Receipt_ExecutionResources) GetBuiltins() *Receipt_ExecutionResources_BuiltinCounter { + if x != nil { + return x.Builtins + } + return nil +} + +func (x *Receipt_ExecutionResources) GetSteps() uint32 { + if x != nil { + return x.Steps + } + return 0 +} + +func (x *Receipt_ExecutionResources) GetMemoryHoles() uint32 { + if x != nil { + return x.MemoryHoles + } + return 0 +} + +func (x *Receipt_ExecutionResources) GetL1Gas() *Felt252 { + if x != nil { + return x.L1Gas + } + return nil +} + +func (x *Receipt_ExecutionResources) GetL1DataGas() *Felt252 { + if x != nil { + return x.L1DataGas + } + return nil +} + +func (x *Receipt_ExecutionResources) GetTotalL1Gas() *Felt252 { + if x != nil { + return x.TotalL1Gas + } + return nil +} + +type Receipt_Common struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActualFee *Felt252 `protobuf:"bytes,2,opt,name=actual_fee,json=actualFee,proto3" json:"actual_fee,omitempty"` + PriceUnit PriceUnit `protobuf:"varint,3,opt,name=price_unit,json=priceUnit,proto3,enum=PriceUnit" json:"price_unit,omitempty"` + MessagesSent []*MessageToL1 `protobuf:"bytes,4,rep,name=messages_sent,json=messagesSent,proto3" json:"messages_sent,omitempty"` + ExecutionResources *Receipt_ExecutionResources `protobuf:"bytes,5,opt,name=execution_resources,json=executionResources,proto3" json:"execution_resources,omitempty"` + RevertReason *string `protobuf:"bytes,6,opt,name=revert_reason,json=revertReason,proto3,oneof" json:"revert_reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt_Common) Reset() { + *x = Receipt_Common{} + mi := &file_receipt_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt_Common) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt_Common) ProtoMessage() {} + +func (x *Receipt_Common) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt_Common.ProtoReflect.Descriptor instead. +func (*Receipt_Common) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *Receipt_Common) GetActualFee() *Felt252 { + if x != nil { + return x.ActualFee + } + return nil +} + +func (x *Receipt_Common) GetPriceUnit() PriceUnit { + if x != nil { + return x.PriceUnit + } + return PriceUnit_Wei +} + +func (x *Receipt_Common) GetMessagesSent() []*MessageToL1 { + if x != nil { + return x.MessagesSent + } + return nil +} + +func (x *Receipt_Common) GetExecutionResources() *Receipt_ExecutionResources { + if x != nil { + return x.ExecutionResources + } + return nil +} + +func (x *Receipt_Common) GetRevertReason() string { + if x != nil && x.RevertReason != nil { + return *x.RevertReason + } + return "" +} + +type Receipt_Invoke struct { + state protoimpl.MessageState `protogen:"open.v1"` + Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt_Invoke) Reset() { + *x = Receipt_Invoke{} + mi := &file_receipt_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt_Invoke) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt_Invoke) ProtoMessage() {} + +func (x *Receipt_Invoke) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt_Invoke.ProtoReflect.Descriptor instead. +func (*Receipt_Invoke) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2, 2} +} + +func (x *Receipt_Invoke) GetCommon() *Receipt_Common { + if x != nil { + return x.Common + } + return nil +} + +type Receipt_L1Handler struct { + state protoimpl.MessageState `protogen:"open.v1"` + Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` + MsgHash *Hash256 `protobuf:"bytes,2,opt,name=msg_hash,json=msgHash,proto3" json:"msg_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt_L1Handler) Reset() { + *x = Receipt_L1Handler{} + mi := &file_receipt_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt_L1Handler) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt_L1Handler) ProtoMessage() {} + +func (x *Receipt_L1Handler) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt_L1Handler.ProtoReflect.Descriptor instead. +func (*Receipt_L1Handler) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2, 3} +} + +func (x *Receipt_L1Handler) GetCommon() *Receipt_Common { + if x != nil { + return x.Common + } + return nil +} + +func (x *Receipt_L1Handler) GetMsgHash() *Hash256 { + if x != nil { + return x.MsgHash + } + return nil +} + +type Receipt_Declare struct { + state protoimpl.MessageState `protogen:"open.v1"` + Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt_Declare) Reset() { + *x = Receipt_Declare{} + mi := &file_receipt_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt_Declare) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt_Declare) ProtoMessage() {} + +func (x *Receipt_Declare) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt_Declare.ProtoReflect.Descriptor instead. +func (*Receipt_Declare) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2, 4} +} + +func (x *Receipt_Declare) GetCommon() *Receipt_Common { + if x != nil { + return x.Common + } + return nil +} + +type Receipt_Deploy struct { + state protoimpl.MessageState `protogen:"open.v1"` + Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` + ContractAddress *Felt252 `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt_Deploy) Reset() { + *x = Receipt_Deploy{} + mi := &file_receipt_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt_Deploy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt_Deploy) ProtoMessage() {} + +func (x *Receipt_Deploy) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt_Deploy.ProtoReflect.Descriptor instead. +func (*Receipt_Deploy) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2, 5} +} + +func (x *Receipt_Deploy) GetCommon() *Receipt_Common { + if x != nil { + return x.Common + } + return nil +} + +func (x *Receipt_Deploy) GetContractAddress() *Felt252 { + if x != nil { + return x.ContractAddress + } + return nil +} + +type Receipt_DeployAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` + ContractAddress *Felt252 `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt_DeployAccount) Reset() { + *x = Receipt_DeployAccount{} + mi := &file_receipt_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt_DeployAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt_DeployAccount) ProtoMessage() {} + +func (x *Receipt_DeployAccount) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt_DeployAccount.ProtoReflect.Descriptor instead. +func (*Receipt_DeployAccount) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2, 6} +} + +func (x *Receipt_DeployAccount) GetCommon() *Receipt_Common { + if x != nil { + return x.Common + } + return nil +} + +func (x *Receipt_DeployAccount) GetContractAddress() *Felt252 { + if x != nil { + return x.ContractAddress + } + return nil +} + +type Receipt_ExecutionResources_BuiltinCounter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bitwise uint32 `protobuf:"varint,1,opt,name=bitwise,proto3" json:"bitwise,omitempty"` + Ecdsa uint32 `protobuf:"varint,2,opt,name=ecdsa,proto3" json:"ecdsa,omitempty"` + EcOp uint32 `protobuf:"varint,3,opt,name=ec_op,json=ecOp,proto3" json:"ec_op,omitempty"` + Pedersen uint32 `protobuf:"varint,4,opt,name=pedersen,proto3" json:"pedersen,omitempty"` + RangeCheck uint32 `protobuf:"varint,5,opt,name=range_check,json=rangeCheck,proto3" json:"range_check,omitempty"` + Poseidon uint32 `protobuf:"varint,6,opt,name=poseidon,proto3" json:"poseidon,omitempty"` + Keccak uint32 `protobuf:"varint,7,opt,name=keccak,proto3" json:"keccak,omitempty"` + Output uint32 `protobuf:"varint,8,opt,name=output,proto3" json:"output,omitempty"` + AddMod uint32 `protobuf:"varint,9,opt,name=add_mod,json=addMod,proto3" json:"add_mod,omitempty"` + MulMod uint32 `protobuf:"varint,10,opt,name=mul_mod,json=mulMod,proto3" json:"mul_mod,omitempty"` + RangeCheck96 uint32 `protobuf:"varint,11,opt,name=range_check96,json=rangeCheck96,proto3" json:"range_check96,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) Reset() { + *x = Receipt_ExecutionResources_BuiltinCounter{} + mi := &file_receipt_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Receipt_ExecutionResources_BuiltinCounter) ProtoMessage() {} + +func (x *Receipt_ExecutionResources_BuiltinCounter) ProtoReflect() protoreflect.Message { + mi := &file_receipt_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Receipt_ExecutionResources_BuiltinCounter.ProtoReflect.Descriptor instead. +func (*Receipt_ExecutionResources_BuiltinCounter) Descriptor() ([]byte, []int) { + return file_receipt_proto_rawDescGZIP(), []int{2, 0, 0} +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetBitwise() uint32 { + if x != nil { + return x.Bitwise + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetEcdsa() uint32 { + if x != nil { + return x.Ecdsa + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetEcOp() uint32 { + if x != nil { + return x.EcOp + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetPedersen() uint32 { + if x != nil { + return x.Pedersen + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetRangeCheck() uint32 { + if x != nil { + return x.RangeCheck + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetPoseidon() uint32 { + if x != nil { + return x.Poseidon + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetKeccak() uint32 { + if x != nil { + return x.Keccak + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetOutput() uint32 { + if x != nil { + return x.Output + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetAddMod() uint32 { + if x != nil { + return x.AddMod + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetMulMod() uint32 { + if x != nil { + return x.MulMod + } + return 0 +} + +func (x *Receipt_ExecutionResources_BuiltinCounter) GetRangeCheck96() uint32 { + if x != nil { + return x.RangeCheck96 + } + return 0 +} + +var File_receipt_proto protoreflect.FileDescriptor + +var file_receipt_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x01, + 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x4c, 0x31, 0x12, 0x2b, 0x0a, + 0x0c, 0x66, 0x72, 0x6f, 0x6d, 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, 0x0b, 0x66, + 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x0a, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, + 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2f, + 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x41, 0x64, 0x64, + 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, + 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, + 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x6c, 0x31, 0x5f, 0x68, 0x61, 0x6e, 0x64, + 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x2e, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x09, 0x6c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x07, 0x64, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x48, 0x00, 0x52, + 0x07, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x12, 0x3e, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x48, 0x00, 0x52, 0x10, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x3f, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, + 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, + 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, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, + 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x08, + 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x48, 0x6f, 0x6c, 0x65, + 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 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, + 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, 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 ( + file_receipt_proto_rawDescOnce sync.Once + file_receipt_proto_rawDescData = file_receipt_proto_rawDesc +) + +func file_receipt_proto_rawDescGZIP() []byte { + file_receipt_proto_rawDescOnce.Do(func() { + file_receipt_proto_rawDescData = protoimpl.X.CompressGZIP(file_receipt_proto_rawDescData) + }) + return file_receipt_proto_rawDescData +} + +var file_receipt_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_receipt_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_receipt_proto_goTypes = []any{ + (PriceUnit)(0), // 0: PriceUnit + (*MessageToL1)(nil), // 1: MessageToL1 + (*EthereumAddress)(nil), // 2: EthereumAddress + (*Receipt)(nil), // 3: Receipt + (*Receipt_ExecutionResources)(nil), // 4: Receipt.ExecutionResources + (*Receipt_Common)(nil), // 5: Receipt.Common + (*Receipt_Invoke)(nil), // 6: Receipt.Invoke + (*Receipt_L1Handler)(nil), // 7: Receipt.L1Handler + (*Receipt_Declare)(nil), // 8: Receipt.Declare + (*Receipt_Deploy)(nil), // 9: Receipt.Deploy + (*Receipt_DeployAccount)(nil), // 10: Receipt.DeployAccount + (*Receipt_ExecutionResources_BuiltinCounter)(nil), // 11: Receipt.ExecutionResources.BuiltinCounter + (*Felt252)(nil), // 12: Felt252 + (*Hash256)(nil), // 13: Hash256 +} +var file_receipt_proto_depIdxs = []int32{ + 12, // 0: MessageToL1.from_address:type_name -> Felt252 + 12, // 1: MessageToL1.payload:type_name -> Felt252 + 2, // 2: MessageToL1.to_address:type_name -> EthereumAddress + 6, // 3: Receipt.invoke:type_name -> Receipt.Invoke + 7, // 4: Receipt.l1_handler:type_name -> Receipt.L1Handler + 8, // 5: Receipt.declare:type_name -> Receipt.Declare + 9, // 6: Receipt.deprecated_deploy:type_name -> Receipt.Deploy + 10, // 7: Receipt.deploy_account:type_name -> Receipt.DeployAccount + 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 +} + +func init() { file_receipt_proto_init() } +func file_receipt_proto_init() { + if File_receipt_proto != nil { + return + } + file_common_proto_init() + file_receipt_proto_msgTypes[2].OneofWrappers = []any{ + (*Receipt_Invoke_)(nil), + (*Receipt_L1Handler_)(nil), + (*Receipt_Declare_)(nil), + (*Receipt_DeprecatedDeploy)(nil), + (*Receipt_DeployAccount_)(nil), + } + file_receipt_proto_msgTypes[4].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_receipt_proto_rawDesc, + NumEnums: 1, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_receipt_proto_goTypes, + DependencyIndexes: file_receipt_proto_depIdxs, + EnumInfos: file_receipt_proto_enumTypes, + MessageInfos: file_receipt_proto_msgTypes, + }.Build() + File_receipt_proto = out.File + file_receipt_proto_rawDesc = nil + file_receipt_proto_goTypes = nil + file_receipt_proto_depIdxs = nil +} diff --git a/p2p/gen/state.pb.go b/p2p/gen/state.pb.go new file mode 100644 index 0000000000..381f7b42b0 --- /dev/null +++ b/p2p/gen/state.pb.go @@ -0,0 +1,482 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: state.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// optimized for flat storage, not through a trie (not sharing key prefixes) +type ContractStoredValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key *Felt252 `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *Felt252 `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContractStoredValue) Reset() { + *x = ContractStoredValue{} + mi := &file_state_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContractStoredValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractStoredValue) ProtoMessage() {} + +func (x *ContractStoredValue) ProtoReflect() protoreflect.Message { + mi := &file_state_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContractStoredValue.ProtoReflect.Descriptor instead. +func (*ContractStoredValue) Descriptor() ([]byte, []int) { + return file_state_proto_rawDescGZIP(), []int{0} +} + +func (x *ContractStoredValue) GetKey() *Felt252 { + if x != nil { + return x.Key + } + return nil +} + +func (x *ContractStoredValue) GetValue() *Felt252 { + if x != nil { + return x.Value + } + return nil +} + +type ContractDiff struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Nonce *Felt252 `protobuf:"bytes,2,opt,name=nonce,proto3,oneof" json:"nonce,omitempty"` // Present only if the nonce was updated + ClassHash *Hash `protobuf:"bytes,3,opt,name=class_hash,json=classHash,proto3,oneof" json:"class_hash,omitempty"` // Present only if the contract was deployed or replaced in this block. + Values []*ContractStoredValue `protobuf:"bytes,4,rep,name=values,proto3" json:"values,omitempty"` + Domain VolitionDomain `protobuf:"varint,5,opt,name=domain,proto3,enum=VolitionDomain" json:"domain,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContractDiff) Reset() { + *x = ContractDiff{} + mi := &file_state_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContractDiff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractDiff) ProtoMessage() {} + +func (x *ContractDiff) ProtoReflect() protoreflect.Message { + mi := &file_state_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContractDiff.ProtoReflect.Descriptor instead. +func (*ContractDiff) Descriptor() ([]byte, []int) { + return file_state_proto_rawDescGZIP(), []int{1} +} + +func (x *ContractDiff) GetAddress() *Address { + if x != nil { + return x.Address + } + return nil +} + +func (x *ContractDiff) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *ContractDiff) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *ContractDiff) GetValues() []*ContractStoredValue { + if x != nil { + return x.Values + } + return nil +} + +func (x *ContractDiff) GetDomain() VolitionDomain { + if x != nil { + return x.Domain + } + return VolitionDomain_L1 +} + +type DeclaredClass struct { + state protoimpl.MessageState `protogen:"open.v1"` + ClassHash *Hash `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + CompiledClassHash *Hash `protobuf:"bytes,2,opt,name=compiled_class_hash,json=compiledClassHash,proto3,oneof" json:"compiled_class_hash,omitempty"` // Present only if the class is Cairo1 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeclaredClass) Reset() { + *x = DeclaredClass{} + mi := &file_state_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeclaredClass) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeclaredClass) ProtoMessage() {} + +func (x *DeclaredClass) ProtoReflect() protoreflect.Message { + mi := &file_state_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeclaredClass.ProtoReflect.Descriptor instead. +func (*DeclaredClass) Descriptor() ([]byte, []int) { + return file_state_proto_rawDescGZIP(), []int{2} +} + +func (x *DeclaredClass) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *DeclaredClass) GetCompiledClassHash() *Hash { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +type StateDiffsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StateDiffsRequest) Reset() { + *x = StateDiffsRequest{} + mi := &file_state_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StateDiffsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateDiffsRequest) ProtoMessage() {} + +func (x *StateDiffsRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StateDiffsRequest.ProtoReflect.Descriptor instead. +func (*StateDiffsRequest) Descriptor() ([]byte, []int) { + return file_state_proto_rawDescGZIP(), []int{3} +} + +func (x *StateDiffsRequest) GetIteration() *Iteration { + if x != nil { + return x.Iteration + } + return nil +} + +// Responses are sent ordered by the order given in the request. +type StateDiffsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // All of the messages related to a block need to be sent before a message from the next block is sent. + // + // Types that are valid to be assigned to StateDiffMessage: + // + // *StateDiffsResponse_ContractDiff + // *StateDiffsResponse_DeclaredClass + // *StateDiffsResponse_Fin + StateDiffMessage isStateDiffsResponse_StateDiffMessage `protobuf_oneof:"state_diff_message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StateDiffsResponse) Reset() { + *x = StateDiffsResponse{} + mi := &file_state_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StateDiffsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateDiffsResponse) ProtoMessage() {} + +func (x *StateDiffsResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StateDiffsResponse.ProtoReflect.Descriptor instead. +func (*StateDiffsResponse) Descriptor() ([]byte, []int) { + return file_state_proto_rawDescGZIP(), []int{4} +} + +func (x *StateDiffsResponse) GetStateDiffMessage() isStateDiffsResponse_StateDiffMessage { + if x != nil { + return x.StateDiffMessage + } + return nil +} + +func (x *StateDiffsResponse) GetContractDiff() *ContractDiff { + if x != nil { + if x, ok := x.StateDiffMessage.(*StateDiffsResponse_ContractDiff); ok { + return x.ContractDiff + } + } + return nil +} + +func (x *StateDiffsResponse) GetDeclaredClass() *DeclaredClass { + if x != nil { + if x, ok := x.StateDiffMessage.(*StateDiffsResponse_DeclaredClass); ok { + return x.DeclaredClass + } + } + return nil +} + +func (x *StateDiffsResponse) GetFin() *Fin { + if x != nil { + if x, ok := x.StateDiffMessage.(*StateDiffsResponse_Fin); ok { + return x.Fin + } + } + return nil +} + +type isStateDiffsResponse_StateDiffMessage interface { + isStateDiffsResponse_StateDiffMessage() +} + +type StateDiffsResponse_ContractDiff struct { + ContractDiff *ContractDiff `protobuf:"bytes,1,opt,name=contract_diff,json=contractDiff,proto3,oneof"` // Multiple contract diffs for the same contract may appear continuously if the diff is too large or if it's more convenient. +} + +type StateDiffsResponse_DeclaredClass struct { + DeclaredClass *DeclaredClass `protobuf:"bytes,2,opt,name=declared_class,json=declaredClass,proto3,oneof"` +} + +type StateDiffsResponse_Fin struct { + Fin *Fin `protobuf:"bytes,3,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its state diff. +} + +func (*StateDiffsResponse_ContractDiff) isStateDiffsResponse_StateDiffMessage() {} + +func (*StateDiffsResponse_DeclaredClass) isStateDiffsResponse_StateDiffMessage() {} + +func (*StateDiffsResponse_Fin) isStateDiffsResponse_StateDiffMessage() {} + +var File_state_proto protoreflect.FileDescriptor + +var file_state_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x13, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1e, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf2, + 0x01, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x12, + 0x22, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x48, 0x00, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 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, 0x48, 0x01, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, + 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x27, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, + 0x43, 0x6c, 0x61, 0x73, 0x73, 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, 0x3a, 0x0a, 0x13, 0x63, + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x48, + 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x48, 0x61, 0x73, 0x68, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x22, + 0x3d, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 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, 0xb3, + 0x01, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x48, 0x00, 0x52, 0x0c, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x12, 0x37, 0x0a, 0x0e, 0x64, + 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x03, 0x66, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x04, 0x2e, 0x46, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x66, 0x69, 0x6e, 0x42, 0x14, + 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 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 ( + file_state_proto_rawDescOnce sync.Once + file_state_proto_rawDescData = file_state_proto_rawDesc +) + +func file_state_proto_rawDescGZIP() []byte { + file_state_proto_rawDescOnce.Do(func() { + file_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_state_proto_rawDescData) + }) + return file_state_proto_rawDescData +} + +var file_state_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_state_proto_goTypes = []any{ + (*ContractStoredValue)(nil), // 0: ContractStoredValue + (*ContractDiff)(nil), // 1: ContractDiff + (*DeclaredClass)(nil), // 2: DeclaredClass + (*StateDiffsRequest)(nil), // 3: StateDiffsRequest + (*StateDiffsResponse)(nil), // 4: StateDiffsResponse + (*Felt252)(nil), // 5: Felt252 + (*Address)(nil), // 6: Address + (*Hash)(nil), // 7: Hash + (VolitionDomain)(0), // 8: VolitionDomain + (*Iteration)(nil), // 9: Iteration + (*Fin)(nil), // 10: Fin +} +var file_state_proto_depIdxs = []int32{ + 5, // 0: ContractStoredValue.key:type_name -> Felt252 + 5, // 1: ContractStoredValue.value:type_name -> Felt252 + 6, // 2: ContractDiff.address:type_name -> Address + 5, // 3: ContractDiff.nonce:type_name -> Felt252 + 7, // 4: ContractDiff.class_hash:type_name -> Hash + 0, // 5: ContractDiff.values:type_name -> ContractStoredValue + 8, // 6: ContractDiff.domain:type_name -> VolitionDomain + 7, // 7: DeclaredClass.class_hash:type_name -> Hash + 7, // 8: DeclaredClass.compiled_class_hash:type_name -> Hash + 9, // 9: StateDiffsRequest.iteration:type_name -> Iteration + 1, // 10: StateDiffsResponse.contract_diff:type_name -> ContractDiff + 2, // 11: StateDiffsResponse.declared_class:type_name -> DeclaredClass + 10, // 12: StateDiffsResponse.fin:type_name -> Fin + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_state_proto_init() } +func file_state_proto_init() { + if File_state_proto != nil { + return + } + file_common_proto_init() + file_state_proto_msgTypes[1].OneofWrappers = []any{} + file_state_proto_msgTypes[2].OneofWrappers = []any{} + file_state_proto_msgTypes[4].OneofWrappers = []any{ + (*StateDiffsResponse_ContractDiff)(nil), + (*StateDiffsResponse_DeclaredClass)(nil), + (*StateDiffsResponse_Fin)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_state_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_state_proto_goTypes, + DependencyIndexes: file_state_proto_depIdxs, + MessageInfos: file_state_proto_msgTypes, + }.Build() + File_state_proto = out.File + file_state_proto_rawDesc = nil + file_state_proto_goTypes = nil + file_state_proto_depIdxs = nil +} diff --git a/p2p/gen/transaction.pb.go b/p2p/gen/transaction.pb.go new file mode 100644 index 0000000000..ed5487ea0d --- /dev/null +++ b/p2p/gen/transaction.pb.go @@ -0,0 +1,2074 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.0 +// protoc (unknown) +// source: transaction.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ResourceLimits struct { + state protoimpl.MessageState `protogen:"open.v1"` + MaxAmount *Felt252 `protobuf:"bytes,1,opt,name=max_amount,json=maxAmount,proto3" json:"max_amount,omitempty"` + MaxPricePerUnit *Felt252 `protobuf:"bytes,2,opt,name=max_price_per_unit,json=maxPricePerUnit,proto3" json:"max_price_per_unit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResourceLimits) Reset() { + *x = ResourceLimits{} + mi := &file_transaction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceLimits) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceLimits) ProtoMessage() {} + +func (x *ResourceLimits) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceLimits.ProtoReflect.Descriptor instead. +func (*ResourceLimits) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{0} +} + +func (x *ResourceLimits) GetMaxAmount() *Felt252 { + if x != nil { + return x.MaxAmount + } + return nil +} + +func (x *ResourceLimits) GetMaxPricePerUnit() *Felt252 { + if x != nil { + return x.MaxPricePerUnit + } + return nil +} + +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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResourceBounds) Reset() { + *x = ResourceBounds{} + mi := &file_transaction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceBounds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceBounds) ProtoMessage() {} + +func (x *ResourceBounds) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceBounds.ProtoReflect.Descriptor instead. +func (*ResourceBounds) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{1} +} + +func (x *ResourceBounds) GetL1Gas() *ResourceLimits { + if x != nil { + return x.L1Gas + } + return nil +} + +func (x *ResourceBounds) GetL2Gas() *ResourceLimits { + if x != nil { + return x.L2Gas + } + return nil +} + +type AccountSignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + Parts []*Felt252 `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountSignature) Reset() { + *x = AccountSignature{} + mi := &file_transaction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountSignature) ProtoMessage() {} + +func (x *AccountSignature) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountSignature.ProtoReflect.Descriptor instead. +func (*AccountSignature) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{2} +} + +func (x *AccountSignature) GetParts() []*Felt252 { + if x != nil { + return x.Parts + } + return nil +} + +// This is a transaction that is already accepted in a block. Once we have a mempool, we will define +// a separate message for BroadcastedTransaction. +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Txn: + // + // *Transaction_DeclareV0_ + // *Transaction_DeclareV1_ + // *Transaction_DeclareV2_ + // *Transaction_DeclareV3_ + // *Transaction_Deploy_ + // *Transaction_DeployAccountV1_ + // *Transaction_DeployAccountV3_ + // *Transaction_InvokeV0_ + // *Transaction_InvokeV1_ + // *Transaction_InvokeV3_ + // *Transaction_L1Handler + Txn isTransaction_Txn `protobuf_oneof:"txn"` + TransactionHash *Hash `protobuf:"bytes,12,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_transaction_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3} +} + +func (x *Transaction) GetTxn() isTransaction_Txn { + if x != nil { + return x.Txn + } + return nil +} + +func (x *Transaction) GetDeclareV0() *Transaction_DeclareV0 { + if x != nil { + if x, ok := x.Txn.(*Transaction_DeclareV0_); ok { + return x.DeclareV0 + } + } + return nil +} + +func (x *Transaction) GetDeclareV1() *Transaction_DeclareV1 { + if x != nil { + if x, ok := x.Txn.(*Transaction_DeclareV1_); ok { + return x.DeclareV1 + } + } + return nil +} + +func (x *Transaction) GetDeclareV2() *Transaction_DeclareV2 { + if x != nil { + if x, ok := x.Txn.(*Transaction_DeclareV2_); ok { + return x.DeclareV2 + } + } + return nil +} + +func (x *Transaction) GetDeclareV3() *Transaction_DeclareV3 { + if x != nil { + if x, ok := x.Txn.(*Transaction_DeclareV3_); ok { + return x.DeclareV3 + } + } + return nil +} + +func (x *Transaction) GetDeploy() *Transaction_Deploy { + if x != nil { + if x, ok := x.Txn.(*Transaction_Deploy_); ok { + return x.Deploy + } + } + return nil +} + +func (x *Transaction) GetDeployAccountV1() *Transaction_DeployAccountV1 { + if x != nil { + if x, ok := x.Txn.(*Transaction_DeployAccountV1_); ok { + return x.DeployAccountV1 + } + } + return nil +} + +func (x *Transaction) GetDeployAccountV3() *Transaction_DeployAccountV3 { + if x != nil { + if x, ok := x.Txn.(*Transaction_DeployAccountV3_); ok { + return x.DeployAccountV3 + } + } + return nil +} + +func (x *Transaction) GetInvokeV0() *Transaction_InvokeV0 { + if x != nil { + if x, ok := x.Txn.(*Transaction_InvokeV0_); ok { + return x.InvokeV0 + } + } + return nil +} + +func (x *Transaction) GetInvokeV1() *Transaction_InvokeV1 { + if x != nil { + if x, ok := x.Txn.(*Transaction_InvokeV1_); ok { + return x.InvokeV1 + } + } + return nil +} + +func (x *Transaction) GetInvokeV3() *Transaction_InvokeV3 { + if x != nil { + if x, ok := x.Txn.(*Transaction_InvokeV3_); ok { + return x.InvokeV3 + } + } + return nil +} + +func (x *Transaction) GetL1Handler() *Transaction_L1HandlerV0 { + if x != nil { + if x, ok := x.Txn.(*Transaction_L1Handler); ok { + return x.L1Handler + } + } + return nil +} + +func (x *Transaction) GetTransactionHash() *Hash { + if x != nil { + return x.TransactionHash + } + return nil +} + +type isTransaction_Txn interface { + isTransaction_Txn() +} + +type Transaction_DeclareV0_ struct { + DeclareV0 *Transaction_DeclareV0 `protobuf:"bytes,1,opt,name=declare_v0,json=declareV0,proto3,oneof"` +} + +type Transaction_DeclareV1_ struct { + DeclareV1 *Transaction_DeclareV1 `protobuf:"bytes,2,opt,name=declare_v1,json=declareV1,proto3,oneof"` +} + +type Transaction_DeclareV2_ struct { + DeclareV2 *Transaction_DeclareV2 `protobuf:"bytes,3,opt,name=declare_v2,json=declareV2,proto3,oneof"` +} + +type Transaction_DeclareV3_ struct { + DeclareV3 *Transaction_DeclareV3 `protobuf:"bytes,4,opt,name=declare_v3,json=declareV3,proto3,oneof"` +} + +type Transaction_Deploy_ struct { + Deploy *Transaction_Deploy `protobuf:"bytes,5,opt,name=deploy,proto3,oneof"` +} + +type Transaction_DeployAccountV1_ struct { + DeployAccountV1 *Transaction_DeployAccountV1 `protobuf:"bytes,6,opt,name=deploy_account_v1,json=deployAccountV1,proto3,oneof"` +} + +type Transaction_DeployAccountV3_ struct { + DeployAccountV3 *Transaction_DeployAccountV3 `protobuf:"bytes,7,opt,name=deploy_account_v3,json=deployAccountV3,proto3,oneof"` +} + +type Transaction_InvokeV0_ struct { + InvokeV0 *Transaction_InvokeV0 `protobuf:"bytes,8,opt,name=invoke_v0,json=invokeV0,proto3,oneof"` +} + +type Transaction_InvokeV1_ struct { + InvokeV1 *Transaction_InvokeV1 `protobuf:"bytes,9,opt,name=invoke_v1,json=invokeV1,proto3,oneof"` +} + +type Transaction_InvokeV3_ struct { + InvokeV3 *Transaction_InvokeV3 `protobuf:"bytes,10,opt,name=invoke_v3,json=invokeV3,proto3,oneof"` +} + +type Transaction_L1Handler struct { + L1Handler *Transaction_L1HandlerV0 `protobuf:"bytes,11,opt,name=l1_handler,json=l1Handler,proto3,oneof"` +} + +func (*Transaction_DeclareV0_) isTransaction_Txn() {} + +func (*Transaction_DeclareV1_) isTransaction_Txn() {} + +func (*Transaction_DeclareV2_) isTransaction_Txn() {} + +func (*Transaction_DeclareV3_) isTransaction_Txn() {} + +func (*Transaction_Deploy_) isTransaction_Txn() {} + +func (*Transaction_DeployAccountV1_) isTransaction_Txn() {} + +func (*Transaction_DeployAccountV3_) isTransaction_Txn() {} + +func (*Transaction_InvokeV0_) isTransaction_Txn() {} + +func (*Transaction_InvokeV1_) isTransaction_Txn() {} + +func (*Transaction_InvokeV3_) isTransaction_Txn() {} + +func (*Transaction_L1Handler) isTransaction_Txn() {} + +type TransactionWithReceipt struct { + state protoimpl.MessageState `protogen:"open.v1"` + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + Receipt *Receipt `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionWithReceipt) Reset() { + *x = TransactionWithReceipt{} + mi := &file_transaction_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionWithReceipt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionWithReceipt) ProtoMessage() {} + +func (x *TransactionWithReceipt) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionWithReceipt.ProtoReflect.Descriptor instead. +func (*TransactionWithReceipt) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{4} +} + +func (x *TransactionWithReceipt) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *TransactionWithReceipt) GetReceipt() *Receipt { + if x != nil { + return x.Receipt + } + return nil +} + +// TBD: can support a flag to return tx hashes only, good for standalone mempool to remove them, +// or any node that keeps track of transaction streaming in the consensus. +type TransactionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionsRequest) Reset() { + *x = TransactionsRequest{} + mi := &file_transaction_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionsRequest) ProtoMessage() {} + +func (x *TransactionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionsRequest.ProtoReflect.Descriptor instead. +func (*TransactionsRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{5} +} + +func (x *TransactionsRequest) GetIteration() *Iteration { + if x != nil { + return x.Iteration + } + return nil +} + +// Responses are sent ordered by the order given in the request. The order inside each block is +// according to the execution order. +type TransactionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to TransactionMessage: + // + // *TransactionsResponse_TransactionWithReceipt + // *TransactionsResponse_Fin + TransactionMessage isTransactionsResponse_TransactionMessage `protobuf_oneof:"transaction_message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionsResponse) Reset() { + *x = TransactionsResponse{} + mi := &file_transaction_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionsResponse) ProtoMessage() {} + +func (x *TransactionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionsResponse.ProtoReflect.Descriptor instead. +func (*TransactionsResponse) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{6} +} + +func (x *TransactionsResponse) GetTransactionMessage() isTransactionsResponse_TransactionMessage { + if x != nil { + return x.TransactionMessage + } + return nil +} + +func (x *TransactionsResponse) GetTransactionWithReceipt() *TransactionWithReceipt { + if x != nil { + if x, ok := x.TransactionMessage.(*TransactionsResponse_TransactionWithReceipt); ok { + return x.TransactionWithReceipt + } + } + return nil +} + +func (x *TransactionsResponse) GetFin() *Fin { + if x != nil { + if x, ok := x.TransactionMessage.(*TransactionsResponse_Fin); ok { + return x.Fin + } + } + return nil +} + +type isTransactionsResponse_TransactionMessage interface { + isTransactionsResponse_TransactionMessage() +} + +type TransactionsResponse_TransactionWithReceipt struct { + TransactionWithReceipt *TransactionWithReceipt `protobuf:"bytes,1,opt,name=transaction_with_receipt,json=transactionWithReceipt,proto3,oneof"` +} + +type TransactionsResponse_Fin struct { + Fin *Fin `protobuf:"bytes,2,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its transactions. +} + +func (*TransactionsResponse_TransactionWithReceipt) isTransactionsResponse_TransactionMessage() {} + +func (*TransactionsResponse_Fin) isTransactionsResponse_TransactionMessage() {} + +type Transactions struct { + state protoimpl.MessageState `protogen:"open.v1"` + Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transactions) Reset() { + *x = Transactions{} + mi := &file_transaction_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transactions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transactions) ProtoMessage() {} + +func (x *Transactions) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transactions.ProtoReflect.Descriptor instead. +func (*Transactions) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{7} +} + +func (x *Transactions) GetTransactions() []*Transaction { + if x != nil { + return x.Transactions + } + return nil +} + +type Transaction_DeclareV0 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + MaxFee *Felt252 `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + Signature *AccountSignature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + ClassHash *Hash `protobuf:"bytes,4,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_DeclareV0) Reset() { + *x = Transaction_DeclareV0{} + mi := &file_transaction_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_DeclareV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_DeclareV0) ProtoMessage() {} + +func (x *Transaction_DeclareV0) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_DeclareV0.ProtoReflect.Descriptor instead. +func (*Transaction_DeclareV0) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *Transaction_DeclareV0) GetSender() *Address { + if x != nil { + return x.Sender + } + return nil +} + +func (x *Transaction_DeclareV0) GetMaxFee() *Felt252 { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *Transaction_DeclareV0) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_DeclareV0) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +type Transaction_DeclareV1 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + MaxFee *Felt252 `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + Signature *AccountSignature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + ClassHash *Hash `protobuf:"bytes,4,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + Nonce *Felt252 `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_DeclareV1) Reset() { + *x = Transaction_DeclareV1{} + mi := &file_transaction_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_DeclareV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_DeclareV1) ProtoMessage() {} + +func (x *Transaction_DeclareV1) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_DeclareV1.ProtoReflect.Descriptor instead. +func (*Transaction_DeclareV1) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *Transaction_DeclareV1) GetSender() *Address { + if x != nil { + return x.Sender + } + return nil +} + +func (x *Transaction_DeclareV1) GetMaxFee() *Felt252 { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *Transaction_DeclareV1) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_DeclareV1) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *Transaction_DeclareV1) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +type Transaction_DeclareV2 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + MaxFee *Felt252 `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + Signature *AccountSignature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + ClassHash *Hash `protobuf:"bytes,4,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + Nonce *Felt252 `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + CompiledClassHash *Hash `protobuf:"bytes,6,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_DeclareV2) Reset() { + *x = Transaction_DeclareV2{} + mi := &file_transaction_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_DeclareV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_DeclareV2) ProtoMessage() {} + +func (x *Transaction_DeclareV2) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_DeclareV2.ProtoReflect.Descriptor instead. +func (*Transaction_DeclareV2) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 2} +} + +func (x *Transaction_DeclareV2) GetSender() *Address { + if x != nil { + return x.Sender + } + return nil +} + +func (x *Transaction_DeclareV2) GetMaxFee() *Felt252 { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *Transaction_DeclareV2) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_DeclareV2) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *Transaction_DeclareV2) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *Transaction_DeclareV2) GetCompiledClassHash() *Hash { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +// see https://external.integration.starknet.io/feeder_gateway/get_transaction?transactionHash=0x41d1f5206ef58a443e7d3d1ca073171ec25fa75313394318fc83a074a6631c3 +type Transaction_DeclareV3 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Signature *AccountSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + ClassHash *Hash `protobuf:"bytes,3,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + Nonce *Felt252 `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + CompiledClassHash *Hash `protobuf:"bytes,5,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` + ResourceBounds *ResourceBounds `protobuf:"bytes,6,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + Tip uint64 `protobuf:"varint,7,opt,name=tip,proto3" json:"tip,omitempty"` + PaymasterData []*Felt252 `protobuf:"bytes,8,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + AccountDeploymentData []*Felt252 `protobuf:"bytes,9,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` + NonceDataAvailabilityMode VolitionDomain `protobuf:"varint,10,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=VolitionDomain" json:"nonce_data_availability_mode,omitempty"` + FeeDataAvailabilityMode VolitionDomain `protobuf:"varint,11,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=VolitionDomain" json:"fee_data_availability_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_DeclareV3) Reset() { + *x = Transaction_DeclareV3{} + mi := &file_transaction_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_DeclareV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_DeclareV3) ProtoMessage() {} + +func (x *Transaction_DeclareV3) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_DeclareV3.ProtoReflect.Descriptor instead. +func (*Transaction_DeclareV3) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 3} +} + +func (x *Transaction_DeclareV3) GetSender() *Address { + if x != nil { + return x.Sender + } + return nil +} + +func (x *Transaction_DeclareV3) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_DeclareV3) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *Transaction_DeclareV3) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *Transaction_DeclareV3) GetCompiledClassHash() *Hash { + if x != nil { + return x.CompiledClassHash + } + return nil +} + +func (x *Transaction_DeclareV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *Transaction_DeclareV3) GetTip() uint64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *Transaction_DeclareV3) GetPaymasterData() []*Felt252 { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *Transaction_DeclareV3) GetAccountDeploymentData() []*Felt252 { + if x != nil { + return x.AccountDeploymentData + } + return nil +} + +func (x *Transaction_DeclareV3) GetNonceDataAvailabilityMode() VolitionDomain { + if x != nil { + return x.NonceDataAvailabilityMode + } + return VolitionDomain_L1 +} + +func (x *Transaction_DeclareV3) GetFeeDataAvailabilityMode() VolitionDomain { + if x != nil { + return x.FeeDataAvailabilityMode + } + return VolitionDomain_L1 +} + +type Transaction_Deploy struct { + state protoimpl.MessageState `protogen:"open.v1"` + ClassHash *Hash `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + AddressSalt *Felt252 `protobuf:"bytes,2,opt,name=address_salt,json=addressSalt,proto3" json:"address_salt,omitempty"` + Calldata []*Felt252 `protobuf:"bytes,3,rep,name=calldata,proto3" json:"calldata,omitempty"` + Version uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_Deploy) Reset() { + *x = Transaction_Deploy{} + mi := &file_transaction_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_Deploy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_Deploy) ProtoMessage() {} + +func (x *Transaction_Deploy) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_Deploy.ProtoReflect.Descriptor instead. +func (*Transaction_Deploy) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 4} +} + +func (x *Transaction_Deploy) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *Transaction_Deploy) GetAddressSalt() *Felt252 { + if x != nil { + return x.AddressSalt + } + return nil +} + +func (x *Transaction_Deploy) GetCalldata() []*Felt252 { + if x != nil { + return x.Calldata + } + return nil +} + +func (x *Transaction_Deploy) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +type Transaction_DeployAccountV1 struct { + state protoimpl.MessageState `protogen:"open.v1"` + MaxFee *Felt252 `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + Signature *AccountSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + ClassHash *Hash `protobuf:"bytes,3,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + Nonce *Felt252 `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + AddressSalt *Felt252 `protobuf:"bytes,5,opt,name=address_salt,json=addressSalt,proto3" json:"address_salt,omitempty"` + Calldata []*Felt252 `protobuf:"bytes,6,rep,name=calldata,proto3" json:"calldata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_DeployAccountV1) Reset() { + *x = Transaction_DeployAccountV1{} + mi := &file_transaction_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_DeployAccountV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_DeployAccountV1) ProtoMessage() {} + +func (x *Transaction_DeployAccountV1) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_DeployAccountV1.ProtoReflect.Descriptor instead. +func (*Transaction_DeployAccountV1) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 5} +} + +func (x *Transaction_DeployAccountV1) GetMaxFee() *Felt252 { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *Transaction_DeployAccountV1) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_DeployAccountV1) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *Transaction_DeployAccountV1) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *Transaction_DeployAccountV1) GetAddressSalt() *Felt252 { + if x != nil { + return x.AddressSalt + } + return nil +} + +func (x *Transaction_DeployAccountV1) GetCalldata() []*Felt252 { + if x != nil { + return x.Calldata + } + return nil +} + +// see https://external.integration.starknet.io/feeder_gateway/get_transaction?transactionHash=0x29fd7881f14380842414cdfdd8d6c0b1f2174f8916edcfeb1ede1eb26ac3ef0 +type Transaction_DeployAccountV3 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Signature *AccountSignature `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + ClassHash *Hash `protobuf:"bytes,2,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` + Nonce *Felt252 `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + AddressSalt *Felt252 `protobuf:"bytes,4,opt,name=address_salt,json=addressSalt,proto3" json:"address_salt,omitempty"` + Calldata []*Felt252 `protobuf:"bytes,5,rep,name=calldata,proto3" json:"calldata,omitempty"` + ResourceBounds *ResourceBounds `protobuf:"bytes,6,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + Tip uint64 `protobuf:"varint,7,opt,name=tip,proto3" json:"tip,omitempty"` + PaymasterData []*Felt252 `protobuf:"bytes,8,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + NonceDataAvailabilityMode VolitionDomain `protobuf:"varint,9,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=VolitionDomain" json:"nonce_data_availability_mode,omitempty"` + FeeDataAvailabilityMode VolitionDomain `protobuf:"varint,10,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=VolitionDomain" json:"fee_data_availability_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_DeployAccountV3) Reset() { + *x = Transaction_DeployAccountV3{} + mi := &file_transaction_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_DeployAccountV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_DeployAccountV3) ProtoMessage() {} + +func (x *Transaction_DeployAccountV3) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_DeployAccountV3.ProtoReflect.Descriptor instead. +func (*Transaction_DeployAccountV3) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 6} +} + +func (x *Transaction_DeployAccountV3) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_DeployAccountV3) GetClassHash() *Hash { + if x != nil { + return x.ClassHash + } + return nil +} + +func (x *Transaction_DeployAccountV3) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *Transaction_DeployAccountV3) GetAddressSalt() *Felt252 { + if x != nil { + return x.AddressSalt + } + return nil +} + +func (x *Transaction_DeployAccountV3) GetCalldata() []*Felt252 { + if x != nil { + return x.Calldata + } + return nil +} + +func (x *Transaction_DeployAccountV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *Transaction_DeployAccountV3) GetTip() uint64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *Transaction_DeployAccountV3) GetPaymasterData() []*Felt252 { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *Transaction_DeployAccountV3) GetNonceDataAvailabilityMode() VolitionDomain { + if x != nil { + return x.NonceDataAvailabilityMode + } + return VolitionDomain_L1 +} + +func (x *Transaction_DeployAccountV3) GetFeeDataAvailabilityMode() VolitionDomain { + if x != nil { + return x.FeeDataAvailabilityMode + } + return VolitionDomain_L1 +} + +type Transaction_InvokeV0 struct { + state protoimpl.MessageState `protogen:"open.v1"` + MaxFee *Felt252 `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + Signature *AccountSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Address *Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + EntryPointSelector *Felt252 `protobuf:"bytes,4,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` + Calldata []*Felt252 `protobuf:"bytes,5,rep,name=calldata,proto3" json:"calldata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_InvokeV0) Reset() { + *x = Transaction_InvokeV0{} + mi := &file_transaction_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_InvokeV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_InvokeV0) ProtoMessage() {} + +func (x *Transaction_InvokeV0) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_InvokeV0.ProtoReflect.Descriptor instead. +func (*Transaction_InvokeV0) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 7} +} + +func (x *Transaction_InvokeV0) GetMaxFee() *Felt252 { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *Transaction_InvokeV0) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_InvokeV0) GetAddress() *Address { + if x != nil { + return x.Address + } + return nil +} + +func (x *Transaction_InvokeV0) GetEntryPointSelector() *Felt252 { + if x != nil { + return x.EntryPointSelector + } + return nil +} + +func (x *Transaction_InvokeV0) GetCalldata() []*Felt252 { + if x != nil { + return x.Calldata + } + return nil +} + +type Transaction_InvokeV1 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + MaxFee *Felt252 `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` + Signature *AccountSignature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + Calldata []*Felt252 `protobuf:"bytes,4,rep,name=calldata,proto3" json:"calldata,omitempty"` + Nonce *Felt252 `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_InvokeV1) Reset() { + *x = Transaction_InvokeV1{} + mi := &file_transaction_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_InvokeV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_InvokeV1) ProtoMessage() {} + +func (x *Transaction_InvokeV1) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_InvokeV1.ProtoReflect.Descriptor instead. +func (*Transaction_InvokeV1) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 8} +} + +func (x *Transaction_InvokeV1) GetSender() *Address { + if x != nil { + return x.Sender + } + return nil +} + +func (x *Transaction_InvokeV1) GetMaxFee() *Felt252 { + if x != nil { + return x.MaxFee + } + return nil +} + +func (x *Transaction_InvokeV1) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_InvokeV1) GetCalldata() []*Felt252 { + if x != nil { + return x.Calldata + } + return nil +} + +func (x *Transaction_InvokeV1) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +// see https://external.integration.starknet.io/feeder_gateway/get_transaction?transactionHash=0x41906f1c314cca5f43170ea75d3b1904196a10101190d2b12a41cc61cfd17c +type Transaction_InvokeV3 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Signature *AccountSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + Calldata []*Felt252 `protobuf:"bytes,3,rep,name=calldata,proto3" json:"calldata,omitempty"` + ResourceBounds *ResourceBounds `protobuf:"bytes,4,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` + Tip uint64 `protobuf:"varint,5,opt,name=tip,proto3" json:"tip,omitempty"` + PaymasterData []*Felt252 `protobuf:"bytes,6,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + AccountDeploymentData []*Felt252 `protobuf:"bytes,7,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` + NonceDataAvailabilityMode VolitionDomain `protobuf:"varint,8,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=VolitionDomain" json:"nonce_data_availability_mode,omitempty"` + FeeDataAvailabilityMode VolitionDomain `protobuf:"varint,9,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=VolitionDomain" json:"fee_data_availability_mode,omitempty"` + Nonce *Felt252 `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_InvokeV3) Reset() { + *x = Transaction_InvokeV3{} + mi := &file_transaction_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_InvokeV3) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_InvokeV3) ProtoMessage() {} + +func (x *Transaction_InvokeV3) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_InvokeV3.ProtoReflect.Descriptor instead. +func (*Transaction_InvokeV3) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 9} +} + +func (x *Transaction_InvokeV3) GetSender() *Address { + if x != nil { + return x.Sender + } + return nil +} + +func (x *Transaction_InvokeV3) GetSignature() *AccountSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Transaction_InvokeV3) GetCalldata() []*Felt252 { + if x != nil { + return x.Calldata + } + return nil +} + +func (x *Transaction_InvokeV3) GetResourceBounds() *ResourceBounds { + if x != nil { + return x.ResourceBounds + } + return nil +} + +func (x *Transaction_InvokeV3) GetTip() uint64 { + if x != nil { + return x.Tip + } + return 0 +} + +func (x *Transaction_InvokeV3) GetPaymasterData() []*Felt252 { + if x != nil { + return x.PaymasterData + } + return nil +} + +func (x *Transaction_InvokeV3) GetAccountDeploymentData() []*Felt252 { + if x != nil { + return x.AccountDeploymentData + } + return nil +} + +func (x *Transaction_InvokeV3) GetNonceDataAvailabilityMode() VolitionDomain { + if x != nil { + return x.NonceDataAvailabilityMode + } + return VolitionDomain_L1 +} + +func (x *Transaction_InvokeV3) GetFeeDataAvailabilityMode() VolitionDomain { + if x != nil { + return x.FeeDataAvailabilityMode + } + return VolitionDomain_L1 +} + +func (x *Transaction_InvokeV3) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +type Transaction_L1HandlerV0 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Nonce *Felt252 `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + Address *Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + EntryPointSelector *Felt252 `protobuf:"bytes,3,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` + Calldata []*Felt252 `protobuf:"bytes,4,rep,name=calldata,proto3" json:"calldata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_L1HandlerV0) Reset() { + *x = Transaction_L1HandlerV0{} + mi := &file_transaction_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_L1HandlerV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_L1HandlerV0) ProtoMessage() {} + +func (x *Transaction_L1HandlerV0) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_L1HandlerV0.ProtoReflect.Descriptor instead. +func (*Transaction_L1HandlerV0) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3, 10} +} + +func (x *Transaction_L1HandlerV0) GetNonce() *Felt252 { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *Transaction_L1HandlerV0) GetAddress() *Address { + if x != nil { + return x.Address + } + return nil +} + +func (x *Transaction_L1HandlerV0) GetEntryPointSelector() *Felt252 { + if x != nil { + return x.EntryPointSelector + } + return nil +} + +func (x *Transaction_L1HandlerV0) GetCalldata() []*Felt252 { + if x != nil { + return x.Calldata + } + return nil +} + +var File_transaction_proto protoreflect.FileDescriptor + +var file_transaction_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x70, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, + 0x52, 0x09, 0x6d, 0x61, 0x78, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x12, 0x6d, + 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, + 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, + 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, + 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, 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, + 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, 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, +} + +var ( + file_transaction_proto_rawDescOnce sync.Once + file_transaction_proto_rawDescData = file_transaction_proto_rawDesc +) + +func file_transaction_proto_rawDescGZIP() []byte { + file_transaction_proto_rawDescOnce.Do(func() { + file_transaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_transaction_proto_rawDescData) + }) + return file_transaction_proto_rawDescData +} + +var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_transaction_proto_goTypes = []any{ + (*ResourceLimits)(nil), // 0: ResourceLimits + (*ResourceBounds)(nil), // 1: ResourceBounds + (*AccountSignature)(nil), // 2: AccountSignature + (*Transaction)(nil), // 3: Transaction + (*TransactionWithReceipt)(nil), // 4: TransactionWithReceipt + (*TransactionsRequest)(nil), // 5: TransactionsRequest + (*TransactionsResponse)(nil), // 6: TransactionsResponse + (*Transactions)(nil), // 7: Transactions + (*Transaction_DeclareV0)(nil), // 8: Transaction.DeclareV0 + (*Transaction_DeclareV1)(nil), // 9: Transaction.DeclareV1 + (*Transaction_DeclareV2)(nil), // 10: Transaction.DeclareV2 + (*Transaction_DeclareV3)(nil), // 11: Transaction.DeclareV3 + (*Transaction_Deploy)(nil), // 12: Transaction.Deploy + (*Transaction_DeployAccountV1)(nil), // 13: Transaction.DeployAccountV1 + (*Transaction_DeployAccountV3)(nil), // 14: Transaction.DeployAccountV3 + (*Transaction_InvokeV0)(nil), // 15: Transaction.InvokeV0 + (*Transaction_InvokeV1)(nil), // 16: Transaction.InvokeV1 + (*Transaction_InvokeV3)(nil), // 17: Transaction.InvokeV3 + (*Transaction_L1HandlerV0)(nil), // 18: Transaction.L1HandlerV0 + (*Felt252)(nil), // 19: Felt252 + (*Hash)(nil), // 20: Hash + (*Receipt)(nil), // 21: Receipt + (*Iteration)(nil), // 22: Iteration + (*Fin)(nil), // 23: Fin + (*Address)(nil), // 24: Address + (VolitionDomain)(0), // 25: VolitionDomain +} +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 +} + +func init() { file_transaction_proto_init() } +func file_transaction_proto_init() { + if File_transaction_proto != nil { + return + } + file_common_proto_init() + file_receipt_proto_init() + file_transaction_proto_msgTypes[3].OneofWrappers = []any{ + (*Transaction_DeclareV0_)(nil), + (*Transaction_DeclareV1_)(nil), + (*Transaction_DeclareV2_)(nil), + (*Transaction_DeclareV3_)(nil), + (*Transaction_Deploy_)(nil), + (*Transaction_DeployAccountV1_)(nil), + (*Transaction_DeployAccountV3_)(nil), + (*Transaction_InvokeV0_)(nil), + (*Transaction_InvokeV1_)(nil), + (*Transaction_InvokeV3_)(nil), + (*Transaction_L1Handler)(nil), + } + file_transaction_proto_msgTypes[6].OneofWrappers = []any{ + (*TransactionsResponse_TransactionWithReceipt)(nil), + (*TransactionsResponse_Fin)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_transaction_proto_rawDesc, + NumEnums: 0, + NumMessages: 19, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_transaction_proto_goTypes, + DependencyIndexes: file_transaction_proto_depIdxs, + MessageInfos: file_transaction_proto_msgTypes, + }.Build() + File_transaction_proto = out.File + file_transaction_proto_rawDesc = nil + file_transaction_proto_goTypes = nil + file_transaction_proto_depIdxs = nil +} diff --git a/p2p/gossip_tracer.go b/p2p/gossip_tracer.go index da07eabfc2..b88176f6cf 100644 --- a/p2p/gossip_tracer.go +++ b/p2p/gossip_tracer.go @@ -3,7 +3,7 @@ package p2p import ( "strings" - "github.com/libp2p/go-libp2p-pubsub" + pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/peerstore" diff --git a/p2p/p2p.go b/p2p/p2p.go index 70ed7bc10c..ddb1ed955d 100644 --- a/p2p/p2p.go +++ b/p2p/p2p.go @@ -12,7 +12,8 @@ import ( "github.com/Masterminds/semver/v3" "github.com/NethermindEth/juno/blockchain" "github.com/NethermindEth/juno/db" - "github.com/NethermindEth/juno/p2p/starknet" + p2pPeers "github.com/NethermindEth/juno/p2p/peers" + p2pSync "github.com/NethermindEth/juno/p2p/sync" junoSync "github.com/NethermindEth/juno/sync" "github.com/NethermindEth/juno/utils" "github.com/libp2p/go-libp2p" @@ -38,13 +39,13 @@ type Service struct { host host.Host network *utils.Network - handler *starknet.Handler + handler *p2pPeers.Handler log utils.SimpleLogger dht *dht.IpfsDHT pubsub *pubsub.PubSub - synchroniser *syncService + synchroniser *p2pSync.Service gossipTracer *gossipTracer feederNode bool @@ -145,7 +146,7 @@ func NewWithHost(p2phost host.Host, peers string, feederNode bool, bc *blockchai // todo: reconsider initialising synchroniser here because if node is a feedernode we shouldn't not create an instance of it. - synchroniser := newSyncService(bc, p2phost, snNetwork, log) + synchroniser := p2pSync.New(bc, p2phost, snNetwork, log) s := &Service{ synchroniser: synchroniser, log: log, @@ -153,7 +154,7 @@ func NewWithHost(p2phost host.Host, peers string, feederNode bool, bc *blockchai network: snNetwork, dht: p2pdht, feederNode: feederNode, - handler: starknet.NewHandler(bc, log), + handler: p2pPeers.NewHandler(bc, log), database: database, } return s, nil @@ -161,7 +162,7 @@ func NewWithHost(p2phost host.Host, peers string, feederNode bool, bc *blockchai func makeDHT(p2phost host.Host, addrInfos []peer.AddrInfo) (*dht.IpfsDHT, error) { return dht.New(context.Background(), p2phost, - dht.ProtocolPrefix(starknet.Prefix), + dht.ProtocolPrefix(p2pSync.Prefix), dht.BootstrapPeers(addrInfos...), dht.RoutingTableRefreshPeriod(routingTableRefreshPeriod), dht.Mode(dht.ModeServer), @@ -235,7 +236,7 @@ func (s *Service) Run(ctx context.Context) error { s.setProtocolHandlers() if !s.feederNode { - s.synchroniser.start(ctx) + s.synchroniser.Run(ctx) } <-ctx.Done() @@ -249,11 +250,11 @@ func (s *Service) Run(ctx context.Context) error { } func (s *Service) setProtocolHandlers() { - s.SetProtocolHandler(starknet.HeadersPID(), s.handler.HeadersHandler) - s.SetProtocolHandler(starknet.EventsPID(), s.handler.EventsHandler) - s.SetProtocolHandler(starknet.TransactionsPID(), s.handler.TransactionsHandler) - s.SetProtocolHandler(starknet.ClassesPID(), s.handler.ClassesHandler) - s.SetProtocolHandler(starknet.StateDiffPID(), s.handler.StateDiffHandler) + s.SetProtocolHandler(p2pSync.HeadersPID(), s.handler.HeadersHandler) + s.SetProtocolHandler(p2pSync.EventsPID(), s.handler.EventsHandler) + s.SetProtocolHandler(p2pSync.TransactionsPID(), s.handler.TransactionsHandler) + s.SetProtocolHandler(p2pSync.ClassesPID(), s.handler.ClassesHandler) + s.SetProtocolHandler(p2pSync.StateDiffPID(), s.handler.StateDiffHandler) } func (s *Service) callAndLogErr(f func() error, msg string) { diff --git a/p2p/starknet/handlers.go b/p2p/peers/handlers.go similarity index 80% rename from p2p/starknet/handlers.go rename to p2p/peers/handlers.go index 33fb1fbacd..5f08276bad 100644 --- a/p2p/starknet/handlers.go +++ b/p2p/peers/handlers.go @@ -1,5 +1,4 @@ -//go:generate protoc --go_out=./ --proto_path=./ --go_opt=Mp2p/proto/transaction.proto=./spec --go_opt=Mp2p/proto/state.proto=./spec --go_opt=Mp2p/proto/snapshot.proto=./spec --go_opt=Mp2p/proto/receipt.proto=./spec --go_opt=Mp2p/proto/mempool.proto=./spec --go_opt=Mp2p/proto/event.proto=./spec --go_opt=Mp2p/proto/block.proto=./spec --go_opt=Mp2p/proto/common.proto=./spec p2p/proto/transaction.proto p2p/proto/state.proto p2p/proto/snapshot.proto p2p/proto/common.proto p2p/proto/block.proto p2p/proto/event.proto p2p/proto/receipt.proto -package starknet +package peers import ( "bytes" @@ -15,7 +14,7 @@ import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" "github.com/NethermindEth/juno/db" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" "github.com/libp2p/go-libp2p/core/network" "google.golang.org/protobuf/encoding/protodelim" @@ -125,9 +124,9 @@ func (h *Handler) StateDiffHandler(stream network.Stream) { streamHandler(h.ctx, &h.wg, stream, h.onStateDiffRequest, h.log) } -func (h *Handler) onHeadersRequest(req *spec.BlockHeadersRequest) (iter.Seq[proto.Message], error) { - finMsg := &spec.BlockHeadersResponse{ - HeaderMessage: &spec.BlockHeadersResponse_Fin{}, +func (h *Handler) onHeadersRequest(req *gen.BlockHeadersRequest) (iter.Seq[proto.Message], error) { + finMsg := &gen.BlockHeadersResponse{ + HeaderMessage: &gen.BlockHeadersResponse_Fin{}, } return h.processIterationRequest(req.Iteration, finMsg, func(it blockDataAccessor) (proto.Message, error) { @@ -148,8 +147,8 @@ func (h *Handler) onHeadersRequest(req *spec.BlockHeadersRequest) (iter.Seq[prot return nil, err } - return &spec.BlockHeadersResponse{ - HeaderMessage: &spec.BlockHeadersResponse_Header{ + return &gen.BlockHeadersResponse{ + HeaderMessage: &gen.BlockHeadersResponse_Header{ Header: core2p2p.AdaptHeader(header, commitments, stateUpdate.StateDiff.Hash(), stateUpdate.StateDiff.Length()), }, @@ -157,9 +156,9 @@ func (h *Handler) onHeadersRequest(req *spec.BlockHeadersRequest) (iter.Seq[prot }) } -func (h *Handler) onEventsRequest(req *spec.EventsRequest) (iter.Seq[proto.Message], error) { - finMsg := &spec.EventsResponse{ - EventMessage: &spec.EventsResponse_Fin{}, +func (h *Handler) onEventsRequest(req *gen.EventsRequest) (iter.Seq[proto.Message], error) { + finMsg := &gen.EventsResponse{ + EventMessage: &gen.EventsResponse_Fin{}, } return h.processIterationRequestMulti(req.Iteration, finMsg, func(it blockDataAccessor) ([]proto.Message, error) { block, err := it.Block() @@ -170,8 +169,8 @@ func (h *Handler) onEventsRequest(req *spec.EventsRequest) (iter.Seq[proto.Messa responses := make([]proto.Message, 0, len(block.Receipts)) for _, receipt := range block.Receipts { for _, event := range receipt.Events { - responses = append(responses, &spec.EventsResponse{ - EventMessage: &spec.EventsResponse_Event{ + responses = append(responses, &gen.EventsResponse{ + EventMessage: &gen.EventsResponse_Event{ Event: core2p2p.AdaptEvent(event, receipt.TransactionHash), }, }) @@ -182,9 +181,9 @@ func (h *Handler) onEventsRequest(req *spec.EventsRequest) (iter.Seq[proto.Messa }) } -func (h *Handler) onTransactionsRequest(req *spec.TransactionsRequest) (iter.Seq[proto.Message], error) { - finMsg := &spec.TransactionsResponse{ - TransactionMessage: &spec.TransactionsResponse_Fin{}, +func (h *Handler) onTransactionsRequest(req *gen.TransactionsRequest) (iter.Seq[proto.Message], error) { + finMsg := &gen.TransactionsResponse{ + TransactionMessage: &gen.TransactionsResponse_Fin{}, } return h.processIterationRequestMulti(req.Iteration, finMsg, func(it blockDataAccessor) ([]proto.Message, error) { block, err := it.Block() @@ -196,9 +195,9 @@ func (h *Handler) onTransactionsRequest(req *spec.TransactionsRequest) (iter.Seq for i, tx := range block.Transactions { receipt := block.Receipts[i] - responses[i] = &spec.TransactionsResponse{ - TransactionMessage: &spec.TransactionsResponse_TransactionWithReceipt{ - TransactionWithReceipt: &spec.TransactionWithReceipt{ + responses[i] = &gen.TransactionsResponse{ + TransactionMessage: &gen.TransactionsResponse_TransactionWithReceipt{ + TransactionWithReceipt: &gen.TransactionWithReceipt{ Transaction: core2p2p.AdaptTransaction(tx), Receipt: core2p2p.AdaptReceipt(receipt, tx), }, @@ -211,9 +210,9 @@ func (h *Handler) onTransactionsRequest(req *spec.TransactionsRequest) (iter.Seq } //nolint:gocyclo -func (h *Handler) onStateDiffRequest(req *spec.StateDiffsRequest) (iter.Seq[proto.Message], error) { - finMsg := &spec.StateDiffsResponse{ - StateDiffMessage: &spec.StateDiffsResponse_Fin{}, +func (h *Handler) onStateDiffRequest(req *gen.StateDiffsRequest) (iter.Seq[proto.Message], error) { + finMsg := &gen.StateDiffsResponse{ + StateDiffMessage: &gen.StateDiffsResponse_Fin{}, } return h.processIterationRequestMulti(req.Iteration, finMsg, func(it blockDataAccessor) ([]proto.Message, error) { block, err := it.Block() @@ -293,17 +292,17 @@ func (h *Handler) onStateDiffRequest(req *spec.StateDiffsRequest) (iter.Seq[prot var responses []proto.Message for _, c := range modifiedContracts { - responses = append(responses, &spec.StateDiffsResponse{ - StateDiffMessage: &spec.StateDiffsResponse_ContractDiff{ + responses = append(responses, &gen.StateDiffsResponse{ + StateDiffMessage: &gen.StateDiffsResponse_ContractDiff{ ContractDiff: core2p2p.AdaptContractDiff(c.address, c.nonce, c.classHash, c.storageDiffs), }, }) } for _, classHash := range diff.DeclaredV0Classes { - responses = append(responses, &spec.StateDiffsResponse{ - StateDiffMessage: &spec.StateDiffsResponse_DeclaredClass{ - DeclaredClass: &spec.DeclaredClass{ + responses = append(responses, &gen.StateDiffsResponse{ + StateDiffMessage: &gen.StateDiffsResponse_DeclaredClass{ + DeclaredClass: &gen.DeclaredClass{ ClassHash: core2p2p.AdaptHash(classHash), CompiledClassHash: nil, // for cairo0 it's nil }, @@ -311,9 +310,9 @@ func (h *Handler) onStateDiffRequest(req *spec.StateDiffsRequest) (iter.Seq[prot }) } for classHash, compiledHash := range diff.DeclaredV1Classes { - responses = append(responses, &spec.StateDiffsResponse{ - StateDiffMessage: &spec.StateDiffsResponse_DeclaredClass{ - DeclaredClass: &spec.DeclaredClass{ + responses = append(responses, &gen.StateDiffsResponse{ + StateDiffMessage: &gen.StateDiffsResponse_DeclaredClass{ + DeclaredClass: &gen.DeclaredClass{ ClassHash: core2p2p.AdaptHash(&classHash), CompiledClassHash: core2p2p.AdaptHash(compiledHash), }, @@ -325,9 +324,9 @@ func (h *Handler) onStateDiffRequest(req *spec.StateDiffsRequest) (iter.Seq[prot }) } -func (h *Handler) onClassesRequest(req *spec.ClassesRequest) (iter.Seq[proto.Message], error) { - finMsg := &spec.ClassesResponse{ - ClassMessage: &spec.ClassesResponse_Fin{}, +func (h *Handler) onClassesRequest(req *gen.ClassesRequest) (iter.Seq[proto.Message], error) { + finMsg := &gen.ClassesResponse{ + ClassMessage: &gen.ClassesResponse_Fin{}, } return h.processIterationRequestMulti(req.Iteration, finMsg, func(it blockDataAccessor) ([]proto.Message, error) { block, err := it.Block() @@ -360,8 +359,8 @@ func (h *Handler) onClassesRequest(req *spec.ClassesRequest) (iter.Seq[proto.Mes return nil, err } - responses = append(responses, &spec.ClassesResponse{ - ClassMessage: &spec.ClassesResponse_Class{ + responses = append(responses, &gen.ClassesResponse{ + ClassMessage: &gen.ClassesResponse_Class{ Class: core2p2p.AdaptClass(cls.Class), }, }) @@ -372,8 +371,8 @@ func (h *Handler) onClassesRequest(req *spec.ClassesRequest) (iter.Seq[proto.Mes return nil, err } - responses = append(responses, &spec.ClassesResponse{ - ClassMessage: &spec.ClassesResponse_Class{ + responses = append(responses, &gen.ClassesResponse{ + ClassMessage: &gen.ClassesResponse_Class{ Class: core2p2p.AdaptClass(cls.Class), }, }) @@ -397,7 +396,7 @@ type iterationProcessor = func(it blockDataAccessor) (proto.Message, error) // processIterationRequest is helper function that simplifies data processing for provided spec.Iteration object // caller usually passes iteration object from received request, finMsg as final message to a peer // and iterationProcessor function that will generate response for each iteration -func (h *Handler) processIterationRequest(iteration *spec.Iteration, finMsg proto.Message, +func (h *Handler) processIterationRequest(iteration *gen.Iteration, finMsg proto.Message, getMsg iterationProcessor, ) (iter.Seq[proto.Message], error) { it, err := h.newIterator(iteration) @@ -436,7 +435,7 @@ func (h *Handler) processIterationRequest(iteration *spec.Iteration, finMsg prot type iterationProcessorMulti = func(it blockDataAccessor) ([]proto.Message, error) -func (h *Handler) processIterationRequestMulti(iteration *spec.Iteration, finMsg proto.Message, +func (h *Handler) processIterationRequestMulti(iteration *gen.Iteration, finMsg proto.Message, getMsg iterationProcessorMulti, ) (iter.Seq[proto.Message], error) { it, err := h.newIterator(iteration) @@ -475,13 +474,13 @@ func (h *Handler) processIterationRequestMulti(iteration *spec.Iteration, finMsg }, nil } -func (h *Handler) newIterator(it *spec.Iteration) (*iterator, error) { - forward := it.Direction == spec.Iteration_Forward +func (h *Handler) newIterator(it *gen.Iteration) (*iterator, error) { + forward := it.Direction == gen.Iteration_Forward // todo restrict limit max value ? switch v := it.Start.(type) { - case *spec.Iteration_BlockNumber: + case *gen.Iteration_BlockNumber: return newIteratorByNumber(h.bcReader, v.BlockNumber, it.Limit, it.Step, forward) - case *spec.Iteration_Header: + case *gen.Iteration_Header: return newIteratorByHash(h.bcReader, p2p2core.AdaptHash(v.Header), it.Limit, it.Step, forward) default: return nil, fmt.Errorf("unsupported iteration start type %T", v) diff --git a/p2p/starknet/iterator.go b/p2p/peers/iterator.go similarity index 99% rename from p2p/starknet/iterator.go rename to p2p/peers/iterator.go index 7e0d511364..6e8295a420 100644 --- a/p2p/starknet/iterator.go +++ b/p2p/peers/iterator.go @@ -1,4 +1,4 @@ -package starknet +package peers import ( "errors" diff --git a/p2p/starknet/iterator_test.go b/p2p/peers/iterator_test.go similarity index 99% rename from p2p/starknet/iterator_test.go rename to p2p/peers/iterator_test.go index f3a4d6e144..3eb0fe4c1d 100644 --- a/p2p/starknet/iterator_test.go +++ b/p2p/peers/iterator_test.go @@ -1,4 +1,4 @@ -package starknet +package peers import ( "testing" diff --git a/p2p/starknet/p2p/proto/class.proto b/p2p/spec/class.proto similarity index 92% rename from p2p/starknet/p2p/proto/class.proto rename to p2p/spec/class.proto index 2cd3ed5265..3fe94576a2 100644 --- a/p2p/starknet/p2p/proto/class.proto +++ b/p2p/spec/class.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -import "p2p/proto/common.proto"; +import "common.proto"; -option go_package = "github.com/NethermindEth/juno/p2p/starknet/spec"; +option go_package = "github.com/NethermindEth/juno/p2p/gen"; message EntryPoint { @@ -55,4 +55,4 @@ message ClassesResponse { Class class = 1; Fin fin = 2; // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its classes. } -} \ No newline at end of file +} diff --git a/p2p/starknet/p2p/proto/common.proto b/p2p/spec/common.proto similarity index 94% rename from p2p/starknet/p2p/proto/common.proto rename to p2p/spec/common.proto index 3ee397e9b9..c7ff1a659a 100644 --- a/p2p/starknet/p2p/proto/common.proto +++ b/p2p/spec/common.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/NethermindEth/juno/p2p/starknet/spec"; +option go_package = "github.com/NethermindEth/juno/p2p/gen"; message Felt252 { bytes elements = 1; @@ -82,4 +82,4 @@ message Iteration { // mark the end of a stream of messages // TBD: may not be required if we open a stream per request. -message Fin {} \ No newline at end of file +message Fin {} diff --git a/p2p/starknet/p2p/proto/event.proto b/p2p/spec/event.proto similarity index 83% rename from p2p/starknet/p2p/proto/event.proto rename to p2p/spec/event.proto index 832008064a..cd22a8ad9b 100644 --- a/p2p/starknet/p2p/proto/event.proto +++ b/p2p/spec/event.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -import "p2p/proto/common.proto"; +import "common.proto"; -option go_package = "github.com/NethermindEth/juno/p2p/starknet/spec"; +option go_package = "github.com/NethermindEth/juno/p2p/gen"; message Event { Hash transaction_hash = 1; @@ -20,4 +20,4 @@ message EventsResponse { Event event = 1; Fin fin = 2; // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its events. } -} \ No newline at end of file +} diff --git a/p2p/starknet/p2p/proto/header.proto b/p2p/spec/header.proto similarity index 96% rename from p2p/starknet/p2p/proto/header.proto rename to p2p/spec/header.proto index 2001e15e54..c345b1446a 100644 --- a/p2p/starknet/p2p/proto/header.proto +++ b/p2p/spec/header.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -import "p2p/proto/common.proto"; +import "common.proto"; -option go_package = "github.com/NethermindEth/juno/p2p/starknet/spec"; +option go_package = "github.com/NethermindEth/juno/p2p/gen"; // Note: commitments may change to be for the previous blocks like comet/tendermint // hash of block header sent to L1 @@ -53,4 +53,4 @@ message BlockHeadersResponse { message BlockProof { repeated bytes proof = 1; -} \ No newline at end of file +} diff --git a/p2p/starknet/p2p/proto/notes.md b/p2p/spec/notes.md similarity index 100% rename from p2p/starknet/p2p/proto/notes.md rename to p2p/spec/notes.md diff --git a/p2p/starknet/p2p/proto/receipt.proto b/p2p/spec/receipt.proto similarity index 93% rename from p2p/starknet/p2p/proto/receipt.proto rename to p2p/spec/receipt.proto index 9526f9fec7..d9fd3d6dda 100644 --- a/p2p/starknet/p2p/proto/receipt.proto +++ b/p2p/spec/receipt.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -import "p2p/proto/common.proto"; +import "common.proto"; -option go_package = "github.com/NethermindEth/juno/p2p/starknet/spec"; +option go_package = "github.com/NethermindEth/juno/p2p/gen"; message MessageToL1 { Felt252 from_address = 2; @@ -81,4 +81,4 @@ message Receipt { Deploy deprecated_deploy = 4; DeployAccount deploy_account = 5; } -} \ No newline at end of file +} diff --git a/p2p/starknet/p2p/proto/state.proto b/p2p/spec/state.proto similarity index 92% rename from p2p/starknet/p2p/proto/state.proto rename to p2p/spec/state.proto index 79f33fcafe..897f6cbbce 100644 --- a/p2p/starknet/p2p/proto/state.proto +++ b/p2p/spec/state.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -import "p2p/proto/common.proto"; +import "common.proto"; -option go_package = "github.com/NethermindEth/juno/p2p/starknet/spec"; +option go_package = "github.com/NethermindEth/juno/p2p/gen"; // optimized for flat storage, not through a trie (not sharing key prefixes) message ContractStoredValue { @@ -34,4 +34,4 @@ message StateDiffsResponse { DeclaredClass declared_class = 2; Fin fin = 3; // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its state diff. } -} \ No newline at end of file +} diff --git a/p2p/starknet/p2p/proto/transaction.proto b/p2p/spec/transaction.proto similarity index 97% rename from p2p/starknet/p2p/proto/transaction.proto rename to p2p/spec/transaction.proto index 8803e918a4..8d35195e2e 100644 --- a/p2p/starknet/p2p/proto/transaction.proto +++ b/p2p/spec/transaction.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -import "p2p/proto/common.proto"; -import "p2p/proto/receipt.proto"; +import "common.proto"; +import "receipt.proto"; -option go_package = "github.com/NethermindEth/juno/p2p/starknet/spec"; +option go_package = "github.com/NethermindEth/juno/p2p/gen"; message ResourceLimits { Felt252 max_amount = 1; @@ -166,4 +166,4 @@ message TransactionsResponse { message Transactions { repeated Transaction transactions = 1; -} \ No newline at end of file +} diff --git a/p2p/starknet/spec/class.pb.go b/p2p/starknet/spec/class.pb.go deleted file mode 100644 index c0d591d4ca..0000000000 --- a/p2p/starknet/spec/class.pb.go +++ /dev/null @@ -1,830 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 -// source: p2p/proto/class.proto - -package spec - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type EntryPoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Selector *Felt252 `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` -} - -func (x *EntryPoint) Reset() { - *x = EntryPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_class_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EntryPoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EntryPoint) ProtoMessage() {} - -func (x *EntryPoint) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_class_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EntryPoint.ProtoReflect.Descriptor instead. -func (*EntryPoint) Descriptor() ([]byte, []int) { - return file_p2p_proto_class_proto_rawDescGZIP(), []int{0} -} - -func (x *EntryPoint) GetSelector() *Felt252 { - if x != nil { - return x.Selector - } - return nil -} - -func (x *EntryPoint) GetOffset() uint64 { - if x != nil { - return x.Offset - } - return 0 -} - -type Cairo0Class struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Abi string `protobuf:"bytes,1,opt,name=abi,proto3" json:"abi,omitempty"` - Externals []*EntryPoint `protobuf:"bytes,2,rep,name=externals,proto3" json:"externals,omitempty"` - L1Handlers []*EntryPoint `protobuf:"bytes,3,rep,name=l1_handlers,json=l1Handlers,proto3" json:"l1_handlers,omitempty"` - Constructors []*EntryPoint `protobuf:"bytes,4,rep,name=constructors,proto3" json:"constructors,omitempty"` - // Compressed in base64 representation. - Program string `protobuf:"bytes,5,opt,name=program,proto3" json:"program,omitempty"` -} - -func (x *Cairo0Class) Reset() { - *x = Cairo0Class{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_class_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cairo0Class) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cairo0Class) ProtoMessage() {} - -func (x *Cairo0Class) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_class_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cairo0Class.ProtoReflect.Descriptor instead. -func (*Cairo0Class) Descriptor() ([]byte, []int) { - return file_p2p_proto_class_proto_rawDescGZIP(), []int{1} -} - -func (x *Cairo0Class) GetAbi() string { - if x != nil { - return x.Abi - } - return "" -} - -func (x *Cairo0Class) GetExternals() []*EntryPoint { - if x != nil { - return x.Externals - } - return nil -} - -func (x *Cairo0Class) GetL1Handlers() []*EntryPoint { - if x != nil { - return x.L1Handlers - } - return nil -} - -func (x *Cairo0Class) GetConstructors() []*EntryPoint { - if x != nil { - return x.Constructors - } - return nil -} - -func (x *Cairo0Class) GetProgram() string { - if x != nil { - return x.Program - } - return "" -} - -type SierraEntryPoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` - Selector *Felt252 `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` -} - -func (x *SierraEntryPoint) Reset() { - *x = SierraEntryPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_class_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SierraEntryPoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SierraEntryPoint) ProtoMessage() {} - -func (x *SierraEntryPoint) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_class_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SierraEntryPoint.ProtoReflect.Descriptor instead. -func (*SierraEntryPoint) Descriptor() ([]byte, []int) { - return file_p2p_proto_class_proto_rawDescGZIP(), []int{2} -} - -func (x *SierraEntryPoint) GetIndex() uint64 { - if x != nil { - return x.Index - } - return 0 -} - -func (x *SierraEntryPoint) GetSelector() *Felt252 { - if x != nil { - return x.Selector - } - return nil -} - -type Cairo1EntryPoints struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Externals []*SierraEntryPoint `protobuf:"bytes,1,rep,name=externals,proto3" json:"externals,omitempty"` - L1Handlers []*SierraEntryPoint `protobuf:"bytes,2,rep,name=l1_handlers,json=l1Handlers,proto3" json:"l1_handlers,omitempty"` - Constructors []*SierraEntryPoint `protobuf:"bytes,3,rep,name=constructors,proto3" json:"constructors,omitempty"` -} - -func (x *Cairo1EntryPoints) Reset() { - *x = Cairo1EntryPoints{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_class_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cairo1EntryPoints) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cairo1EntryPoints) ProtoMessage() {} - -func (x *Cairo1EntryPoints) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_class_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cairo1EntryPoints.ProtoReflect.Descriptor instead. -func (*Cairo1EntryPoints) Descriptor() ([]byte, []int) { - return file_p2p_proto_class_proto_rawDescGZIP(), []int{3} -} - -func (x *Cairo1EntryPoints) GetExternals() []*SierraEntryPoint { - if x != nil { - return x.Externals - } - return nil -} - -func (x *Cairo1EntryPoints) GetL1Handlers() []*SierraEntryPoint { - if x != nil { - return x.L1Handlers - } - return nil -} - -func (x *Cairo1EntryPoints) GetConstructors() []*SierraEntryPoint { - if x != nil { - return x.Constructors - } - return nil -} - -type Cairo1Class struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Abi string `protobuf:"bytes,1,opt,name=abi,proto3" json:"abi,omitempty"` - EntryPoints *Cairo1EntryPoints `protobuf:"bytes,2,opt,name=entry_points,json=entryPoints,proto3" json:"entry_points,omitempty"` - Program []*Felt252 `protobuf:"bytes,3,rep,name=program,proto3" json:"program,omitempty"` - ContractClassVersion string `protobuf:"bytes,4,opt,name=contract_class_version,json=contractClassVersion,proto3" json:"contract_class_version,omitempty"` -} - -func (x *Cairo1Class) Reset() { - *x = Cairo1Class{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_class_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Cairo1Class) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Cairo1Class) ProtoMessage() {} - -func (x *Cairo1Class) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_class_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Cairo1Class.ProtoReflect.Descriptor instead. -func (*Cairo1Class) Descriptor() ([]byte, []int) { - return file_p2p_proto_class_proto_rawDescGZIP(), []int{4} -} - -func (x *Cairo1Class) GetAbi() string { - if x != nil { - return x.Abi - } - return "" -} - -func (x *Cairo1Class) GetEntryPoints() *Cairo1EntryPoints { - if x != nil { - return x.EntryPoints - } - return nil -} - -func (x *Cairo1Class) GetProgram() []*Felt252 { - if x != nil { - return x.Program - } - return nil -} - -func (x *Cairo1Class) GetContractClassVersion() string { - if x != nil { - return x.ContractClassVersion - } - return "" -} - -type Class struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Class: - // - // *Class_Cairo0 - // *Class_Cairo1 - Class isClass_Class `protobuf_oneof:"class"` - Domain uint32 `protobuf:"varint,3,opt,name=domain,proto3" json:"domain,omitempty"` - ClassHash *Hash `protobuf:"bytes,4,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` -} - -func (x *Class) Reset() { - *x = Class{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_class_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Class) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Class) ProtoMessage() {} - -func (x *Class) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_class_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Class.ProtoReflect.Descriptor instead. -func (*Class) Descriptor() ([]byte, []int) { - return file_p2p_proto_class_proto_rawDescGZIP(), []int{5} -} - -func (m *Class) GetClass() isClass_Class { - if m != nil { - return m.Class - } - return nil -} - -func (x *Class) GetCairo0() *Cairo0Class { - if x, ok := x.GetClass().(*Class_Cairo0); ok { - return x.Cairo0 - } - return nil -} - -func (x *Class) GetCairo1() *Cairo1Class { - if x, ok := x.GetClass().(*Class_Cairo1); ok { - return x.Cairo1 - } - return nil -} - -func (x *Class) GetDomain() uint32 { - if x != nil { - return x.Domain - } - return 0 -} - -func (x *Class) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -type isClass_Class interface { - isClass_Class() -} - -type Class_Cairo0 struct { - Cairo0 *Cairo0Class `protobuf:"bytes,1,opt,name=cairo0,proto3,oneof"` -} - -type Class_Cairo1 struct { - Cairo1 *Cairo1Class `protobuf:"bytes,2,opt,name=cairo1,proto3,oneof"` -} - -func (*Class_Cairo0) isClass_Class() {} - -func (*Class_Cairo1) isClass_Class() {} - -type ClassesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` -} - -func (x *ClassesRequest) Reset() { - *x = ClassesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_class_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClassesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClassesRequest) ProtoMessage() {} - -func (x *ClassesRequest) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_class_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClassesRequest.ProtoReflect.Descriptor instead. -func (*ClassesRequest) Descriptor() ([]byte, []int) { - return file_p2p_proto_class_proto_rawDescGZIP(), []int{6} -} - -func (x *ClassesRequest) GetIteration() *Iteration { - if x != nil { - return x.Iteration - } - return nil -} - -// Responses are sent ordered by the order given in the request. -type ClassesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ClassMessage: - // - // *ClassesResponse_Class - // *ClassesResponse_Fin - ClassMessage isClassesResponse_ClassMessage `protobuf_oneof:"class_message"` -} - -func (x *ClassesResponse) Reset() { - *x = ClassesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_class_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClassesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClassesResponse) ProtoMessage() {} - -func (x *ClassesResponse) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_class_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClassesResponse.ProtoReflect.Descriptor instead. -func (*ClassesResponse) Descriptor() ([]byte, []int) { - return file_p2p_proto_class_proto_rawDescGZIP(), []int{7} -} - -func (m *ClassesResponse) GetClassMessage() isClassesResponse_ClassMessage { - if m != nil { - return m.ClassMessage - } - return nil -} - -func (x *ClassesResponse) GetClass() *Class { - if x, ok := x.GetClassMessage().(*ClassesResponse_Class); ok { - return x.Class - } - return nil -} - -func (x *ClassesResponse) GetFin() *Fin { - if x, ok := x.GetClassMessage().(*ClassesResponse_Fin); ok { - return x.Fin - } - return nil -} - -type isClassesResponse_ClassMessage interface { - isClassesResponse_ClassMessage() -} - -type ClassesResponse_Class struct { - Class *Class `protobuf:"bytes,1,opt,name=class,proto3,oneof"` -} - -type ClassesResponse_Fin struct { - Fin *Fin `protobuf:"bytes,2,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its classes. -} - -func (*ClassesResponse_Class) isClassesResponse_ClassMessage() {} - -func (*ClassesResponse_Fin) isClassesResponse_ClassMessage() {} - -var File_p2p_proto_class_proto protoreflect.FileDescriptor - -var file_p2p_proto_class_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x4a, 0x0a, 0x0a, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, - 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x0b, - 0x43, 0x61, 0x69, 0x72, 0x6f, 0x30, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, - 0x62, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x62, 0x69, 0x12, 0x29, 0x0a, - 0x09, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x6c, 0x31, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x22, 0x4e, 0x0a, 0x10, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x08, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x22, 0xaf, 0x01, 0x0a, 0x11, 0x43, 0x61, 0x69, 0x72, 0x6f, 0x31, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x53, 0x69, 0x65, - 0x72, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x0b, 0x6c, 0x31, 0x5f, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x0a, 0x6c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x35, 0x0a, 0x0c, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x53, 0x69, 0x65, 0x72, 0x72, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x6f, 0x72, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x69, 0x72, 0x6f, 0x31, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x62, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x61, 0x62, 0x69, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x43, 0x61, - 0x69, 0x72, 0x6f, 0x31, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, - 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, - 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, - 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x9e, 0x01, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x12, 0x26, 0x0a, 0x06, 0x63, 0x61, 0x69, 0x72, 0x6f, 0x30, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x43, 0x61, 0x69, 0x72, 0x6f, 0x30, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x00, - 0x52, 0x06, 0x63, 0x61, 0x69, 0x72, 0x6f, 0x30, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x61, 0x69, 0x72, - 0x6f, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x43, 0x61, 0x69, 0x72, 0x6f, - 0x31, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x00, 0x52, 0x06, 0x63, 0x61, 0x69, 0x72, 0x6f, 0x31, - 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 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, 0x42, 0x07, - 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x22, 0x3a, 0x0a, 0x0e, 0x43, 0x6c, 0x61, 0x73, 0x73, - 0x65, 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, 0x5c, 0x0a, 0x0f, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x00, 0x52, - 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 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, 0x0f, 0x0a, 0x0d, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x42, 0x31, 0x5a, 0x2f, 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, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, - 0x73, 0x70, 0x65, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_p2p_proto_class_proto_rawDescOnce sync.Once - file_p2p_proto_class_proto_rawDescData = file_p2p_proto_class_proto_rawDesc -) - -func file_p2p_proto_class_proto_rawDescGZIP() []byte { - file_p2p_proto_class_proto_rawDescOnce.Do(func() { - file_p2p_proto_class_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_proto_class_proto_rawDescData) - }) - return file_p2p_proto_class_proto_rawDescData -} - -var file_p2p_proto_class_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_p2p_proto_class_proto_goTypes = []any{ - (*EntryPoint)(nil), // 0: EntryPoint - (*Cairo0Class)(nil), // 1: Cairo0Class - (*SierraEntryPoint)(nil), // 2: SierraEntryPoint - (*Cairo1EntryPoints)(nil), // 3: Cairo1EntryPoints - (*Cairo1Class)(nil), // 4: Cairo1Class - (*Class)(nil), // 5: Class - (*ClassesRequest)(nil), // 6: ClassesRequest - (*ClassesResponse)(nil), // 7: ClassesResponse - (*Felt252)(nil), // 8: Felt252 - (*Hash)(nil), // 9: Hash - (*Iteration)(nil), // 10: Iteration - (*Fin)(nil), // 11: Fin -} -var file_p2p_proto_class_proto_depIdxs = []int32{ - 8, // 0: EntryPoint.selector:type_name -> Felt252 - 0, // 1: Cairo0Class.externals:type_name -> EntryPoint - 0, // 2: Cairo0Class.l1_handlers:type_name -> EntryPoint - 0, // 3: Cairo0Class.constructors:type_name -> EntryPoint - 8, // 4: SierraEntryPoint.selector:type_name -> Felt252 - 2, // 5: Cairo1EntryPoints.externals:type_name -> SierraEntryPoint - 2, // 6: Cairo1EntryPoints.l1_handlers:type_name -> SierraEntryPoint - 2, // 7: Cairo1EntryPoints.constructors:type_name -> SierraEntryPoint - 3, // 8: Cairo1Class.entry_points:type_name -> Cairo1EntryPoints - 8, // 9: Cairo1Class.program:type_name -> Felt252 - 1, // 10: Class.cairo0:type_name -> Cairo0Class - 4, // 11: Class.cairo1:type_name -> Cairo1Class - 9, // 12: Class.class_hash:type_name -> Hash - 10, // 13: ClassesRequest.iteration:type_name -> Iteration - 5, // 14: ClassesResponse.class:type_name -> Class - 11, // 15: ClassesResponse.fin:type_name -> Fin - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_p2p_proto_class_proto_init() } -func file_p2p_proto_class_proto_init() { - if File_p2p_proto_class_proto != nil { - return - } - file_p2p_proto_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_p2p_proto_class_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*EntryPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_class_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Cairo0Class); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_class_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SierraEntryPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_class_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Cairo1EntryPoints); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_class_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Cairo1Class); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_class_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Class); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_class_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ClassesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_class_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ClassesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_p2p_proto_class_proto_msgTypes[5].OneofWrappers = []any{ - (*Class_Cairo0)(nil), - (*Class_Cairo1)(nil), - } - file_p2p_proto_class_proto_msgTypes[7].OneofWrappers = []any{ - (*ClassesResponse_Class)(nil), - (*ClassesResponse_Fin)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_p2p_proto_class_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_p2p_proto_class_proto_goTypes, - DependencyIndexes: file_p2p_proto_class_proto_depIdxs, - MessageInfos: file_p2p_proto_class_proto_msgTypes, - }.Build() - File_p2p_proto_class_proto = out.File - file_p2p_proto_class_proto_rawDesc = nil - file_p2p_proto_class_proto_goTypes = nil - file_p2p_proto_class_proto_depIdxs = nil -} diff --git a/p2p/starknet/spec/common.pb.go b/p2p/starknet/spec/common.pb.go deleted file mode 100644 index 25aedb5463..0000000000 --- a/p2p/starknet/spec/common.pb.go +++ /dev/null @@ -1,1167 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 -// source: p2p/proto/common.proto - -package spec - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type L1DataAvailabilityMode int32 - -const ( - L1DataAvailabilityMode_Calldata L1DataAvailabilityMode = 0 - L1DataAvailabilityMode_Blob L1DataAvailabilityMode = 1 -) - -// Enum value maps for L1DataAvailabilityMode. -var ( - L1DataAvailabilityMode_name = map[int32]string{ - 0: "Calldata", - 1: "Blob", - } - L1DataAvailabilityMode_value = map[string]int32{ - "Calldata": 0, - "Blob": 1, - } -) - -func (x L1DataAvailabilityMode) Enum() *L1DataAvailabilityMode { - p := new(L1DataAvailabilityMode) - *p = x - return p -} - -func (x L1DataAvailabilityMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (L1DataAvailabilityMode) Descriptor() protoreflect.EnumDescriptor { - return file_p2p_proto_common_proto_enumTypes[0].Descriptor() -} - -func (L1DataAvailabilityMode) Type() protoreflect.EnumType { - return &file_p2p_proto_common_proto_enumTypes[0] -} - -func (x L1DataAvailabilityMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use L1DataAvailabilityMode.Descriptor instead. -func (L1DataAvailabilityMode) EnumDescriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{0} -} - -type VolitionDomain int32 - -const ( - VolitionDomain_L1 VolitionDomain = 0 - VolitionDomain_L2 VolitionDomain = 1 -) - -// Enum value maps for VolitionDomain. -var ( - VolitionDomain_name = map[int32]string{ - 0: "L1", - 1: "L2", - } - VolitionDomain_value = map[string]int32{ - "L1": 0, - "L2": 1, - } -) - -func (x VolitionDomain) Enum() *VolitionDomain { - p := new(VolitionDomain) - *p = x - return p -} - -func (x VolitionDomain) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VolitionDomain) Descriptor() protoreflect.EnumDescriptor { - return file_p2p_proto_common_proto_enumTypes[1].Descriptor() -} - -func (VolitionDomain) Type() protoreflect.EnumType { - return &file_p2p_proto_common_proto_enumTypes[1] -} - -func (x VolitionDomain) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VolitionDomain.Descriptor instead. -func (VolitionDomain) EnumDescriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{1} -} - -type Iteration_Direction int32 - -const ( - Iteration_Forward Iteration_Direction = 0 - Iteration_Backward Iteration_Direction = 1 -) - -// Enum value maps for Iteration_Direction. -var ( - Iteration_Direction_name = map[int32]string{ - 0: "Forward", - 1: "Backward", - } - Iteration_Direction_value = map[string]int32{ - "Forward": 0, - "Backward": 1, - } -) - -func (x Iteration_Direction) Enum() *Iteration_Direction { - p := new(Iteration_Direction) - *p = x - return p -} - -func (x Iteration_Direction) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Iteration_Direction) Descriptor() protoreflect.EnumDescriptor { - return file_p2p_proto_common_proto_enumTypes[2].Descriptor() -} - -func (Iteration_Direction) Type() protoreflect.EnumType { - return &file_p2p_proto_common_proto_enumTypes[2] -} - -func (x Iteration_Direction) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Iteration_Direction.Descriptor instead. -func (Iteration_Direction) EnumDescriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{11, 0} -} - -type Felt252 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` -} - -func (x *Felt252) Reset() { - *x = Felt252{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Felt252) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Felt252) ProtoMessage() {} - -func (x *Felt252) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Felt252.ProtoReflect.Descriptor instead. -func (*Felt252) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{0} -} - -func (x *Felt252) GetElements() []byte { - if x != nil { - return x.Elements - } - return nil -} - -// A hash value representable as a Felt252 -type Hash struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` -} - -func (x *Hash) Reset() { - *x = Hash{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hash) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hash) ProtoMessage() {} - -func (x *Hash) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hash.ProtoReflect.Descriptor instead. -func (*Hash) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{1} -} - -func (x *Hash) GetElements() []byte { - if x != nil { - return x.Elements - } - return nil -} - -// A 256 bit hash value (like Keccak256) -type Hash256 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required to be 32 bytes long - Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` -} - -func (x *Hash256) Reset() { - *x = Hash256{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hash256) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hash256) ProtoMessage() {} - -func (x *Hash256) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hash256.ProtoReflect.Descriptor instead. -func (*Hash256) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{2} -} - -func (x *Hash256) GetElements() []byte { - if x != nil { - return x.Elements - } - return nil -} - -type Hashes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Items []*Hash `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` -} - -func (x *Hashes) Reset() { - *x = Hashes{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Hashes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Hashes) ProtoMessage() {} - -func (x *Hashes) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Hashes.ProtoReflect.Descriptor instead. -func (*Hashes) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{3} -} - -func (x *Hashes) GetItems() []*Hash { - if x != nil { - return x.Items - } - return nil -} - -type Address struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` -} - -func (x *Address) Reset() { - *x = Address{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Address) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Address) ProtoMessage() {} - -func (x *Address) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Address.ProtoReflect.Descriptor instead. -func (*Address) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{4} -} - -func (x *Address) GetElements() []byte { - if x != nil { - return x.Elements - } - return nil -} - -type PeerID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *PeerID) Reset() { - *x = PeerID{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeerID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeerID) ProtoMessage() {} - -func (x *PeerID) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PeerID.ProtoReflect.Descriptor instead. -func (*PeerID) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{5} -} - -func (x *PeerID) GetId() []byte { - if x != nil { - return x.Id - } - return nil -} - -type Uint128 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Low uint64 `protobuf:"varint,1,opt,name=low,proto3" json:"low,omitempty"` - High uint64 `protobuf:"varint,2,opt,name=high,proto3" json:"high,omitempty"` -} - -func (x *Uint128) Reset() { - *x = Uint128{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Uint128) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Uint128) ProtoMessage() {} - -func (x *Uint128) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Uint128.ProtoReflect.Descriptor instead. -func (*Uint128) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{6} -} - -func (x *Uint128) GetLow() uint64 { - if x != nil { - return x.Low - } - return 0 -} - -func (x *Uint128) GetHigh() uint64 { - if x != nil { - return x.High - } - return 0 -} - -type ConsensusSignature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - R *Felt252 `protobuf:"bytes,1,opt,name=r,proto3" json:"r,omitempty"` - S *Felt252 `protobuf:"bytes,2,opt,name=s,proto3" json:"s,omitempty"` -} - -func (x *ConsensusSignature) Reset() { - *x = ConsensusSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusSignature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusSignature) ProtoMessage() {} - -func (x *ConsensusSignature) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConsensusSignature.ProtoReflect.Descriptor instead. -func (*ConsensusSignature) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{7} -} - -func (x *ConsensusSignature) GetR() *Felt252 { - if x != nil { - return x.R - } - return nil -} - -func (x *ConsensusSignature) GetS() *Felt252 { - if x != nil { - return x.S - } - return nil -} - -type Patricia struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NLeaves uint64 `protobuf:"varint,1,opt,name=n_leaves,json=nLeaves,proto3" json:"n_leaves,omitempty"` // needed to know the height, so as to how many nodes to expect in a proof. - // and also when receiving all leaves, how many to expect - Root *Hash `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` -} - -func (x *Patricia) Reset() { - *x = Patricia{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Patricia) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Patricia) ProtoMessage() {} - -func (x *Patricia) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Patricia.ProtoReflect.Descriptor instead. -func (*Patricia) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{8} -} - -func (x *Patricia) GetNLeaves() uint64 { - if x != nil { - return x.NLeaves - } - return 0 -} - -func (x *Patricia) GetRoot() *Hash { - if x != nil { - return x.Root - } - return nil -} - -type StateDiffCommitment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StateDiffLength uint64 `protobuf:"varint,1,opt,name=state_diff_length,json=stateDiffLength,proto3" json:"state_diff_length,omitempty"` - Root *Hash `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` -} - -func (x *StateDiffCommitment) Reset() { - *x = StateDiffCommitment{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateDiffCommitment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateDiffCommitment) ProtoMessage() {} - -func (x *StateDiffCommitment) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StateDiffCommitment.ProtoReflect.Descriptor instead. -func (*StateDiffCommitment) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{9} -} - -func (x *StateDiffCommitment) GetStateDiffLength() uint64 { - if x != nil { - return x.StateDiffLength - } - return 0 -} - -func (x *StateDiffCommitment) GetRoot() *Hash { - if x != nil { - return x.Root - } - return nil -} - -type BlockID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` - Header *Hash `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` -} - -func (x *BlockID) Reset() { - *x = BlockID{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockID) ProtoMessage() {} - -func (x *BlockID) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BlockID.ProtoReflect.Descriptor instead. -func (*BlockID) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{10} -} - -func (x *BlockID) GetNumber() uint64 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *BlockID) GetHeader() *Hash { - if x != nil { - return x.Header - } - return nil -} - -type Iteration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Start: - // - // *Iteration_BlockNumber - // *Iteration_Header - Start isIteration_Start `protobuf_oneof:"start"` - Direction Iteration_Direction `protobuf:"varint,3,opt,name=direction,proto3,enum=Iteration_Direction" json:"direction,omitempty"` - Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - Step uint64 `protobuf:"varint,5,opt,name=step,proto3" json:"step,omitempty"` // to allow interleaving from several nodes -} - -func (x *Iteration) Reset() { - *x = Iteration{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Iteration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Iteration) ProtoMessage() {} - -func (x *Iteration) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Iteration.ProtoReflect.Descriptor instead. -func (*Iteration) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{11} -} - -func (m *Iteration) GetStart() isIteration_Start { - if m != nil { - return m.Start - } - return nil -} - -func (x *Iteration) GetBlockNumber() uint64 { - if x, ok := x.GetStart().(*Iteration_BlockNumber); ok { - return x.BlockNumber - } - return 0 -} - -func (x *Iteration) GetHeader() *Hash { - if x, ok := x.GetStart().(*Iteration_Header); ok { - return x.Header - } - return nil -} - -func (x *Iteration) GetDirection() Iteration_Direction { - if x != nil { - return x.Direction - } - return Iteration_Forward -} - -func (x *Iteration) GetLimit() uint64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *Iteration) GetStep() uint64 { - if x != nil { - return x.Step - } - return 0 -} - -type isIteration_Start interface { - isIteration_Start() -} - -type Iteration_BlockNumber struct { - BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3,oneof"` -} - -type Iteration_Header struct { - Header *Hash `protobuf:"bytes,2,opt,name=header,proto3,oneof"` -} - -func (*Iteration_BlockNumber) isIteration_Start() {} - -func (*Iteration_Header) isIteration_Start() {} - -// mark the end of a stream of messages -// TBD: may not be required if we open a stream per request. -type Fin struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Fin) Reset() { - *x = Fin{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_common_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Fin) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fin) ProtoMessage() {} - -func (x *Fin) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_common_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Fin.ProtoReflect.Descriptor instead. -func (*Fin) Descriptor() ([]byte, []int) { - return file_p2p_proto_common_proto_rawDescGZIP(), []int{12} -} - -var File_p2p_proto_common_proto protoreflect.FileDescriptor - -var file_p2p_proto_common_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x25, 0x0a, 0x07, 0x46, 0x65, 0x6c, 0x74, - 0x32, 0x35, 0x32, 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, - 0x22, 0x0a, 0x04, 0x48, 0x61, 0x73, 0x68, 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, 0x25, 0x0a, 0x07, 0x48, 0x61, 0x73, 0x68, 0x32, 0x35, 0x36, 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, 0x25, 0x0a, 0x06, 0x48, 0x61, - 0x73, 0x68, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x22, 0x25, 0x0a, 0x07, 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, 0x18, 0x0a, 0x06, 0x50, 0x65, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x07, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x32, 0x38, 0x12, 0x10, 0x0a, - 0x03, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x6f, 0x77, 0x12, - 0x12, 0x0a, 0x04, 0x68, 0x69, 0x67, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x68, - 0x69, 0x67, 0x68, 0x22, 0x44, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x01, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x01, - 0x72, 0x12, 0x16, 0x0a, 0x01, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, - 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x01, 0x73, 0x22, 0x40, 0x0a, 0x08, 0x50, 0x61, 0x74, - 0x72, 0x69, 0x63, 0x69, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x5f, 0x6c, 0x65, 0x61, 0x76, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, - 0x12, 0x19, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x5c, 0x0a, 0x13, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x66, 0x66, - 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x19, - 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, - 0x61, 0x73, 0x68, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x40, 0x0a, 0x07, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x06, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, - 0x61, 0x73, 0x68, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xe0, 0x01, 0x0a, 0x09, - 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x00, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1f, - 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, - 0x2e, 0x48, 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x32, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x49, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, - 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, - 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x22, 0x26, 0x0a, - 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x61, 0x63, 0x6b, 0x77, - 0x61, 0x72, 0x64, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x22, 0x05, - 0x0a, 0x03, 0x46, 0x69, 0x6e, 0x2a, 0x30, 0x0a, 0x16, 0x4c, 0x31, 0x44, 0x61, 0x74, 0x61, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, - 0x0c, 0x0a, 0x08, 0x43, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x10, 0x00, 0x12, 0x08, 0x0a, - 0x04, 0x42, 0x6c, 0x6f, 0x62, 0x10, 0x01, 0x2a, 0x20, 0x0a, 0x0e, 0x56, 0x6f, 0x6c, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x31, 0x10, - 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x32, 0x10, 0x01, 0x42, 0x31, 0x5a, 0x2f, 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, 0x73, - 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_p2p_proto_common_proto_rawDescOnce sync.Once - file_p2p_proto_common_proto_rawDescData = file_p2p_proto_common_proto_rawDesc -) - -func file_p2p_proto_common_proto_rawDescGZIP() []byte { - file_p2p_proto_common_proto_rawDescOnce.Do(func() { - file_p2p_proto_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_proto_common_proto_rawDescData) - }) - return file_p2p_proto_common_proto_rawDescData -} - -var file_p2p_proto_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_p2p_proto_common_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_p2p_proto_common_proto_goTypes = []any{ - (L1DataAvailabilityMode)(0), // 0: L1DataAvailabilityMode - (VolitionDomain)(0), // 1: VolitionDomain - (Iteration_Direction)(0), // 2: Iteration.Direction - (*Felt252)(nil), // 3: Felt252 - (*Hash)(nil), // 4: Hash - (*Hash256)(nil), // 5: Hash256 - (*Hashes)(nil), // 6: Hashes - (*Address)(nil), // 7: Address - (*PeerID)(nil), // 8: PeerID - (*Uint128)(nil), // 9: Uint128 - (*ConsensusSignature)(nil), // 10: ConsensusSignature - (*Patricia)(nil), // 11: Patricia - (*StateDiffCommitment)(nil), // 12: StateDiffCommitment - (*BlockID)(nil), // 13: BlockID - (*Iteration)(nil), // 14: Iteration - (*Fin)(nil), // 15: Fin -} -var file_p2p_proto_common_proto_depIdxs = []int32{ - 4, // 0: Hashes.items:type_name -> Hash - 3, // 1: ConsensusSignature.r:type_name -> Felt252 - 3, // 2: ConsensusSignature.s:type_name -> Felt252 - 4, // 3: Patricia.root:type_name -> Hash - 4, // 4: StateDiffCommitment.root:type_name -> Hash - 4, // 5: BlockID.header:type_name -> Hash - 4, // 6: Iteration.header:type_name -> Hash - 2, // 7: Iteration.direction:type_name -> Iteration.Direction - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_p2p_proto_common_proto_init() } -func file_p2p_proto_common_proto_init() { - if File_p2p_proto_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_p2p_proto_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Felt252); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Hash); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Hash256); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Hashes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Address); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PeerID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Uint128); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*ConsensusSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Patricia); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*StateDiffCommitment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*BlockID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Iteration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_common_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Fin); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_p2p_proto_common_proto_msgTypes[11].OneofWrappers = []any{ - (*Iteration_BlockNumber)(nil), - (*Iteration_Header)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_p2p_proto_common_proto_rawDesc, - NumEnums: 3, - NumMessages: 13, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_p2p_proto_common_proto_goTypes, - DependencyIndexes: file_p2p_proto_common_proto_depIdxs, - EnumInfos: file_p2p_proto_common_proto_enumTypes, - MessageInfos: file_p2p_proto_common_proto_msgTypes, - }.Build() - File_p2p_proto_common_proto = out.File - file_p2p_proto_common_proto_rawDesc = nil - file_p2p_proto_common_proto_goTypes = nil - file_p2p_proto_common_proto_depIdxs = nil -} diff --git a/p2p/starknet/spec/event.pb.go b/p2p/starknet/spec/event.pb.go deleted file mode 100644 index 8543465c35..0000000000 --- a/p2p/starknet/spec/event.pb.go +++ /dev/null @@ -1,358 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 -// source: p2p/proto/event.proto - -package spec - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TransactionHash *Hash `protobuf:"bytes,1,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` - FromAddress *Felt252 `protobuf:"bytes,3,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // looks like mistake? - Keys []*Felt252 `protobuf:"bytes,4,rep,name=keys,proto3" json:"keys,omitempty"` - Data []*Felt252 `protobuf:"bytes,5,rep,name=data,proto3" json:"data,omitempty"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_event_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_event_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_p2p_proto_event_proto_rawDescGZIP(), []int{0} -} - -func (x *Event) GetTransactionHash() *Hash { - if x != nil { - return x.TransactionHash - } - return nil -} - -func (x *Event) GetFromAddress() *Felt252 { - if x != nil { - return x.FromAddress - } - return nil -} - -func (x *Event) GetKeys() []*Felt252 { - if x != nil { - return x.Keys - } - return nil -} - -func (x *Event) GetData() []*Felt252 { - if x != nil { - return x.Data - } - return nil -} - -type EventsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` -} - -func (x *EventsRequest) Reset() { - *x = EventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_event_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventsRequest) ProtoMessage() {} - -func (x *EventsRequest) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_event_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventsRequest.ProtoReflect.Descriptor instead. -func (*EventsRequest) Descriptor() ([]byte, []int) { - return file_p2p_proto_event_proto_rawDescGZIP(), []int{1} -} - -func (x *EventsRequest) GetIteration() *Iteration { - if x != nil { - return x.Iteration - } - return nil -} - -// Responses are sent ordered by the order given in the request. -type EventsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to EventMessage: - // - // *EventsResponse_Event - // *EventsResponse_Fin - EventMessage isEventsResponse_EventMessage `protobuf_oneof:"event_message"` -} - -func (x *EventsResponse) Reset() { - *x = EventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventsResponse) ProtoMessage() {} - -func (x *EventsResponse) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_event_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EventsResponse.ProtoReflect.Descriptor instead. -func (*EventsResponse) Descriptor() ([]byte, []int) { - return file_p2p_proto_event_proto_rawDescGZIP(), []int{2} -} - -func (m *EventsResponse) GetEventMessage() isEventsResponse_EventMessage { - if m != nil { - return m.EventMessage - } - return nil -} - -func (x *EventsResponse) GetEvent() *Event { - if x, ok := x.GetEventMessage().(*EventsResponse_Event); ok { - return x.Event - } - return nil -} - -func (x *EventsResponse) GetFin() *Fin { - if x, ok := x.GetEventMessage().(*EventsResponse_Fin); ok { - return x.Fin - } - return nil -} - -type isEventsResponse_EventMessage interface { - isEventsResponse_EventMessage() -} - -type EventsResponse_Event struct { - Event *Event `protobuf:"bytes,1,opt,name=event,proto3,oneof"` -} - -type EventsResponse_Fin struct { - Fin *Fin `protobuf:"bytes,2,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its events. -} - -func (*EventsResponse_Event) isEventsResponse_EventMessage() {} - -func (*EventsResponse_Fin) isEventsResponse_EventMessage() {} - -var File_p2p_proto_event_proto protoreflect.FileDescriptor - -var file_p2p_proto_event_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xa2, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x10, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 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, 0x12, 0x2b, 0x0a, 0x0c, 0x66, - 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x0b, 0x66, 0x72, 0x6f, - 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, - 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x0d, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, - 0x5b, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1e, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x06, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, - 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, 0x0f, 0x0a, 0x0d, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x31, 0x5a, 0x2f, - 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, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_p2p_proto_event_proto_rawDescOnce sync.Once - file_p2p_proto_event_proto_rawDescData = file_p2p_proto_event_proto_rawDesc -) - -func file_p2p_proto_event_proto_rawDescGZIP() []byte { - file_p2p_proto_event_proto_rawDescOnce.Do(func() { - file_p2p_proto_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_proto_event_proto_rawDescData) - }) - return file_p2p_proto_event_proto_rawDescData -} - -var file_p2p_proto_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_p2p_proto_event_proto_goTypes = []any{ - (*Event)(nil), // 0: Event - (*EventsRequest)(nil), // 1: EventsRequest - (*EventsResponse)(nil), // 2: EventsResponse - (*Hash)(nil), // 3: Hash - (*Felt252)(nil), // 4: Felt252 - (*Iteration)(nil), // 5: Iteration - (*Fin)(nil), // 6: Fin -} -var file_p2p_proto_event_proto_depIdxs = []int32{ - 3, // 0: Event.transaction_hash:type_name -> Hash - 4, // 1: Event.from_address:type_name -> Felt252 - 4, // 2: Event.keys:type_name -> Felt252 - 4, // 3: Event.data:type_name -> Felt252 - 5, // 4: EventsRequest.iteration:type_name -> Iteration - 0, // 5: EventsResponse.event:type_name -> Event - 6, // 6: EventsResponse.fin:type_name -> Fin - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_p2p_proto_event_proto_init() } -func file_p2p_proto_event_proto_init() { - if File_p2p_proto_event_proto != nil { - return - } - file_p2p_proto_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_p2p_proto_event_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_event_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_event_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*EventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_p2p_proto_event_proto_msgTypes[2].OneofWrappers = []any{ - (*EventsResponse_Event)(nil), - (*EventsResponse_Fin)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_p2p_proto_event_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_p2p_proto_event_proto_goTypes, - DependencyIndexes: file_p2p_proto_event_proto_depIdxs, - MessageInfos: file_p2p_proto_event_proto_msgTypes, - }.Build() - File_p2p_proto_event_proto = out.File - file_p2p_proto_event_proto_rawDesc = nil - file_p2p_proto_event_proto_goTypes = nil - file_p2p_proto_event_proto_depIdxs = nil -} diff --git a/p2p/starknet/spec/header.pb.go b/p2p/starknet/spec/header.pb.go deleted file mode 100644 index 5d94c6211b..0000000000 --- a/p2p/starknet/spec/header.pb.go +++ /dev/null @@ -1,696 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 -// source: p2p/proto/header.proto - -package spec - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Note: commitments may change to be for the previous blocks like comet/tendermint -// hash of block header sent to L1 -type SignedBlockHeader struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHash *Hash `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // For the structure of the block hash, see https://docs.starknet.io/documentation/architecture_and_concepts/Network_Architecture/header/#block_hash - ParentHash *Hash `protobuf:"bytes,2,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` - Number uint64 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` // This can be deduced from context. We can consider removing this field. - Time uint64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` // Encoded in Unix time. - SequencerAddress *Address `protobuf:"bytes,5,opt,name=sequencer_address,json=sequencerAddress,proto3" json:"sequencer_address,omitempty"` - StateRoot *Hash `protobuf:"bytes,6,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` // Patricia root of contract and class patricia tries. Each of those tries are of height 251. Same as in L1. Later more trees will be included - StateDiffCommitment *StateDiffCommitment `protobuf:"bytes,7,opt,name=state_diff_commitment,json=stateDiffCommitment,proto3" json:"state_diff_commitment,omitempty"` // The state diff commitment returned by the Starknet Feeder Gateway - // For more info, see https://community.starknet.io/t/introducing-p2p-authentication-and-mismatch-resolution-in-v0-12-2/97993 - // The leaves contain a hash of the transaction hash and transaction signature. - Transactions *Patricia `protobuf:"bytes,8,opt,name=transactions,proto3" json:"transactions,omitempty"` // By order of execution. TBD: required? the client can execute (powerful machine) and match state diff - 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"` - // 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 -} - -func (x *SignedBlockHeader) Reset() { - *x = SignedBlockHeader{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_header_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignedBlockHeader) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignedBlockHeader) ProtoMessage() {} - -func (x *SignedBlockHeader) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_header_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SignedBlockHeader.ProtoReflect.Descriptor instead. -func (*SignedBlockHeader) Descriptor() ([]byte, []int) { - return file_p2p_proto_header_proto_rawDescGZIP(), []int{0} -} - -func (x *SignedBlockHeader) GetBlockHash() *Hash { - if x != nil { - return x.BlockHash - } - return nil -} - -func (x *SignedBlockHeader) GetParentHash() *Hash { - if x != nil { - return x.ParentHash - } - return nil -} - -func (x *SignedBlockHeader) GetNumber() uint64 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *SignedBlockHeader) GetTime() uint64 { - if x != nil { - return x.Time - } - return 0 -} - -func (x *SignedBlockHeader) GetSequencerAddress() *Address { - if x != nil { - return x.SequencerAddress - } - return nil -} - -func (x *SignedBlockHeader) GetStateRoot() *Hash { - if x != nil { - return x.StateRoot - } - return nil -} - -func (x *SignedBlockHeader) GetStateDiffCommitment() *StateDiffCommitment { - if x != nil { - return x.StateDiffCommitment - } - return nil -} - -func (x *SignedBlockHeader) GetTransactions() *Patricia { - if x != nil { - return x.Transactions - } - return nil -} - -func (x *SignedBlockHeader) GetEvents() *Patricia { - if x != nil { - return x.Events - } - return nil -} - -func (x *SignedBlockHeader) GetReceipts() *Hash { - if x != nil { - return x.Receipts - } - return nil -} - -func (x *SignedBlockHeader) GetProtocolVersion() string { - if x != nil { - return x.ProtocolVersion - } - return "" -} - -func (x *SignedBlockHeader) GetGasPriceFri() *Uint128 { - if x != nil { - return x.GasPriceFri - } - return nil -} - -func (x *SignedBlockHeader) GetGasPriceWei() *Uint128 { - if x != nil { - return x.GasPriceWei - } - return nil -} - -func (x *SignedBlockHeader) GetDataGasPriceFri() *Uint128 { - if x != nil { - return x.DataGasPriceFri - } - return nil -} - -func (x *SignedBlockHeader) GetDataGasPriceWei() *Uint128 { - if x != nil { - return x.DataGasPriceWei - } - return nil -} - -func (x *SignedBlockHeader) GetL1DataAvailabilityMode() L1DataAvailabilityMode { - if x != nil { - return x.L1DataAvailabilityMode - } - return L1DataAvailabilityMode_Calldata -} - -func (x *SignedBlockHeader) GetSignatures() []*ConsensusSignature { - if x != nil { - return x.Signatures - } - return nil -} - -// sent to all peers (except the ones this was received from, if any). -// for a fraction of peers, also send the GetBlockHeaders response (as if they asked for it for this block) -type NewBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to MaybeFull: - // - // *NewBlock_Id - // *NewBlock_Header - MaybeFull isNewBlock_MaybeFull `protobuf_oneof:"maybe_full"` -} - -func (x *NewBlock) Reset() { - *x = NewBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_header_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NewBlock) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NewBlock) ProtoMessage() {} - -func (x *NewBlock) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_header_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NewBlock.ProtoReflect.Descriptor instead. -func (*NewBlock) Descriptor() ([]byte, []int) { - return file_p2p_proto_header_proto_rawDescGZIP(), []int{1} -} - -func (m *NewBlock) GetMaybeFull() isNewBlock_MaybeFull { - if m != nil { - return m.MaybeFull - } - return nil -} - -func (x *NewBlock) GetId() *BlockID { - if x, ok := x.GetMaybeFull().(*NewBlock_Id); ok { - return x.Id - } - return nil -} - -func (x *NewBlock) GetHeader() *BlockHeadersResponse { - if x, ok := x.GetMaybeFull().(*NewBlock_Header); ok { - return x.Header - } - return nil -} - -type isNewBlock_MaybeFull interface { - isNewBlock_MaybeFull() -} - -type NewBlock_Id struct { - Id *BlockID `protobuf:"bytes,1,opt,name=id,proto3,oneof"` -} - -type NewBlock_Header struct { - Header *BlockHeadersResponse `protobuf:"bytes,2,opt,name=header,proto3,oneof"` -} - -func (*NewBlock_Id) isNewBlock_MaybeFull() {} - -func (*NewBlock_Header) isNewBlock_MaybeFull() {} - -type BlockHeadersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` -} - -func (x *BlockHeadersRequest) Reset() { - *x = BlockHeadersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_header_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockHeadersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockHeadersRequest) ProtoMessage() {} - -func (x *BlockHeadersRequest) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_header_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BlockHeadersRequest.ProtoReflect.Descriptor instead. -func (*BlockHeadersRequest) Descriptor() ([]byte, []int) { - return file_p2p_proto_header_proto_rawDescGZIP(), []int{2} -} - -func (x *BlockHeadersRequest) GetIteration() *Iteration { - if x != nil { - return x.Iteration - } - return nil -} - -// Responses are sent ordered by the order given in the request. -type BlockHeadersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to HeaderMessage: - // - // *BlockHeadersResponse_Header - // *BlockHeadersResponse_Fin - HeaderMessage isBlockHeadersResponse_HeaderMessage `protobuf_oneof:"header_message"` -} - -func (x *BlockHeadersResponse) Reset() { - *x = BlockHeadersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_header_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockHeadersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockHeadersResponse) ProtoMessage() {} - -func (x *BlockHeadersResponse) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_header_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BlockHeadersResponse.ProtoReflect.Descriptor instead. -func (*BlockHeadersResponse) Descriptor() ([]byte, []int) { - return file_p2p_proto_header_proto_rawDescGZIP(), []int{3} -} - -func (m *BlockHeadersResponse) GetHeaderMessage() isBlockHeadersResponse_HeaderMessage { - if m != nil { - return m.HeaderMessage - } - return nil -} - -func (x *BlockHeadersResponse) GetHeader() *SignedBlockHeader { - if x, ok := x.GetHeaderMessage().(*BlockHeadersResponse_Header); ok { - return x.Header - } - return nil -} - -func (x *BlockHeadersResponse) GetFin() *Fin { - if x, ok := x.GetHeaderMessage().(*BlockHeadersResponse_Fin); ok { - return x.Fin - } - return nil -} - -type isBlockHeadersResponse_HeaderMessage interface { - isBlockHeadersResponse_HeaderMessage() -} - -type BlockHeadersResponse_Header struct { - Header *SignedBlockHeader `protobuf:"bytes,1,opt,name=header,proto3,oneof"` -} - -type BlockHeadersResponse_Fin struct { - Fin *Fin `protobuf:"bytes,2,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its header. -} - -func (*BlockHeadersResponse_Header) isBlockHeadersResponse_HeaderMessage() {} - -func (*BlockHeadersResponse_Fin) isBlockHeadersResponse_HeaderMessage() {} - -type BlockProof struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Proof [][]byte `protobuf:"bytes,1,rep,name=proof,proto3" json:"proof,omitempty"` -} - -func (x *BlockProof) Reset() { - *x = BlockProof{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_header_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockProof) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockProof) ProtoMessage() {} - -func (x *BlockProof) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_header_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BlockProof.ProtoReflect.Descriptor instead. -func (*BlockProof) Descriptor() ([]byte, []int) { - return file_p2p_proto_header_proto_rawDescGZIP(), []int{4} -} - -func (x *BlockProof) GetProof() [][]byte { - if x != nil { - return x.Proof - } - return nil -} - -var File_p2p_proto_header_proto protoreflect.FileDescriptor - -var file_p2p_proto_header_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xa7, 0x06, 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, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x0b, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, - 0x12, 0x35, 0x0a, 0x11, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x10, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, - 0x73, 0x68, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x48, 0x0a, - 0x15, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x13, 0x73, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x43, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, - 0x50, 0x61, 0x74, 0x72, 0x69, 0x63, 0x69, 0x61, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x50, 0x61, 0x74, 0x72, 0x69, 0x63, 0x69, - 0x61, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x70, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, 0x61, - 0x73, 0x68, 0x52, 0x08, 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, 0x31, 0x5a, 0x2f, 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, 0x73, 0x74, - 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_p2p_proto_header_proto_rawDescOnce sync.Once - file_p2p_proto_header_proto_rawDescData = file_p2p_proto_header_proto_rawDesc -) - -func file_p2p_proto_header_proto_rawDescGZIP() []byte { - file_p2p_proto_header_proto_rawDescOnce.Do(func() { - file_p2p_proto_header_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_proto_header_proto_rawDescData) - }) - return file_p2p_proto_header_proto_rawDescData -} - -var file_p2p_proto_header_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_p2p_proto_header_proto_goTypes = []any{ - (*SignedBlockHeader)(nil), // 0: SignedBlockHeader - (*NewBlock)(nil), // 1: NewBlock - (*BlockHeadersRequest)(nil), // 2: BlockHeadersRequest - (*BlockHeadersResponse)(nil), // 3: BlockHeadersResponse - (*BlockProof)(nil), // 4: BlockProof - (*Hash)(nil), // 5: Hash - (*Address)(nil), // 6: Address - (*StateDiffCommitment)(nil), // 7: StateDiffCommitment - (*Patricia)(nil), // 8: Patricia - (*Uint128)(nil), // 9: Uint128 - (L1DataAvailabilityMode)(0), // 10: L1DataAvailabilityMode - (*ConsensusSignature)(nil), // 11: ConsensusSignature - (*BlockID)(nil), // 12: BlockID - (*Iteration)(nil), // 13: Iteration - (*Fin)(nil), // 14: Fin -} -var file_p2p_proto_header_proto_depIdxs = []int32{ - 5, // 0: SignedBlockHeader.block_hash:type_name -> Hash - 5, // 1: SignedBlockHeader.parent_hash:type_name -> Hash - 6, // 2: SignedBlockHeader.sequencer_address:type_name -> Address - 5, // 3: SignedBlockHeader.state_root:type_name -> Hash - 7, // 4: SignedBlockHeader.state_diff_commitment:type_name -> StateDiffCommitment - 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 -} - -func init() { file_p2p_proto_header_proto_init() } -func file_p2p_proto_header_proto_init() { - if File_p2p_proto_header_proto != nil { - return - } - file_p2p_proto_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_p2p_proto_header_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SignedBlockHeader); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_header_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NewBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_header_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*BlockHeadersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_header_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*BlockHeadersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_header_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BlockProof); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_p2p_proto_header_proto_msgTypes[1].OneofWrappers = []any{ - (*NewBlock_Id)(nil), - (*NewBlock_Header)(nil), - } - file_p2p_proto_header_proto_msgTypes[3].OneofWrappers = []any{ - (*BlockHeadersResponse_Header)(nil), - (*BlockHeadersResponse_Fin)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_p2p_proto_header_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_p2p_proto_header_proto_goTypes, - DependencyIndexes: file_p2p_proto_header_proto_depIdxs, - MessageInfos: file_p2p_proto_header_proto_msgTypes, - }.Build() - File_p2p_proto_header_proto = out.File - file_p2p_proto_header_proto_rawDesc = nil - file_p2p_proto_header_proto_goTypes = nil - file_p2p_proto_header_proto_depIdxs = nil -} diff --git a/p2p/starknet/spec/receipt.pb.go b/p2p/starknet/spec/receipt.pb.go deleted file mode 100644 index d3c83c97ff..0000000000 --- a/p2p/starknet/spec/receipt.pb.go +++ /dev/null @@ -1,1207 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 -// source: p2p/proto/receipt.proto - -package spec - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PriceUnit int32 - -const ( - PriceUnit_Wei PriceUnit = 0 - PriceUnit_Fri PriceUnit = 1 -) - -// Enum value maps for PriceUnit. -var ( - PriceUnit_name = map[int32]string{ - 0: "Wei", - 1: "Fri", - } - PriceUnit_value = map[string]int32{ - "Wei": 0, - "Fri": 1, - } -) - -func (x PriceUnit) Enum() *PriceUnit { - p := new(PriceUnit) - *p = x - return p -} - -func (x PriceUnit) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PriceUnit) Descriptor() protoreflect.EnumDescriptor { - return file_p2p_proto_receipt_proto_enumTypes[0].Descriptor() -} - -func (PriceUnit) Type() protoreflect.EnumType { - return &file_p2p_proto_receipt_proto_enumTypes[0] -} - -func (x PriceUnit) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PriceUnit.Descriptor instead. -func (PriceUnit) EnumDescriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{0} -} - -type MessageToL1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromAddress *Felt252 `protobuf:"bytes,2,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - Payload []*Felt252 `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload,omitempty"` - ToAddress *EthereumAddress `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` -} - -func (x *MessageToL1) Reset() { - *x = MessageToL1{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MessageToL1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessageToL1) ProtoMessage() {} - -func (x *MessageToL1) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MessageToL1.ProtoReflect.Descriptor instead. -func (*MessageToL1) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{0} -} - -func (x *MessageToL1) GetFromAddress() *Felt252 { - if x != nil { - return x.FromAddress - } - return nil -} - -func (x *MessageToL1) GetPayload() []*Felt252 { - if x != nil { - return x.Payload - } - return nil -} - -func (x *MessageToL1) GetToAddress() *EthereumAddress { - if x != nil { - return x.ToAddress - } - return nil -} - -type EthereumAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Elements []byte `protobuf:"bytes,1,opt,name=elements,proto3" json:"elements,omitempty"` -} - -func (x *EthereumAddress) Reset() { - *x = EthereumAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthereumAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthereumAddress) ProtoMessage() {} - -func (x *EthereumAddress) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EthereumAddress.ProtoReflect.Descriptor instead. -func (*EthereumAddress) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{1} -} - -func (x *EthereumAddress) GetElements() []byte { - if x != nil { - return x.Elements - } - return nil -} - -type Receipt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Type: - // - // *Receipt_Invoke_ - // *Receipt_L1Handler_ - // *Receipt_Declare_ - // *Receipt_DeprecatedDeploy - // *Receipt_DeployAccount_ - Type isReceipt_Type `protobuf_oneof:"type"` -} - -func (x *Receipt) Reset() { - *x = Receipt{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt) ProtoMessage() {} - -func (x *Receipt) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt.ProtoReflect.Descriptor instead. -func (*Receipt) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2} -} - -func (m *Receipt) GetType() isReceipt_Type { - if m != nil { - return m.Type - } - return nil -} - -func (x *Receipt) GetInvoke() *Receipt_Invoke { - if x, ok := x.GetType().(*Receipt_Invoke_); ok { - return x.Invoke - } - return nil -} - -func (x *Receipt) GetL1Handler() *Receipt_L1Handler { - if x, ok := x.GetType().(*Receipt_L1Handler_); ok { - return x.L1Handler - } - return nil -} - -func (x *Receipt) GetDeclare() *Receipt_Declare { - if x, ok := x.GetType().(*Receipt_Declare_); ok { - return x.Declare - } - return nil -} - -func (x *Receipt) GetDeprecatedDeploy() *Receipt_Deploy { - if x, ok := x.GetType().(*Receipt_DeprecatedDeploy); ok { - return x.DeprecatedDeploy - } - return nil -} - -func (x *Receipt) GetDeployAccount() *Receipt_DeployAccount { - if x, ok := x.GetType().(*Receipt_DeployAccount_); ok { - return x.DeployAccount - } - return nil -} - -type isReceipt_Type interface { - isReceipt_Type() -} - -type Receipt_Invoke_ struct { - Invoke *Receipt_Invoke `protobuf:"bytes,1,opt,name=invoke,proto3,oneof"` -} - -type Receipt_L1Handler_ struct { - L1Handler *Receipt_L1Handler `protobuf:"bytes,2,opt,name=l1_handler,json=l1Handler,proto3,oneof"` -} - -type Receipt_Declare_ struct { - Declare *Receipt_Declare `protobuf:"bytes,3,opt,name=declare,proto3,oneof"` -} - -type Receipt_DeprecatedDeploy struct { - DeprecatedDeploy *Receipt_Deploy `protobuf:"bytes,4,opt,name=deprecated_deploy,json=deprecatedDeploy,proto3,oneof"` -} - -type Receipt_DeployAccount_ struct { - DeployAccount *Receipt_DeployAccount `protobuf:"bytes,5,opt,name=deploy_account,json=deployAccount,proto3,oneof"` -} - -func (*Receipt_Invoke_) isReceipt_Type() {} - -func (*Receipt_L1Handler_) isReceipt_Type() {} - -func (*Receipt_Declare_) isReceipt_Type() {} - -func (*Receipt_DeprecatedDeploy) isReceipt_Type() {} - -func (*Receipt_DeployAccount_) isReceipt_Type() {} - -type Receipt_ExecutionResources struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - 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"` -} - -func (x *Receipt_ExecutionResources) Reset() { - *x = Receipt_ExecutionResources{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt_ExecutionResources) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt_ExecutionResources) ProtoMessage() {} - -func (x *Receipt_ExecutionResources) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt_ExecutionResources.ProtoReflect.Descriptor instead. -func (*Receipt_ExecutionResources) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *Receipt_ExecutionResources) GetBuiltins() *Receipt_ExecutionResources_BuiltinCounter { - if x != nil { - return x.Builtins - } - return nil -} - -func (x *Receipt_ExecutionResources) GetSteps() uint32 { - if x != nil { - return x.Steps - } - return 0 -} - -func (x *Receipt_ExecutionResources) GetMemoryHoles() uint32 { - if x != nil { - return x.MemoryHoles - } - return 0 -} - -func (x *Receipt_ExecutionResources) GetL1Gas() *Felt252 { - if x != nil { - return x.L1Gas - } - return nil -} - -func (x *Receipt_ExecutionResources) GetL1DataGas() *Felt252 { - if x != nil { - return x.L1DataGas - } - return nil -} - -func (x *Receipt_ExecutionResources) GetTotalL1Gas() *Felt252 { - if x != nil { - return x.TotalL1Gas - } - return nil -} - -type Receipt_Common struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ActualFee *Felt252 `protobuf:"bytes,2,opt,name=actual_fee,json=actualFee,proto3" json:"actual_fee,omitempty"` - PriceUnit PriceUnit `protobuf:"varint,3,opt,name=price_unit,json=priceUnit,proto3,enum=PriceUnit" json:"price_unit,omitempty"` - MessagesSent []*MessageToL1 `protobuf:"bytes,4,rep,name=messages_sent,json=messagesSent,proto3" json:"messages_sent,omitempty"` - ExecutionResources *Receipt_ExecutionResources `protobuf:"bytes,5,opt,name=execution_resources,json=executionResources,proto3" json:"execution_resources,omitempty"` - RevertReason *string `protobuf:"bytes,6,opt,name=revert_reason,json=revertReason,proto3,oneof" json:"revert_reason,omitempty"` -} - -func (x *Receipt_Common) Reset() { - *x = Receipt_Common{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt_Common) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt_Common) ProtoMessage() {} - -func (x *Receipt_Common) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt_Common.ProtoReflect.Descriptor instead. -func (*Receipt_Common) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2, 1} -} - -func (x *Receipt_Common) GetActualFee() *Felt252 { - if x != nil { - return x.ActualFee - } - return nil -} - -func (x *Receipt_Common) GetPriceUnit() PriceUnit { - if x != nil { - return x.PriceUnit - } - return PriceUnit_Wei -} - -func (x *Receipt_Common) GetMessagesSent() []*MessageToL1 { - if x != nil { - return x.MessagesSent - } - return nil -} - -func (x *Receipt_Common) GetExecutionResources() *Receipt_ExecutionResources { - if x != nil { - return x.ExecutionResources - } - return nil -} - -func (x *Receipt_Common) GetRevertReason() string { - if x != nil && x.RevertReason != nil { - return *x.RevertReason - } - return "" -} - -type Receipt_Invoke struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *Receipt_Invoke) Reset() { - *x = Receipt_Invoke{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt_Invoke) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt_Invoke) ProtoMessage() {} - -func (x *Receipt_Invoke) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt_Invoke.ProtoReflect.Descriptor instead. -func (*Receipt_Invoke) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2, 2} -} - -func (x *Receipt_Invoke) GetCommon() *Receipt_Common { - if x != nil { - return x.Common - } - return nil -} - -type Receipt_L1Handler struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` - MsgHash *Hash256 `protobuf:"bytes,2,opt,name=msg_hash,json=msgHash,proto3" json:"msg_hash,omitempty"` -} - -func (x *Receipt_L1Handler) Reset() { - *x = Receipt_L1Handler{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt_L1Handler) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt_L1Handler) ProtoMessage() {} - -func (x *Receipt_L1Handler) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt_L1Handler.ProtoReflect.Descriptor instead. -func (*Receipt_L1Handler) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2, 3} -} - -func (x *Receipt_L1Handler) GetCommon() *Receipt_Common { - if x != nil { - return x.Common - } - return nil -} - -func (x *Receipt_L1Handler) GetMsgHash() *Hash256 { - if x != nil { - return x.MsgHash - } - return nil -} - -type Receipt_Declare struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` -} - -func (x *Receipt_Declare) Reset() { - *x = Receipt_Declare{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt_Declare) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt_Declare) ProtoMessage() {} - -func (x *Receipt_Declare) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt_Declare.ProtoReflect.Descriptor instead. -func (*Receipt_Declare) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2, 4} -} - -func (x *Receipt_Declare) GetCommon() *Receipt_Common { - if x != nil { - return x.Common - } - return nil -} - -type Receipt_Deploy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` - ContractAddress *Felt252 `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` -} - -func (x *Receipt_Deploy) Reset() { - *x = Receipt_Deploy{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt_Deploy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt_Deploy) ProtoMessage() {} - -func (x *Receipt_Deploy) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt_Deploy.ProtoReflect.Descriptor instead. -func (*Receipt_Deploy) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2, 5} -} - -func (x *Receipt_Deploy) GetCommon() *Receipt_Common { - if x != nil { - return x.Common - } - return nil -} - -func (x *Receipt_Deploy) GetContractAddress() *Felt252 { - if x != nil { - return x.ContractAddress - } - return nil -} - -type Receipt_DeployAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Common *Receipt_Common `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` - ContractAddress *Felt252 `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` -} - -func (x *Receipt_DeployAccount) Reset() { - *x = Receipt_DeployAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt_DeployAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt_DeployAccount) ProtoMessage() {} - -func (x *Receipt_DeployAccount) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt_DeployAccount.ProtoReflect.Descriptor instead. -func (*Receipt_DeployAccount) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2, 6} -} - -func (x *Receipt_DeployAccount) GetCommon() *Receipt_Common { - if x != nil { - return x.Common - } - return nil -} - -func (x *Receipt_DeployAccount) GetContractAddress() *Felt252 { - if x != nil { - return x.ContractAddress - } - return nil -} - -type Receipt_ExecutionResources_BuiltinCounter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bitwise uint32 `protobuf:"varint,1,opt,name=bitwise,proto3" json:"bitwise,omitempty"` - Ecdsa uint32 `protobuf:"varint,2,opt,name=ecdsa,proto3" json:"ecdsa,omitempty"` - EcOp uint32 `protobuf:"varint,3,opt,name=ec_op,json=ecOp,proto3" json:"ec_op,omitempty"` - Pedersen uint32 `protobuf:"varint,4,opt,name=pedersen,proto3" json:"pedersen,omitempty"` - RangeCheck uint32 `protobuf:"varint,5,opt,name=range_check,json=rangeCheck,proto3" json:"range_check,omitempty"` - Poseidon uint32 `protobuf:"varint,6,opt,name=poseidon,proto3" json:"poseidon,omitempty"` - Keccak uint32 `protobuf:"varint,7,opt,name=keccak,proto3" json:"keccak,omitempty"` - Output uint32 `protobuf:"varint,8,opt,name=output,proto3" json:"output,omitempty"` - AddMod uint32 `protobuf:"varint,9,opt,name=add_mod,json=addMod,proto3" json:"add_mod,omitempty"` - MulMod uint32 `protobuf:"varint,10,opt,name=mul_mod,json=mulMod,proto3" json:"mul_mod,omitempty"` - RangeCheck96 uint32 `protobuf:"varint,11,opt,name=range_check96,json=rangeCheck96,proto3" json:"range_check96,omitempty"` -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) Reset() { - *x = Receipt_ExecutionResources_BuiltinCounter{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_receipt_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Receipt_ExecutionResources_BuiltinCounter) ProtoMessage() {} - -func (x *Receipt_ExecutionResources_BuiltinCounter) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_receipt_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Receipt_ExecutionResources_BuiltinCounter.ProtoReflect.Descriptor instead. -func (*Receipt_ExecutionResources_BuiltinCounter) Descriptor() ([]byte, []int) { - return file_p2p_proto_receipt_proto_rawDescGZIP(), []int{2, 0, 0} -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetBitwise() uint32 { - if x != nil { - return x.Bitwise - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetEcdsa() uint32 { - if x != nil { - return x.Ecdsa - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetEcOp() uint32 { - if x != nil { - return x.EcOp - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetPedersen() uint32 { - if x != nil { - return x.Pedersen - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetRangeCheck() uint32 { - if x != nil { - return x.RangeCheck - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetPoseidon() uint32 { - if x != nil { - return x.Poseidon - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetKeccak() uint32 { - if x != nil { - return x.Keccak - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetOutput() uint32 { - if x != nil { - return x.Output - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetAddMod() uint32 { - if x != nil { - return x.AddMod - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetMulMod() uint32 { - if x != nil { - return x.MulMod - } - return 0 -} - -func (x *Receipt_ExecutionResources_BuiltinCounter) GetRangeCheck96() uint32 { - if x != nil { - return x.RangeCheck96 - } - return 0 -} - -var File_p2p_proto_receipt_proto protoreflect.FileDescriptor - -var file_p2p_proto_receipt_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x32, 0x70, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x4c, - 0x31, 0x12, 0x2b, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 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, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, - 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x41, 0x64, 0x64, 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, 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, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x6c, 0x31, 0x5f, - 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x4c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x31, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x2c, - 0x0a, 0x07, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, - 0x65, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x12, 0x3e, 0x0a, 0x11, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, - 0x74, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x48, 0x00, 0x52, 0x10, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x3f, 0x0a, 0x0e, - 0x64, 0x65, 0x70, 0x6c, 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, 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, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x52, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x74, 0x65, - 0x70, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x6c, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x48, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x6c, 0x31, 0x5f, 0x67, 0x61, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 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, 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, 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, 0x31, 0x5a, 0x2f, 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, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x73, - 0x70, 0x65, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_p2p_proto_receipt_proto_rawDescOnce sync.Once - file_p2p_proto_receipt_proto_rawDescData = file_p2p_proto_receipt_proto_rawDesc -) - -func file_p2p_proto_receipt_proto_rawDescGZIP() []byte { - file_p2p_proto_receipt_proto_rawDescOnce.Do(func() { - file_p2p_proto_receipt_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_proto_receipt_proto_rawDescData) - }) - return file_p2p_proto_receipt_proto_rawDescData -} - -var file_p2p_proto_receipt_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_p2p_proto_receipt_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_p2p_proto_receipt_proto_goTypes = []any{ - (PriceUnit)(0), // 0: PriceUnit - (*MessageToL1)(nil), // 1: MessageToL1 - (*EthereumAddress)(nil), // 2: EthereumAddress - (*Receipt)(nil), // 3: Receipt - (*Receipt_ExecutionResources)(nil), // 4: Receipt.ExecutionResources - (*Receipt_Common)(nil), // 5: Receipt.Common - (*Receipt_Invoke)(nil), // 6: Receipt.Invoke - (*Receipt_L1Handler)(nil), // 7: Receipt.L1Handler - (*Receipt_Declare)(nil), // 8: Receipt.Declare - (*Receipt_Deploy)(nil), // 9: Receipt.Deploy - (*Receipt_DeployAccount)(nil), // 10: Receipt.DeployAccount - (*Receipt_ExecutionResources_BuiltinCounter)(nil), // 11: Receipt.ExecutionResources.BuiltinCounter - (*Felt252)(nil), // 12: Felt252 - (*Hash256)(nil), // 13: Hash256 -} -var file_p2p_proto_receipt_proto_depIdxs = []int32{ - 12, // 0: MessageToL1.from_address:type_name -> Felt252 - 12, // 1: MessageToL1.payload:type_name -> Felt252 - 2, // 2: MessageToL1.to_address:type_name -> EthereumAddress - 6, // 3: Receipt.invoke:type_name -> Receipt.Invoke - 7, // 4: Receipt.l1_handler:type_name -> Receipt.L1Handler - 8, // 5: Receipt.declare:type_name -> Receipt.Declare - 9, // 6: Receipt.deprecated_deploy:type_name -> Receipt.Deploy - 10, // 7: Receipt.deploy_account:type_name -> Receipt.DeployAccount - 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 -} - -func init() { file_p2p_proto_receipt_proto_init() } -func file_p2p_proto_receipt_proto_init() { - if File_p2p_proto_receipt_proto != nil { - return - } - file_p2p_proto_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_p2p_proto_receipt_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*MessageToL1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*EthereumAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Receipt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Receipt_ExecutionResources); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Receipt_Common); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Receipt_Invoke); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*Receipt_L1Handler); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Receipt_Declare); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Receipt_Deploy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Receipt_DeployAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_receipt_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Receipt_ExecutionResources_BuiltinCounter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_p2p_proto_receipt_proto_msgTypes[2].OneofWrappers = []any{ - (*Receipt_Invoke_)(nil), - (*Receipt_L1Handler_)(nil), - (*Receipt_Declare_)(nil), - (*Receipt_DeprecatedDeploy)(nil), - (*Receipt_DeployAccount_)(nil), - } - file_p2p_proto_receipt_proto_msgTypes[4].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_p2p_proto_receipt_proto_rawDesc, - NumEnums: 1, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_p2p_proto_receipt_proto_goTypes, - DependencyIndexes: file_p2p_proto_receipt_proto_depIdxs, - EnumInfos: file_p2p_proto_receipt_proto_enumTypes, - MessageInfos: file_p2p_proto_receipt_proto_msgTypes, - }.Build() - File_p2p_proto_receipt_proto = out.File - file_p2p_proto_receipt_proto_rawDesc = nil - file_p2p_proto_receipt_proto_goTypes = nil - file_p2p_proto_receipt_proto_depIdxs = nil -} diff --git a/p2p/starknet/spec/state.pb.go b/p2p/starknet/spec/state.pb.go deleted file mode 100644 index c230a042b3..0000000000 --- a/p2p/starknet/spec/state.pb.go +++ /dev/null @@ -1,555 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 -// source: p2p/proto/state.proto - -package spec - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// optimized for flat storage, not through a trie (not sharing key prefixes) -type ContractStoredValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key *Felt252 `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value *Felt252 `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *ContractStoredValue) Reset() { - *x = ContractStoredValue{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContractStoredValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContractStoredValue) ProtoMessage() {} - -func (x *ContractStoredValue) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_state_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContractStoredValue.ProtoReflect.Descriptor instead. -func (*ContractStoredValue) Descriptor() ([]byte, []int) { - return file_p2p_proto_state_proto_rawDescGZIP(), []int{0} -} - -func (x *ContractStoredValue) GetKey() *Felt252 { - if x != nil { - return x.Key - } - return nil -} - -func (x *ContractStoredValue) GetValue() *Felt252 { - if x != nil { - return x.Value - } - return nil -} - -type ContractDiff struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Nonce *Felt252 `protobuf:"bytes,2,opt,name=nonce,proto3,oneof" json:"nonce,omitempty"` // Present only if the nonce was updated - ClassHash *Hash `protobuf:"bytes,3,opt,name=class_hash,json=classHash,proto3,oneof" json:"class_hash,omitempty"` // Present only if the contract was deployed or replaced in this block. - Values []*ContractStoredValue `protobuf:"bytes,4,rep,name=values,proto3" json:"values,omitempty"` - Domain VolitionDomain `protobuf:"varint,5,opt,name=domain,proto3,enum=VolitionDomain" json:"domain,omitempty"` -} - -func (x *ContractDiff) Reset() { - *x = ContractDiff{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContractDiff) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContractDiff) ProtoMessage() {} - -func (x *ContractDiff) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_state_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ContractDiff.ProtoReflect.Descriptor instead. -func (*ContractDiff) Descriptor() ([]byte, []int) { - return file_p2p_proto_state_proto_rawDescGZIP(), []int{1} -} - -func (x *ContractDiff) GetAddress() *Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *ContractDiff) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *ContractDiff) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *ContractDiff) GetValues() []*ContractStoredValue { - if x != nil { - return x.Values - } - return nil -} - -func (x *ContractDiff) GetDomain() VolitionDomain { - if x != nil { - return x.Domain - } - return VolitionDomain_L1 -} - -type DeclaredClass struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassHash *Hash `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - CompiledClassHash *Hash `protobuf:"bytes,2,opt,name=compiled_class_hash,json=compiledClassHash,proto3,oneof" json:"compiled_class_hash,omitempty"` // Present only if the class is Cairo1 -} - -func (x *DeclaredClass) Reset() { - *x = DeclaredClass{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_state_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeclaredClass) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeclaredClass) ProtoMessage() {} - -func (x *DeclaredClass) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_state_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeclaredClass.ProtoReflect.Descriptor instead. -func (*DeclaredClass) Descriptor() ([]byte, []int) { - return file_p2p_proto_state_proto_rawDescGZIP(), []int{2} -} - -func (x *DeclaredClass) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *DeclaredClass) GetCompiledClassHash() *Hash { - if x != nil { - return x.CompiledClassHash - } - return nil -} - -type StateDiffsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` -} - -func (x *StateDiffsRequest) Reset() { - *x = StateDiffsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_state_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateDiffsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateDiffsRequest) ProtoMessage() {} - -func (x *StateDiffsRequest) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_state_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StateDiffsRequest.ProtoReflect.Descriptor instead. -func (*StateDiffsRequest) Descriptor() ([]byte, []int) { - return file_p2p_proto_state_proto_rawDescGZIP(), []int{3} -} - -func (x *StateDiffsRequest) GetIteration() *Iteration { - if x != nil { - return x.Iteration - } - return nil -} - -// Responses are sent ordered by the order given in the request. -type StateDiffsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // All of the messages related to a block need to be sent before a message from the next block is sent. - // - // Types that are assignable to StateDiffMessage: - // - // *StateDiffsResponse_ContractDiff - // *StateDiffsResponse_DeclaredClass - // *StateDiffsResponse_Fin - StateDiffMessage isStateDiffsResponse_StateDiffMessage `protobuf_oneof:"state_diff_message"` -} - -func (x *StateDiffsResponse) Reset() { - *x = StateDiffsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_state_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StateDiffsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StateDiffsResponse) ProtoMessage() {} - -func (x *StateDiffsResponse) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_state_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StateDiffsResponse.ProtoReflect.Descriptor instead. -func (*StateDiffsResponse) Descriptor() ([]byte, []int) { - return file_p2p_proto_state_proto_rawDescGZIP(), []int{4} -} - -func (m *StateDiffsResponse) GetStateDiffMessage() isStateDiffsResponse_StateDiffMessage { - if m != nil { - return m.StateDiffMessage - } - return nil -} - -func (x *StateDiffsResponse) GetContractDiff() *ContractDiff { - if x, ok := x.GetStateDiffMessage().(*StateDiffsResponse_ContractDiff); ok { - return x.ContractDiff - } - return nil -} - -func (x *StateDiffsResponse) GetDeclaredClass() *DeclaredClass { - if x, ok := x.GetStateDiffMessage().(*StateDiffsResponse_DeclaredClass); ok { - return x.DeclaredClass - } - return nil -} - -func (x *StateDiffsResponse) GetFin() *Fin { - if x, ok := x.GetStateDiffMessage().(*StateDiffsResponse_Fin); ok { - return x.Fin - } - return nil -} - -type isStateDiffsResponse_StateDiffMessage interface { - isStateDiffsResponse_StateDiffMessage() -} - -type StateDiffsResponse_ContractDiff struct { - ContractDiff *ContractDiff `protobuf:"bytes,1,opt,name=contract_diff,json=contractDiff,proto3,oneof"` // Multiple contract diffs for the same contract may appear continuously if the diff is too large or if it's more convenient. -} - -type StateDiffsResponse_DeclaredClass struct { - DeclaredClass *DeclaredClass `protobuf:"bytes,2,opt,name=declared_class,json=declaredClass,proto3,oneof"` -} - -type StateDiffsResponse_Fin struct { - Fin *Fin `protobuf:"bytes,3,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its state diff. -} - -func (*StateDiffsResponse_ContractDiff) isStateDiffsResponse_StateDiffMessage() {} - -func (*StateDiffsResponse_DeclaredClass) isStateDiffsResponse_StateDiffMessage() {} - -func (*StateDiffsResponse_Fin) isStateDiffsResponse_StateDiffMessage() {} - -var File_p2p_proto_state_proto protoreflect.FileDescriptor - -var file_p2p_proto_state_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x51, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0xf2, 0x01, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x44, - 0x69, 0x66, 0x66, 0x12, 0x22, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, - 0x48, 0x00, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x29, 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, 0x48, 0x01, 0x52, 0x09, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x48, 0x61, 0x73, 0x68, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x56, 0x6f, 0x6c, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x08, - 0x0a, 0x06, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x63, 0x6c, - 0x61, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 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, - 0x3a, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x48, - 0x61, 0x73, 0x68, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x48, 0x61, 0x73, 0x68, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, 0x14, 0x5f, - 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x22, 0x3d, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, - 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, 0xb3, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x48, - 0x00, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x12, - 0x37, 0x0a, 0x0e, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, - 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x63, 0x6c, 0x61, - 0x72, 0x65, 0x64, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x03, 0x66, 0x69, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x46, 0x69, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x66, - 0x69, 0x6e, 0x42, 0x14, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x69, 0x66, 0x66, - 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x31, 0x5a, 0x2f, 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, 0x73, 0x74, - 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x70, 0x65, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_p2p_proto_state_proto_rawDescOnce sync.Once - file_p2p_proto_state_proto_rawDescData = file_p2p_proto_state_proto_rawDesc -) - -func file_p2p_proto_state_proto_rawDescGZIP() []byte { - file_p2p_proto_state_proto_rawDescOnce.Do(func() { - file_p2p_proto_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_proto_state_proto_rawDescData) - }) - return file_p2p_proto_state_proto_rawDescData -} - -var file_p2p_proto_state_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_p2p_proto_state_proto_goTypes = []any{ - (*ContractStoredValue)(nil), // 0: ContractStoredValue - (*ContractDiff)(nil), // 1: ContractDiff - (*DeclaredClass)(nil), // 2: DeclaredClass - (*StateDiffsRequest)(nil), // 3: StateDiffsRequest - (*StateDiffsResponse)(nil), // 4: StateDiffsResponse - (*Felt252)(nil), // 5: Felt252 - (*Address)(nil), // 6: Address - (*Hash)(nil), // 7: Hash - (VolitionDomain)(0), // 8: VolitionDomain - (*Iteration)(nil), // 9: Iteration - (*Fin)(nil), // 10: Fin -} -var file_p2p_proto_state_proto_depIdxs = []int32{ - 5, // 0: ContractStoredValue.key:type_name -> Felt252 - 5, // 1: ContractStoredValue.value:type_name -> Felt252 - 6, // 2: ContractDiff.address:type_name -> Address - 5, // 3: ContractDiff.nonce:type_name -> Felt252 - 7, // 4: ContractDiff.class_hash:type_name -> Hash - 0, // 5: ContractDiff.values:type_name -> ContractStoredValue - 8, // 6: ContractDiff.domain:type_name -> VolitionDomain - 7, // 7: DeclaredClass.class_hash:type_name -> Hash - 7, // 8: DeclaredClass.compiled_class_hash:type_name -> Hash - 9, // 9: StateDiffsRequest.iteration:type_name -> Iteration - 1, // 10: StateDiffsResponse.contract_diff:type_name -> ContractDiff - 2, // 11: StateDiffsResponse.declared_class:type_name -> DeclaredClass - 10, // 12: StateDiffsResponse.fin:type_name -> Fin - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_p2p_proto_state_proto_init() } -func file_p2p_proto_state_proto_init() { - if File_p2p_proto_state_proto != nil { - return - } - file_p2p_proto_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_p2p_proto_state_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ContractStoredValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_state_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ContractDiff); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_state_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DeclaredClass); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_state_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*StateDiffsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_state_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*StateDiffsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_p2p_proto_state_proto_msgTypes[1].OneofWrappers = []any{} - file_p2p_proto_state_proto_msgTypes[2].OneofWrappers = []any{} - file_p2p_proto_state_proto_msgTypes[4].OneofWrappers = []any{ - (*StateDiffsResponse_ContractDiff)(nil), - (*StateDiffsResponse_DeclaredClass)(nil), - (*StateDiffsResponse_Fin)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_p2p_proto_state_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_p2p_proto_state_proto_goTypes, - DependencyIndexes: file_p2p_proto_state_proto_depIdxs, - MessageInfos: file_p2p_proto_state_proto_msgTypes, - }.Build() - File_p2p_proto_state_proto = out.File - file_p2p_proto_state_proto_rawDesc = nil - file_p2p_proto_state_proto_goTypes = nil - file_p2p_proto_state_proto_depIdxs = nil -} diff --git a/p2p/starknet/spec/transaction.pb.go b/p2p/starknet/spec/transaction.pb.go deleted file mode 100644 index ecd18338b3..0000000000 --- a/p2p/starknet/spec/transaction.pb.go +++ /dev/null @@ -1,2337 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 -// source: p2p/proto/transaction.proto - -package spec - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ResourceLimits struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxAmount *Felt252 `protobuf:"bytes,1,opt,name=max_amount,json=maxAmount,proto3" json:"max_amount,omitempty"` - MaxPricePerUnit *Felt252 `protobuf:"bytes,2,opt,name=max_price_per_unit,json=maxPricePerUnit,proto3" json:"max_price_per_unit,omitempty"` -} - -func (x *ResourceLimits) Reset() { - *x = ResourceLimits{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceLimits) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceLimits) ProtoMessage() {} - -func (x *ResourceLimits) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceLimits.ProtoReflect.Descriptor instead. -func (*ResourceLimits) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{0} -} - -func (x *ResourceLimits) GetMaxAmount() *Felt252 { - if x != nil { - return x.MaxAmount - } - return nil -} - -func (x *ResourceLimits) GetMaxPricePerUnit() *Felt252 { - if x != nil { - return x.MaxPricePerUnit - } - return nil -} - -type ResourceBounds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - 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"` -} - -func (x *ResourceBounds) Reset() { - *x = ResourceBounds{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceBounds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceBounds) ProtoMessage() {} - -func (x *ResourceBounds) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceBounds.ProtoReflect.Descriptor instead. -func (*ResourceBounds) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{1} -} - -func (x *ResourceBounds) GetL1Gas() *ResourceLimits { - if x != nil { - return x.L1Gas - } - return nil -} - -func (x *ResourceBounds) GetL2Gas() *ResourceLimits { - if x != nil { - return x.L2Gas - } - return nil -} - -type AccountSignature struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Parts []*Felt252 `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts,omitempty"` -} - -func (x *AccountSignature) Reset() { - *x = AccountSignature{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountSignature) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountSignature) ProtoMessage() {} - -func (x *AccountSignature) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccountSignature.ProtoReflect.Descriptor instead. -func (*AccountSignature) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{2} -} - -func (x *AccountSignature) GetParts() []*Felt252 { - if x != nil { - return x.Parts - } - return nil -} - -// This is a transaction that is already accepted in a block. Once we have a mempool, we will define -// a separate message for BroadcastedTransaction. -type Transaction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Txn: - // - // *Transaction_DeclareV0_ - // *Transaction_DeclareV1_ - // *Transaction_DeclareV2_ - // *Transaction_DeclareV3_ - // *Transaction_Deploy_ - // *Transaction_DeployAccountV1_ - // *Transaction_DeployAccountV3_ - // *Transaction_InvokeV0_ - // *Transaction_InvokeV1_ - // *Transaction_InvokeV3_ - // *Transaction_L1Handler - Txn isTransaction_Txn `protobuf_oneof:"txn"` - TransactionHash *Hash `protobuf:"bytes,12,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` -} - -func (x *Transaction) Reset() { - *x = Transaction{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction) ProtoMessage() {} - -func (x *Transaction) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. -func (*Transaction) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3} -} - -func (m *Transaction) GetTxn() isTransaction_Txn { - if m != nil { - return m.Txn - } - return nil -} - -func (x *Transaction) GetDeclareV0() *Transaction_DeclareV0 { - if x, ok := x.GetTxn().(*Transaction_DeclareV0_); ok { - return x.DeclareV0 - } - return nil -} - -func (x *Transaction) GetDeclareV1() *Transaction_DeclareV1 { - if x, ok := x.GetTxn().(*Transaction_DeclareV1_); ok { - return x.DeclareV1 - } - return nil -} - -func (x *Transaction) GetDeclareV2() *Transaction_DeclareV2 { - if x, ok := x.GetTxn().(*Transaction_DeclareV2_); ok { - return x.DeclareV2 - } - return nil -} - -func (x *Transaction) GetDeclareV3() *Transaction_DeclareV3 { - if x, ok := x.GetTxn().(*Transaction_DeclareV3_); ok { - return x.DeclareV3 - } - return nil -} - -func (x *Transaction) GetDeploy() *Transaction_Deploy { - if x, ok := x.GetTxn().(*Transaction_Deploy_); ok { - return x.Deploy - } - return nil -} - -func (x *Transaction) GetDeployAccountV1() *Transaction_DeployAccountV1 { - if x, ok := x.GetTxn().(*Transaction_DeployAccountV1_); ok { - return x.DeployAccountV1 - } - return nil -} - -func (x *Transaction) GetDeployAccountV3() *Transaction_DeployAccountV3 { - if x, ok := x.GetTxn().(*Transaction_DeployAccountV3_); ok { - return x.DeployAccountV3 - } - return nil -} - -func (x *Transaction) GetInvokeV0() *Transaction_InvokeV0 { - if x, ok := x.GetTxn().(*Transaction_InvokeV0_); ok { - return x.InvokeV0 - } - return nil -} - -func (x *Transaction) GetInvokeV1() *Transaction_InvokeV1 { - if x, ok := x.GetTxn().(*Transaction_InvokeV1_); ok { - return x.InvokeV1 - } - return nil -} - -func (x *Transaction) GetInvokeV3() *Transaction_InvokeV3 { - if x, ok := x.GetTxn().(*Transaction_InvokeV3_); ok { - return x.InvokeV3 - } - return nil -} - -func (x *Transaction) GetL1Handler() *Transaction_L1HandlerV0 { - if x, ok := x.GetTxn().(*Transaction_L1Handler); ok { - return x.L1Handler - } - return nil -} - -func (x *Transaction) GetTransactionHash() *Hash { - if x != nil { - return x.TransactionHash - } - return nil -} - -type isTransaction_Txn interface { - isTransaction_Txn() -} - -type Transaction_DeclareV0_ struct { - DeclareV0 *Transaction_DeclareV0 `protobuf:"bytes,1,opt,name=declare_v0,json=declareV0,proto3,oneof"` -} - -type Transaction_DeclareV1_ struct { - DeclareV1 *Transaction_DeclareV1 `protobuf:"bytes,2,opt,name=declare_v1,json=declareV1,proto3,oneof"` -} - -type Transaction_DeclareV2_ struct { - DeclareV2 *Transaction_DeclareV2 `protobuf:"bytes,3,opt,name=declare_v2,json=declareV2,proto3,oneof"` -} - -type Transaction_DeclareV3_ struct { - DeclareV3 *Transaction_DeclareV3 `protobuf:"bytes,4,opt,name=declare_v3,json=declareV3,proto3,oneof"` -} - -type Transaction_Deploy_ struct { - Deploy *Transaction_Deploy `protobuf:"bytes,5,opt,name=deploy,proto3,oneof"` -} - -type Transaction_DeployAccountV1_ struct { - DeployAccountV1 *Transaction_DeployAccountV1 `protobuf:"bytes,6,opt,name=deploy_account_v1,json=deployAccountV1,proto3,oneof"` -} - -type Transaction_DeployAccountV3_ struct { - DeployAccountV3 *Transaction_DeployAccountV3 `protobuf:"bytes,7,opt,name=deploy_account_v3,json=deployAccountV3,proto3,oneof"` -} - -type Transaction_InvokeV0_ struct { - InvokeV0 *Transaction_InvokeV0 `protobuf:"bytes,8,opt,name=invoke_v0,json=invokeV0,proto3,oneof"` -} - -type Transaction_InvokeV1_ struct { - InvokeV1 *Transaction_InvokeV1 `protobuf:"bytes,9,opt,name=invoke_v1,json=invokeV1,proto3,oneof"` -} - -type Transaction_InvokeV3_ struct { - InvokeV3 *Transaction_InvokeV3 `protobuf:"bytes,10,opt,name=invoke_v3,json=invokeV3,proto3,oneof"` -} - -type Transaction_L1Handler struct { - L1Handler *Transaction_L1HandlerV0 `protobuf:"bytes,11,opt,name=l1_handler,json=l1Handler,proto3,oneof"` -} - -func (*Transaction_DeclareV0_) isTransaction_Txn() {} - -func (*Transaction_DeclareV1_) isTransaction_Txn() {} - -func (*Transaction_DeclareV2_) isTransaction_Txn() {} - -func (*Transaction_DeclareV3_) isTransaction_Txn() {} - -func (*Transaction_Deploy_) isTransaction_Txn() {} - -func (*Transaction_DeployAccountV1_) isTransaction_Txn() {} - -func (*Transaction_DeployAccountV3_) isTransaction_Txn() {} - -func (*Transaction_InvokeV0_) isTransaction_Txn() {} - -func (*Transaction_InvokeV1_) isTransaction_Txn() {} - -func (*Transaction_InvokeV3_) isTransaction_Txn() {} - -func (*Transaction_L1Handler) isTransaction_Txn() {} - -type TransactionWithReceipt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` - Receipt *Receipt `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` -} - -func (x *TransactionWithReceipt) Reset() { - *x = TransactionWithReceipt{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransactionWithReceipt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransactionWithReceipt) ProtoMessage() {} - -func (x *TransactionWithReceipt) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransactionWithReceipt.ProtoReflect.Descriptor instead. -func (*TransactionWithReceipt) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{4} -} - -func (x *TransactionWithReceipt) GetTransaction() *Transaction { - if x != nil { - return x.Transaction - } - return nil -} - -func (x *TransactionWithReceipt) GetReceipt() *Receipt { - if x != nil { - return x.Receipt - } - return nil -} - -// TBD: can support a flag to return tx hashes only, good for standalone mempool to remove them, -// or any node that keeps track of transaction streaming in the consensus. -type TransactionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Iteration *Iteration `protobuf:"bytes,1,opt,name=iteration,proto3" json:"iteration,omitempty"` -} - -func (x *TransactionsRequest) Reset() { - *x = TransactionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransactionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransactionsRequest) ProtoMessage() {} - -func (x *TransactionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransactionsRequest.ProtoReflect.Descriptor instead. -func (*TransactionsRequest) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{5} -} - -func (x *TransactionsRequest) GetIteration() *Iteration { - if x != nil { - return x.Iteration - } - return nil -} - -// Responses are sent ordered by the order given in the request. The order inside each block is -// according to the execution order. -type TransactionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to TransactionMessage: - // - // *TransactionsResponse_TransactionWithReceipt - // *TransactionsResponse_Fin - TransactionMessage isTransactionsResponse_TransactionMessage `protobuf_oneof:"transaction_message"` -} - -func (x *TransactionsResponse) Reset() { - *x = TransactionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransactionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransactionsResponse) ProtoMessage() {} - -func (x *TransactionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransactionsResponse.ProtoReflect.Descriptor instead. -func (*TransactionsResponse) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{6} -} - -func (m *TransactionsResponse) GetTransactionMessage() isTransactionsResponse_TransactionMessage { - if m != nil { - return m.TransactionMessage - } - return nil -} - -func (x *TransactionsResponse) GetTransactionWithReceipt() *TransactionWithReceipt { - if x, ok := x.GetTransactionMessage().(*TransactionsResponse_TransactionWithReceipt); ok { - return x.TransactionWithReceipt - } - return nil -} - -func (x *TransactionsResponse) GetFin() *Fin { - if x, ok := x.GetTransactionMessage().(*TransactionsResponse_Fin); ok { - return x.Fin - } - return nil -} - -type isTransactionsResponse_TransactionMessage interface { - isTransactionsResponse_TransactionMessage() -} - -type TransactionsResponse_TransactionWithReceipt struct { - TransactionWithReceipt *TransactionWithReceipt `protobuf:"bytes,1,opt,name=transaction_with_receipt,json=transactionWithReceipt,proto3,oneof"` -} - -type TransactionsResponse_Fin struct { - Fin *Fin `protobuf:"bytes,2,opt,name=fin,proto3,oneof"` // Fin is sent after the peer sent all the data or when it encountered a block that it doesn't have its transactions. -} - -func (*TransactionsResponse_TransactionWithReceipt) isTransactionsResponse_TransactionMessage() {} - -func (*TransactionsResponse_Fin) isTransactionsResponse_TransactionMessage() {} - -type Transactions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` -} - -func (x *Transactions) Reset() { - *x = Transactions{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transactions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transactions) ProtoMessage() {} - -func (x *Transactions) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transactions.ProtoReflect.Descriptor instead. -func (*Transactions) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{7} -} - -func (x *Transactions) GetTransactions() []*Transaction { - if x != nil { - return x.Transactions - } - return nil -} - -type Transaction_DeclareV0 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MaxFee *Felt252 `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - Signature *AccountSignature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - ClassHash *Hash `protobuf:"bytes,4,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` -} - -func (x *Transaction_DeclareV0) Reset() { - *x = Transaction_DeclareV0{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_DeclareV0) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_DeclareV0) ProtoMessage() {} - -func (x *Transaction_DeclareV0) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_DeclareV0.ProtoReflect.Descriptor instead. -func (*Transaction_DeclareV0) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *Transaction_DeclareV0) GetSender() *Address { - if x != nil { - return x.Sender - } - return nil -} - -func (x *Transaction_DeclareV0) GetMaxFee() *Felt252 { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *Transaction_DeclareV0) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_DeclareV0) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -type Transaction_DeclareV1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MaxFee *Felt252 `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - Signature *AccountSignature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - ClassHash *Hash `protobuf:"bytes,4,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - Nonce *Felt252 `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (x *Transaction_DeclareV1) Reset() { - *x = Transaction_DeclareV1{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_DeclareV1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_DeclareV1) ProtoMessage() {} - -func (x *Transaction_DeclareV1) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_DeclareV1.ProtoReflect.Descriptor instead. -func (*Transaction_DeclareV1) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 1} -} - -func (x *Transaction_DeclareV1) GetSender() *Address { - if x != nil { - return x.Sender - } - return nil -} - -func (x *Transaction_DeclareV1) GetMaxFee() *Felt252 { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *Transaction_DeclareV1) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_DeclareV1) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *Transaction_DeclareV1) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -type Transaction_DeclareV2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MaxFee *Felt252 `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - Signature *AccountSignature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - ClassHash *Hash `protobuf:"bytes,4,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - Nonce *Felt252 `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` - CompiledClassHash *Hash `protobuf:"bytes,6,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` -} - -func (x *Transaction_DeclareV2) Reset() { - *x = Transaction_DeclareV2{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_DeclareV2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_DeclareV2) ProtoMessage() {} - -func (x *Transaction_DeclareV2) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_DeclareV2.ProtoReflect.Descriptor instead. -func (*Transaction_DeclareV2) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 2} -} - -func (x *Transaction_DeclareV2) GetSender() *Address { - if x != nil { - return x.Sender - } - return nil -} - -func (x *Transaction_DeclareV2) GetMaxFee() *Felt252 { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *Transaction_DeclareV2) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_DeclareV2) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *Transaction_DeclareV2) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *Transaction_DeclareV2) GetCompiledClassHash() *Hash { - if x != nil { - return x.CompiledClassHash - } - return nil -} - -// see https://external.integration.starknet.io/feeder_gateway/get_transaction?transactionHash=0x41d1f5206ef58a443e7d3d1ca073171ec25fa75313394318fc83a074a6631c3 -type Transaction_DeclareV3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Signature *AccountSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - ClassHash *Hash `protobuf:"bytes,3,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - Nonce *Felt252 `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` - CompiledClassHash *Hash `protobuf:"bytes,5,opt,name=compiled_class_hash,json=compiledClassHash,proto3" json:"compiled_class_hash,omitempty"` - ResourceBounds *ResourceBounds `protobuf:"bytes,6,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` - Tip uint64 `protobuf:"varint,7,opt,name=tip,proto3" json:"tip,omitempty"` - PaymasterData []*Felt252 `protobuf:"bytes,8,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` - AccountDeploymentData []*Felt252 `protobuf:"bytes,9,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` - NonceDataAvailabilityMode VolitionDomain `protobuf:"varint,10,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=VolitionDomain" json:"nonce_data_availability_mode,omitempty"` - FeeDataAvailabilityMode VolitionDomain `protobuf:"varint,11,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=VolitionDomain" json:"fee_data_availability_mode,omitempty"` -} - -func (x *Transaction_DeclareV3) Reset() { - *x = Transaction_DeclareV3{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_DeclareV3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_DeclareV3) ProtoMessage() {} - -func (x *Transaction_DeclareV3) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_DeclareV3.ProtoReflect.Descriptor instead. -func (*Transaction_DeclareV3) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 3} -} - -func (x *Transaction_DeclareV3) GetSender() *Address { - if x != nil { - return x.Sender - } - return nil -} - -func (x *Transaction_DeclareV3) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_DeclareV3) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *Transaction_DeclareV3) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *Transaction_DeclareV3) GetCompiledClassHash() *Hash { - if x != nil { - return x.CompiledClassHash - } - return nil -} - -func (x *Transaction_DeclareV3) GetResourceBounds() *ResourceBounds { - if x != nil { - return x.ResourceBounds - } - return nil -} - -func (x *Transaction_DeclareV3) GetTip() uint64 { - if x != nil { - return x.Tip - } - return 0 -} - -func (x *Transaction_DeclareV3) GetPaymasterData() []*Felt252 { - if x != nil { - return x.PaymasterData - } - return nil -} - -func (x *Transaction_DeclareV3) GetAccountDeploymentData() []*Felt252 { - if x != nil { - return x.AccountDeploymentData - } - return nil -} - -func (x *Transaction_DeclareV3) GetNonceDataAvailabilityMode() VolitionDomain { - if x != nil { - return x.NonceDataAvailabilityMode - } - return VolitionDomain_L1 -} - -func (x *Transaction_DeclareV3) GetFeeDataAvailabilityMode() VolitionDomain { - if x != nil { - return x.FeeDataAvailabilityMode - } - return VolitionDomain_L1 -} - -type Transaction_Deploy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClassHash *Hash `protobuf:"bytes,1,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - AddressSalt *Felt252 `protobuf:"bytes,2,opt,name=address_salt,json=addressSalt,proto3" json:"address_salt,omitempty"` - Calldata []*Felt252 `protobuf:"bytes,3,rep,name=calldata,proto3" json:"calldata,omitempty"` - Version uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *Transaction_Deploy) Reset() { - *x = Transaction_Deploy{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_Deploy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_Deploy) ProtoMessage() {} - -func (x *Transaction_Deploy) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_Deploy.ProtoReflect.Descriptor instead. -func (*Transaction_Deploy) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 4} -} - -func (x *Transaction_Deploy) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *Transaction_Deploy) GetAddressSalt() *Felt252 { - if x != nil { - return x.AddressSalt - } - return nil -} - -func (x *Transaction_Deploy) GetCalldata() []*Felt252 { - if x != nil { - return x.Calldata - } - return nil -} - -func (x *Transaction_Deploy) GetVersion() uint32 { - if x != nil { - return x.Version - } - return 0 -} - -type Transaction_DeployAccountV1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxFee *Felt252 `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - Signature *AccountSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - ClassHash *Hash `protobuf:"bytes,3,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - Nonce *Felt252 `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` - AddressSalt *Felt252 `protobuf:"bytes,5,opt,name=address_salt,json=addressSalt,proto3" json:"address_salt,omitempty"` - Calldata []*Felt252 `protobuf:"bytes,6,rep,name=calldata,proto3" json:"calldata,omitempty"` -} - -func (x *Transaction_DeployAccountV1) Reset() { - *x = Transaction_DeployAccountV1{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_DeployAccountV1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_DeployAccountV1) ProtoMessage() {} - -func (x *Transaction_DeployAccountV1) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_DeployAccountV1.ProtoReflect.Descriptor instead. -func (*Transaction_DeployAccountV1) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 5} -} - -func (x *Transaction_DeployAccountV1) GetMaxFee() *Felt252 { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *Transaction_DeployAccountV1) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_DeployAccountV1) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *Transaction_DeployAccountV1) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *Transaction_DeployAccountV1) GetAddressSalt() *Felt252 { - if x != nil { - return x.AddressSalt - } - return nil -} - -func (x *Transaction_DeployAccountV1) GetCalldata() []*Felt252 { - if x != nil { - return x.Calldata - } - return nil -} - -// see https://external.integration.starknet.io/feeder_gateway/get_transaction?transactionHash=0x29fd7881f14380842414cdfdd8d6c0b1f2174f8916edcfeb1ede1eb26ac3ef0 -type Transaction_DeployAccountV3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Signature *AccountSignature `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` - ClassHash *Hash `protobuf:"bytes,2,opt,name=class_hash,json=classHash,proto3" json:"class_hash,omitempty"` - Nonce *Felt252 `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` - AddressSalt *Felt252 `protobuf:"bytes,4,opt,name=address_salt,json=addressSalt,proto3" json:"address_salt,omitempty"` - Calldata []*Felt252 `protobuf:"bytes,5,rep,name=calldata,proto3" json:"calldata,omitempty"` - ResourceBounds *ResourceBounds `protobuf:"bytes,6,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` - Tip uint64 `protobuf:"varint,7,opt,name=tip,proto3" json:"tip,omitempty"` - PaymasterData []*Felt252 `protobuf:"bytes,8,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` - NonceDataAvailabilityMode VolitionDomain `protobuf:"varint,9,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=VolitionDomain" json:"nonce_data_availability_mode,omitempty"` - FeeDataAvailabilityMode VolitionDomain `protobuf:"varint,10,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=VolitionDomain" json:"fee_data_availability_mode,omitempty"` -} - -func (x *Transaction_DeployAccountV3) Reset() { - *x = Transaction_DeployAccountV3{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_DeployAccountV3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_DeployAccountV3) ProtoMessage() {} - -func (x *Transaction_DeployAccountV3) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_DeployAccountV3.ProtoReflect.Descriptor instead. -func (*Transaction_DeployAccountV3) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 6} -} - -func (x *Transaction_DeployAccountV3) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_DeployAccountV3) GetClassHash() *Hash { - if x != nil { - return x.ClassHash - } - return nil -} - -func (x *Transaction_DeployAccountV3) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *Transaction_DeployAccountV3) GetAddressSalt() *Felt252 { - if x != nil { - return x.AddressSalt - } - return nil -} - -func (x *Transaction_DeployAccountV3) GetCalldata() []*Felt252 { - if x != nil { - return x.Calldata - } - return nil -} - -func (x *Transaction_DeployAccountV3) GetResourceBounds() *ResourceBounds { - if x != nil { - return x.ResourceBounds - } - return nil -} - -func (x *Transaction_DeployAccountV3) GetTip() uint64 { - if x != nil { - return x.Tip - } - return 0 -} - -func (x *Transaction_DeployAccountV3) GetPaymasterData() []*Felt252 { - if x != nil { - return x.PaymasterData - } - return nil -} - -func (x *Transaction_DeployAccountV3) GetNonceDataAvailabilityMode() VolitionDomain { - if x != nil { - return x.NonceDataAvailabilityMode - } - return VolitionDomain_L1 -} - -func (x *Transaction_DeployAccountV3) GetFeeDataAvailabilityMode() VolitionDomain { - if x != nil { - return x.FeeDataAvailabilityMode - } - return VolitionDomain_L1 -} - -type Transaction_InvokeV0 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxFee *Felt252 `protobuf:"bytes,1,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - Signature *AccountSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - Address *Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - EntryPointSelector *Felt252 `protobuf:"bytes,4,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` - Calldata []*Felt252 `protobuf:"bytes,5,rep,name=calldata,proto3" json:"calldata,omitempty"` -} - -func (x *Transaction_InvokeV0) Reset() { - *x = Transaction_InvokeV0{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_InvokeV0) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_InvokeV0) ProtoMessage() {} - -func (x *Transaction_InvokeV0) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_InvokeV0.ProtoReflect.Descriptor instead. -func (*Transaction_InvokeV0) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 7} -} - -func (x *Transaction_InvokeV0) GetMaxFee() *Felt252 { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *Transaction_InvokeV0) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_InvokeV0) GetAddress() *Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *Transaction_InvokeV0) GetEntryPointSelector() *Felt252 { - if x != nil { - return x.EntryPointSelector - } - return nil -} - -func (x *Transaction_InvokeV0) GetCalldata() []*Felt252 { - if x != nil { - return x.Calldata - } - return nil -} - -type Transaction_InvokeV1 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - MaxFee *Felt252 `protobuf:"bytes,2,opt,name=max_fee,json=maxFee,proto3" json:"max_fee,omitempty"` - Signature *AccountSignature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - Calldata []*Felt252 `protobuf:"bytes,4,rep,name=calldata,proto3" json:"calldata,omitempty"` - Nonce *Felt252 `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (x *Transaction_InvokeV1) Reset() { - *x = Transaction_InvokeV1{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_InvokeV1) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_InvokeV1) ProtoMessage() {} - -func (x *Transaction_InvokeV1) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_InvokeV1.ProtoReflect.Descriptor instead. -func (*Transaction_InvokeV1) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 8} -} - -func (x *Transaction_InvokeV1) GetSender() *Address { - if x != nil { - return x.Sender - } - return nil -} - -func (x *Transaction_InvokeV1) GetMaxFee() *Felt252 { - if x != nil { - return x.MaxFee - } - return nil -} - -func (x *Transaction_InvokeV1) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_InvokeV1) GetCalldata() []*Felt252 { - if x != nil { - return x.Calldata - } - return nil -} - -func (x *Transaction_InvokeV1) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -// see https://external.integration.starknet.io/feeder_gateway/get_transaction?transactionHash=0x41906f1c314cca5f43170ea75d3b1904196a10101190d2b12a41cc61cfd17c -type Transaction_InvokeV3 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender *Address `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Signature *AccountSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - Calldata []*Felt252 `protobuf:"bytes,3,rep,name=calldata,proto3" json:"calldata,omitempty"` - ResourceBounds *ResourceBounds `protobuf:"bytes,4,opt,name=resource_bounds,json=resourceBounds,proto3" json:"resource_bounds,omitempty"` - Tip uint64 `protobuf:"varint,5,opt,name=tip,proto3" json:"tip,omitempty"` - PaymasterData []*Felt252 `protobuf:"bytes,6,rep,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` - AccountDeploymentData []*Felt252 `protobuf:"bytes,7,rep,name=account_deployment_data,json=accountDeploymentData,proto3" json:"account_deployment_data,omitempty"` - NonceDataAvailabilityMode VolitionDomain `protobuf:"varint,8,opt,name=nonce_data_availability_mode,json=nonceDataAvailabilityMode,proto3,enum=VolitionDomain" json:"nonce_data_availability_mode,omitempty"` - FeeDataAvailabilityMode VolitionDomain `protobuf:"varint,9,opt,name=fee_data_availability_mode,json=feeDataAvailabilityMode,proto3,enum=VolitionDomain" json:"fee_data_availability_mode,omitempty"` - Nonce *Felt252 `protobuf:"bytes,10,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (x *Transaction_InvokeV3) Reset() { - *x = Transaction_InvokeV3{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_InvokeV3) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_InvokeV3) ProtoMessage() {} - -func (x *Transaction_InvokeV3) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_InvokeV3.ProtoReflect.Descriptor instead. -func (*Transaction_InvokeV3) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 9} -} - -func (x *Transaction_InvokeV3) GetSender() *Address { - if x != nil { - return x.Sender - } - return nil -} - -func (x *Transaction_InvokeV3) GetSignature() *AccountSignature { - if x != nil { - return x.Signature - } - return nil -} - -func (x *Transaction_InvokeV3) GetCalldata() []*Felt252 { - if x != nil { - return x.Calldata - } - return nil -} - -func (x *Transaction_InvokeV3) GetResourceBounds() *ResourceBounds { - if x != nil { - return x.ResourceBounds - } - return nil -} - -func (x *Transaction_InvokeV3) GetTip() uint64 { - if x != nil { - return x.Tip - } - return 0 -} - -func (x *Transaction_InvokeV3) GetPaymasterData() []*Felt252 { - if x != nil { - return x.PaymasterData - } - return nil -} - -func (x *Transaction_InvokeV3) GetAccountDeploymentData() []*Felt252 { - if x != nil { - return x.AccountDeploymentData - } - return nil -} - -func (x *Transaction_InvokeV3) GetNonceDataAvailabilityMode() VolitionDomain { - if x != nil { - return x.NonceDataAvailabilityMode - } - return VolitionDomain_L1 -} - -func (x *Transaction_InvokeV3) GetFeeDataAvailabilityMode() VolitionDomain { - if x != nil { - return x.FeeDataAvailabilityMode - } - return VolitionDomain_L1 -} - -func (x *Transaction_InvokeV3) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -type Transaction_L1HandlerV0 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Nonce *Felt252 `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` - Address *Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - EntryPointSelector *Felt252 `protobuf:"bytes,3,opt,name=entry_point_selector,json=entryPointSelector,proto3" json:"entry_point_selector,omitempty"` - Calldata []*Felt252 `protobuf:"bytes,4,rep,name=calldata,proto3" json:"calldata,omitempty"` -} - -func (x *Transaction_L1HandlerV0) Reset() { - *x = Transaction_L1HandlerV0{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_proto_transaction_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Transaction_L1HandlerV0) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Transaction_L1HandlerV0) ProtoMessage() {} - -func (x *Transaction_L1HandlerV0) ProtoReflect() protoreflect.Message { - mi := &file_p2p_proto_transaction_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Transaction_L1HandlerV0.ProtoReflect.Descriptor instead. -func (*Transaction_L1HandlerV0) Descriptor() ([]byte, []int) { - return file_p2p_proto_transaction_proto_rawDescGZIP(), []int{3, 10} -} - -func (x *Transaction_L1HandlerV0) GetNonce() *Felt252 { - if x != nil { - return x.Nonce - } - return nil -} - -func (x *Transaction_L1HandlerV0) GetAddress() *Address { - if x != nil { - return x.Address - } - return nil -} - -func (x *Transaction_L1HandlerV0) GetEntryPointSelector() *Felt252 { - if x != nil { - return x.EntryPointSelector - } - return nil -} - -func (x *Transaction_L1HandlerV0) GetCalldata() []*Felt252 { - if x != nil { - return x.Calldata - } - return nil -} - -var File_p2p_proto_transaction_proto protoreflect.FileDescriptor - -var file_p2p_proto_transaction_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, - 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x70, 0x32, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, - 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, - 0x12, 0x27, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x6c, 0x74, 0x32, 0x35, 0x32, 0x52, 0x09, - 0x6d, 0x61, 0x78, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x12, 0x6d, 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, 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, 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, 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, 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, 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, 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, 0x31, - 0x5a, 0x2f, 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, 0x73, 0x74, 0x61, 0x72, 0x6b, 0x6e, 0x65, 0x74, 0x2f, 0x73, 0x70, 0x65, - 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_p2p_proto_transaction_proto_rawDescOnce sync.Once - file_p2p_proto_transaction_proto_rawDescData = file_p2p_proto_transaction_proto_rawDesc -) - -func file_p2p_proto_transaction_proto_rawDescGZIP() []byte { - file_p2p_proto_transaction_proto_rawDescOnce.Do(func() { - file_p2p_proto_transaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_p2p_proto_transaction_proto_rawDescData) - }) - return file_p2p_proto_transaction_proto_rawDescData -} - -var file_p2p_proto_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 19) -var file_p2p_proto_transaction_proto_goTypes = []any{ - (*ResourceLimits)(nil), // 0: ResourceLimits - (*ResourceBounds)(nil), // 1: ResourceBounds - (*AccountSignature)(nil), // 2: AccountSignature - (*Transaction)(nil), // 3: Transaction - (*TransactionWithReceipt)(nil), // 4: TransactionWithReceipt - (*TransactionsRequest)(nil), // 5: TransactionsRequest - (*TransactionsResponse)(nil), // 6: TransactionsResponse - (*Transactions)(nil), // 7: Transactions - (*Transaction_DeclareV0)(nil), // 8: Transaction.DeclareV0 - (*Transaction_DeclareV1)(nil), // 9: Transaction.DeclareV1 - (*Transaction_DeclareV2)(nil), // 10: Transaction.DeclareV2 - (*Transaction_DeclareV3)(nil), // 11: Transaction.DeclareV3 - (*Transaction_Deploy)(nil), // 12: Transaction.Deploy - (*Transaction_DeployAccountV1)(nil), // 13: Transaction.DeployAccountV1 - (*Transaction_DeployAccountV3)(nil), // 14: Transaction.DeployAccountV3 - (*Transaction_InvokeV0)(nil), // 15: Transaction.InvokeV0 - (*Transaction_InvokeV1)(nil), // 16: Transaction.InvokeV1 - (*Transaction_InvokeV3)(nil), // 17: Transaction.InvokeV3 - (*Transaction_L1HandlerV0)(nil), // 18: Transaction.L1HandlerV0 - (*Felt252)(nil), // 19: Felt252 - (*Hash)(nil), // 20: Hash - (*Receipt)(nil), // 21: Receipt - (*Iteration)(nil), // 22: Iteration - (*Fin)(nil), // 23: Fin - (*Address)(nil), // 24: Address - (VolitionDomain)(0), // 25: VolitionDomain -} -var file_p2p_proto_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 -} - -func init() { file_p2p_proto_transaction_proto_init() } -func file_p2p_proto_transaction_proto_init() { - if File_p2p_proto_transaction_proto != nil { - return - } - file_p2p_proto_common_proto_init() - file_p2p_proto_receipt_proto_init() - if !protoimpl.UnsafeEnabled { - file_p2p_proto_transaction_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ResourceLimits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ResourceBounds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AccountSignature); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Transaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TransactionWithReceipt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TransactionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TransactionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Transactions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_DeclareV0); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_DeclareV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_DeclareV2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_DeclareV3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_Deploy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_DeployAccountV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_DeployAccountV3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_InvokeV0); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_InvokeV1); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_InvokeV3); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_proto_transaction_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*Transaction_L1HandlerV0); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_p2p_proto_transaction_proto_msgTypes[3].OneofWrappers = []any{ - (*Transaction_DeclareV0_)(nil), - (*Transaction_DeclareV1_)(nil), - (*Transaction_DeclareV2_)(nil), - (*Transaction_DeclareV3_)(nil), - (*Transaction_Deploy_)(nil), - (*Transaction_DeployAccountV1_)(nil), - (*Transaction_DeployAccountV3_)(nil), - (*Transaction_InvokeV0_)(nil), - (*Transaction_InvokeV1_)(nil), - (*Transaction_InvokeV3_)(nil), - (*Transaction_L1Handler)(nil), - } - file_p2p_proto_transaction_proto_msgTypes[6].OneofWrappers = []any{ - (*TransactionsResponse_TransactionWithReceipt)(nil), - (*TransactionsResponse_Fin)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_p2p_proto_transaction_proto_rawDesc, - NumEnums: 0, - NumMessages: 19, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_p2p_proto_transaction_proto_goTypes, - DependencyIndexes: file_p2p_proto_transaction_proto_depIdxs, - MessageInfos: file_p2p_proto_transaction_proto_msgTypes, - }.Build() - File_p2p_proto_transaction_proto = out.File - file_p2p_proto_transaction_proto_rawDesc = nil - file_p2p_proto_transaction_proto_goTypes = nil - file_p2p_proto_transaction_proto_depIdxs = nil -} diff --git a/p2p/starknet/bytereader.go b/p2p/sync/bytereader.go similarity index 94% rename from p2p/starknet/bytereader.go rename to p2p/sync/bytereader.go index 0377571d0c..e138b9e497 100644 --- a/p2p/starknet/bytereader.go +++ b/p2p/sync/bytereader.go @@ -1,4 +1,4 @@ -package starknet +package sync import ( "io" diff --git a/p2p/starknet/bytereader_pkg_test.go b/p2p/sync/bytereader_pkg_test.go similarity index 96% rename from p2p/starknet/bytereader_pkg_test.go rename to p2p/sync/bytereader_pkg_test.go index d06da31376..4fbfc7332a 100644 --- a/p2p/starknet/bytereader_pkg_test.go +++ b/p2p/sync/bytereader_pkg_test.go @@ -1,4 +1,4 @@ -package starknet +package sync import ( "bytes" diff --git a/p2p/starknet/client.go b/p2p/sync/client.go similarity index 66% rename from p2p/starknet/client.go rename to p2p/sync/client.go index bfeed7ab7a..5f688a0378 100644 --- a/p2p/starknet/client.go +++ b/p2p/sync/client.go @@ -1,4 +1,4 @@ -package starknet +package sync import ( "context" @@ -7,7 +7,7 @@ import ( "iter" "time" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" "github.com/NethermindEth/juno/utils" "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/protocol" @@ -101,25 +101,25 @@ func requestAndReceiveStream[ReqT proto.Message, ResT proto.Message](ctx context } func (c *Client) RequestBlockHeaders( - ctx context.Context, req *spec.BlockHeadersRequest, -) (iter.Seq[*spec.BlockHeadersResponse], error) { - return requestAndReceiveStream[*spec.BlockHeadersRequest, *spec.BlockHeadersResponse]( + ctx context.Context, req *gen.BlockHeadersRequest, +) (iter.Seq[*gen.BlockHeadersResponse], error) { + return requestAndReceiveStream[*gen.BlockHeadersRequest, *gen.BlockHeadersResponse]( ctx, c.newStream, HeadersPID(), req, c.log) } -func (c *Client) RequestEvents(ctx context.Context, req *spec.EventsRequest) (iter.Seq[*spec.EventsResponse], error) { - return requestAndReceiveStream[*spec.EventsRequest, *spec.EventsResponse](ctx, c.newStream, EventsPID(), req, c.log) +func (c *Client) RequestEvents(ctx context.Context, req *gen.EventsRequest) (iter.Seq[*gen.EventsResponse], error) { + return requestAndReceiveStream[*gen.EventsRequest, *gen.EventsResponse](ctx, c.newStream, EventsPID(), req, c.log) } -func (c *Client) RequestClasses(ctx context.Context, req *spec.ClassesRequest) (iter.Seq[*spec.ClassesResponse], error) { - return requestAndReceiveStream[*spec.ClassesRequest, *spec.ClassesResponse](ctx, c.newStream, ClassesPID(), req, c.log) +func (c *Client) RequestClasses(ctx context.Context, req *gen.ClassesRequest) (iter.Seq[*gen.ClassesResponse], error) { + return requestAndReceiveStream[*gen.ClassesRequest, *gen.ClassesResponse](ctx, c.newStream, ClassesPID(), req, c.log) } -func (c *Client) RequestStateDiffs(ctx context.Context, req *spec.StateDiffsRequest) (iter.Seq[*spec.StateDiffsResponse], error) { - return requestAndReceiveStream[*spec.StateDiffsRequest, *spec.StateDiffsResponse](ctx, c.newStream, StateDiffPID(), req, c.log) +func (c *Client) RequestStateDiffs(ctx context.Context, req *gen.StateDiffsRequest) (iter.Seq[*gen.StateDiffsResponse], error) { + return requestAndReceiveStream[*gen.StateDiffsRequest, *gen.StateDiffsResponse](ctx, c.newStream, StateDiffPID(), req, c.log) } -func (c *Client) RequestTransactions(ctx context.Context, req *spec.TransactionsRequest) (iter.Seq[*spec.TransactionsResponse], error) { - return requestAndReceiveStream[*spec.TransactionsRequest, *spec.TransactionsResponse]( +func (c *Client) RequestTransactions(ctx context.Context, req *gen.TransactionsRequest) (iter.Seq[*gen.TransactionsResponse], error) { + return requestAndReceiveStream[*gen.TransactionsRequest, *gen.TransactionsResponse]( ctx, c.newStream, TransactionsPID(), req, c.log) } diff --git a/p2p/starknet/ids.go b/p2p/sync/ids.go similarity index 96% rename from p2p/starknet/ids.go rename to p2p/sync/ids.go index d1b97b0ad2..284875e36b 100644 --- a/p2p/starknet/ids.go +++ b/p2p/sync/ids.go @@ -1,4 +1,4 @@ -package starknet +package sync import ( "github.com/libp2p/go-libp2p/core/protocol" diff --git a/p2p/sync.go b/p2p/sync/sync.go similarity index 82% rename from p2p/sync.go rename to p2p/sync/sync.go index 47f58936bf..e3599280ca 100644 --- a/p2p/sync.go +++ b/p2p/sync/sync.go @@ -1,4 +1,4 @@ -package p2p +package sync import ( "context" @@ -13,8 +13,7 @@ import ( "github.com/NethermindEth/juno/core" "github.com/NethermindEth/juno/core/felt" "github.com/NethermindEth/juno/db" - "github.com/NethermindEth/juno/p2p/starknet" - "github.com/NethermindEth/juno/p2p/starknet/spec" + "github.com/NethermindEth/juno/p2p/gen" junoSync "github.com/NethermindEth/juno/sync" "github.com/NethermindEth/juno/utils" "github.com/NethermindEth/juno/utils/pipeline" @@ -25,18 +24,18 @@ import ( "go.uber.org/zap" ) -type syncService struct { +type Service struct { host host.Host network *utils.Network - client *starknet.Client // todo: merge all the functionality of Client with p2p SyncService + client *Client // todo: merge all the functionality of Client with p2p SyncService blockchain *blockchain.Blockchain listener junoSync.EventListener log utils.SimpleLogger } -func newSyncService(bc *blockchain.Blockchain, h host.Host, n *utils.Network, log utils.SimpleLogger) *syncService { - return &syncService{ +func New(bc *blockchain.Blockchain, h host.Host, n *utils.Network, log utils.SimpleLogger) *Service { + return &Service{ host: h, network: n, blockchain: bc, @@ -45,11 +44,11 @@ func newSyncService(bc *blockchain.Blockchain, h host.Host, n *utils.Network, lo } } -func (s *syncService) start(ctx context.Context) { +func (s *Service) Run(ctx context.Context) { ctx, cancel := context.WithCancel(ctx) defer cancel() - s.client = starknet.NewClient(s.randomPeerStream, s.network, s.log) + s.client = NewClient(s.randomPeerStream, s.network, s.log) for i := 0; ; i++ { if err := ctx.Err(); err != nil { @@ -79,7 +78,7 @@ func (s *syncService) start(ctx context.Context) { } } -func (s *syncService) getNextHeight() (int, error) { +func (s *Service) getNextHeight() (int, error) { curHeight, err := s.blockchain.Height() if err == nil { return int(curHeight) + 1, nil @@ -89,7 +88,7 @@ func (s *syncService) getNextHeight() (int, error) { return 0, err } -func (s *syncService) processBlock(ctx context.Context, blockNumber uint64) error { +func (s *Service) processBlock(ctx context.Context, blockNumber uint64) error { headersAndSigsCh, err := s.genHeadersAndSigs(ctx, blockNumber) if err != nil { return fmt.Errorf("failed to get block headers parts: %w", err) @@ -144,7 +143,7 @@ func specBlockPartsFunc[T specBlockHeaderAndSigs | specTxWithReceipts | specEven return specBlockParts(i) } -func (s *syncService) logError(msg string, err error) { +func (s *Service) logError(msg string, err error) { if !errors.Is(err, context.Canceled) { var log utils.SimpleLogger if v, ok := s.log.(*utils.ZapLogger); ok { @@ -170,7 +169,7 @@ type blockBody struct { } //nolint:gocyclo -func (s *syncService) processSpecBlockParts( +func (s *Service) processSpecBlockParts( ctx context.Context, startingBlockNum uint64, specBlockPartsCh <-chan specBlockParts, ) <-chan <-chan blockBody { orderedBlockBodiesCh := make(chan (<-chan blockBody)) @@ -263,8 +262,8 @@ func (s *syncService) processSpecBlockParts( } //nolint:gocyclo -func (s *syncService) adaptAndSanityCheckBlock(ctx context.Context, header *spec.SignedBlockHeader, contractDiffs []*spec.ContractDiff, - classes []*spec.Class, txs []*spec.Transaction, receipts []*spec.Receipt, events []*spec.Event, prevBlockRoot *felt.Felt, +func (s *Service) adaptAndSanityCheckBlock(ctx context.Context, header *gen.SignedBlockHeader, contractDiffs []*gen.ContractDiff, + classes []*gen.Class, txs []*gen.Transaction, receipts []*gen.Receipt, events []*gen.Event, prevBlockRoot *felt.Felt, ) <-chan blockBody { bodyCh := make(chan blockBody) go func() { @@ -380,16 +379,16 @@ type specBlockParts interface { } type specBlockHeaderAndSigs struct { - header *spec.SignedBlockHeader + header *gen.SignedBlockHeader } func (s specBlockHeaderAndSigs) blockNumber() uint64 { return s.header.Number } -func (s *syncService) genHeadersAndSigs(ctx context.Context, blockNumber uint64) (<-chan specBlockHeaderAndSigs, error) { +func (s *Service) genHeadersAndSigs(ctx context.Context, blockNumber uint64) (<-chan specBlockHeaderAndSigs, error) { it := s.createIteratorForBlock(blockNumber) - headersIt, err := s.client.RequestBlockHeaders(ctx, &spec.BlockHeadersRequest{Iteration: it}) + headersIt, err := s.client.RequestBlockHeaders(ctx, &gen.BlockHeadersRequest{Iteration: it}) if err != nil { return nil, err } @@ -402,9 +401,9 @@ func (s *syncService) genHeadersAndSigs(ctx context.Context, blockNumber uint64) for res := range headersIt { headerAndSig := specBlockHeaderAndSigs{} switch v := res.HeaderMessage.(type) { - case *spec.BlockHeadersResponse_Header: + case *gen.BlockHeadersResponse_Header: headerAndSig.header = v.Header - case *spec.BlockHeadersResponse_Fin: + case *gen.BlockHeadersResponse_Fin: break loop default: s.log.Warnw("Unexpected HeaderMessage from getBlockHeaders", "v", v) @@ -424,16 +423,16 @@ func (s *syncService) genHeadersAndSigs(ctx context.Context, blockNumber uint64) type specClasses struct { number uint64 - classes []*spec.Class + classes []*gen.Class } func (s specClasses) blockNumber() uint64 { return s.number } -func (s *syncService) genClasses(ctx context.Context, blockNumber uint64) (<-chan specClasses, error) { +func (s *Service) genClasses(ctx context.Context, blockNumber uint64) (<-chan specClasses, error) { it := s.createIteratorForBlock(blockNumber) - classesIt, err := s.client.RequestClasses(ctx, &spec.ClassesRequest{Iteration: it}) + classesIt, err := s.client.RequestClasses(ctx, &gen.ClassesRequest{Iteration: it}) if err != nil { return nil, err } @@ -442,13 +441,13 @@ func (s *syncService) genClasses(ctx context.Context, blockNumber uint64) (<-cha go func() { defer close(classesCh) - var classes []*spec.Class + var classes []*gen.Class loop: for res := range classesIt { switch v := res.ClassMessage.(type) { - case *spec.ClassesResponse_Class: + case *gen.ClassesResponse_Class: classes = append(classes, v.Class) - case *spec.ClassesResponse_Fin: + case *gen.ClassesResponse_Fin: break loop default: s.log.Warnw("Unexpected ClassMessage from getClasses", "v", v) @@ -470,16 +469,16 @@ func (s *syncService) genClasses(ctx context.Context, blockNumber uint64) (<-cha type specContractDiffs struct { number uint64 - contractDiffs []*spec.ContractDiff + contractDiffs []*gen.ContractDiff } func (s specContractDiffs) blockNumber() uint64 { return s.number } -func (s *syncService) genStateDiffs(ctx context.Context, blockNumber uint64) (<-chan specContractDiffs, error) { +func (s *Service) genStateDiffs(ctx context.Context, blockNumber uint64) (<-chan specContractDiffs, error) { it := s.createIteratorForBlock(blockNumber) - stateDiffsIt, err := s.client.RequestStateDiffs(ctx, &spec.StateDiffsRequest{Iteration: it}) + stateDiffsIt, err := s.client.RequestStateDiffs(ctx, &gen.StateDiffsRequest{Iteration: it}) if err != nil { return nil, err } @@ -488,16 +487,16 @@ func (s *syncService) genStateDiffs(ctx context.Context, blockNumber uint64) (<- go func() { defer close(stateDiffsCh) - var contractDiffs []*spec.ContractDiff + var contractDiffs []*gen.ContractDiff loop: for res := range stateDiffsIt { switch v := res.StateDiffMessage.(type) { - case *spec.StateDiffsResponse_ContractDiff: + case *gen.StateDiffsResponse_ContractDiff: contractDiffs = append(contractDiffs, v.ContractDiff) - case *spec.StateDiffsResponse_DeclaredClass: + case *gen.StateDiffsResponse_DeclaredClass: s.log.Warnw("Unimplemented message StateDiffsResponse_DeclaredClass") - case *spec.StateDiffsResponse_Fin: + case *gen.StateDiffsResponse_Fin: break loop default: s.log.Warnw("Unexpected ClassMessage from getStateDiffs", "v", v) @@ -518,16 +517,16 @@ func (s *syncService) genStateDiffs(ctx context.Context, blockNumber uint64) (<- type specEvents struct { number uint64 - events []*spec.Event + events []*gen.Event } func (s specEvents) blockNumber() uint64 { return s.number } -func (s *syncService) genEvents(ctx context.Context, blockNumber uint64) (<-chan specEvents, error) { +func (s *Service) genEvents(ctx context.Context, blockNumber uint64) (<-chan specEvents, error) { it := s.createIteratorForBlock(blockNumber) - eventsIt, err := s.client.RequestEvents(ctx, &spec.EventsRequest{Iteration: it}) + eventsIt, err := s.client.RequestEvents(ctx, &gen.EventsRequest{Iteration: it}) if err != nil { return nil, err } @@ -536,14 +535,14 @@ func (s *syncService) genEvents(ctx context.Context, blockNumber uint64) (<-chan go func() { defer close(eventsCh) - var events []*spec.Event + var events []*gen.Event loop: for res := range eventsIt { switch v := res.EventMessage.(type) { - case *spec.EventsResponse_Event: + case *gen.EventsResponse_Event: events = append(events, v.Event) - case *spec.EventsResponse_Fin: + case *gen.EventsResponse_Fin: break loop default: s.log.Warnw("Unexpected EventMessage from getEvents", "v", v) @@ -564,17 +563,17 @@ func (s *syncService) genEvents(ctx context.Context, blockNumber uint64) (<-chan type specTxWithReceipts struct { number uint64 - txs []*spec.Transaction - receipts []*spec.Receipt + txs []*gen.Transaction + receipts []*gen.Receipt } func (s specTxWithReceipts) blockNumber() uint64 { return s.number } -func (s *syncService) genTransactions(ctx context.Context, blockNumber uint64) (<-chan specTxWithReceipts, error) { +func (s *Service) genTransactions(ctx context.Context, blockNumber uint64) (<-chan specTxWithReceipts, error) { it := s.createIteratorForBlock(blockNumber) - txsIt, err := s.client.RequestTransactions(ctx, &spec.TransactionsRequest{Iteration: it}) + txsIt, err := s.client.RequestTransactions(ctx, &gen.TransactionsRequest{Iteration: it}) if err != nil { return nil, err } @@ -584,18 +583,18 @@ func (s *syncService) genTransactions(ctx context.Context, blockNumber uint64) ( defer close(txsCh) var ( - transactions []*spec.Transaction - receipts []*spec.Receipt + transactions []*gen.Transaction + receipts []*gen.Receipt ) loop: for res := range txsIt { switch v := res.TransactionMessage.(type) { - case *spec.TransactionsResponse_TransactionWithReceipt: + case *gen.TransactionsResponse_TransactionWithReceipt: txWithReceipt := v.TransactionWithReceipt transactions = append(transactions, txWithReceipt.Transaction) receipts = append(receipts, txWithReceipt.Receipt) - case *spec.TransactionsResponse_Fin: + case *gen.TransactionsResponse_Fin: break loop default: s.log.Warnw("Unexpected TransactionMessage from getTransactions", "v", v) @@ -618,7 +617,7 @@ func (s *syncService) genTransactions(ctx context.Context, blockNumber uint64) ( return txsCh, nil } -func (s *syncService) randomPeer() peer.ID { +func (s *Service) randomPeer() peer.ID { store := s.host.Peerstore() // todo do not request same block from all peers peers := utils.Filter(store.Peers(), func(peerID peer.ID) bool { @@ -638,7 +637,7 @@ func (s *syncService) randomPeer() peer.ID { var errNoPeers = errors.New("no peers available") -func (s *syncService) randomPeerStream(ctx context.Context, pids ...protocol.ID) (network.Stream, error) { +func (s *Service) randomPeerStream(ctx context.Context, pids ...protocol.ID) (network.Stream, error) { randPeer := s.randomPeer() if randPeer == "" { return nil, errNoPeers @@ -652,21 +651,21 @@ func (s *syncService) randomPeerStream(ctx context.Context, pids ...protocol.ID) return stream, err } -func (s *syncService) removePeer(id peer.ID) { +func (s *Service) removePeer(id peer.ID) { s.log.Debugw("Removing peer", "peerID", id) s.host.Peerstore().RemovePeer(id) s.host.Peerstore().ClearAddrs(id) } -func (s *syncService) createIteratorForBlock(blockNumber uint64) *spec.Iteration { - return &spec.Iteration{ - Start: &spec.Iteration_BlockNumber{BlockNumber: blockNumber}, - Direction: spec.Iteration_Forward, +func (s *Service) createIteratorForBlock(blockNumber uint64) *gen.Iteration { + return &gen.Iteration{ + Start: &gen.Iteration_BlockNumber{BlockNumber: blockNumber}, + Direction: gen.Iteration_Forward, Limit: 1, Step: 1, } } -func (s *syncService) WithListener(l junoSync.EventListener) { +func (s *Service) WithListener(l junoSync.EventListener) { s.listener = l }