From 87e28646524f48346ab36f44dda9cf3fd9144205 Mon Sep 17 00:00:00 2001 From: Eugene Zagidullin Date: Thu, 26 Sep 2024 22:52:02 +0200 Subject: [PATCH] Quebec protocol --- protocol/block.go | 5 + protocol/block_test.go | 25 + protocol/constants.go | 3 + protocol/context.go | 40 -- protocol/core/protocol.go | 4 + protocol/latest/alias.go | 7 +- protocol/proto_021_PsquebeC/balance_update.go | 141 ++++ protocol/proto_021_PsquebeC/block.go | 93 +++ protocol/proto_021_PsquebeC/constants.go | 11 + protocol/proto_021_PsquebeC/constants_test.go | 188 +++++ protocol/proto_021_PsquebeC/helpers.go | 15 + protocol/proto_021_PsquebeC/json_gen.go | 652 ++++++++++++++++++ protocol/proto_021_PsquebeC/operation_list.go | 36 + protocol/proto_021_PsquebeC/operations.go | 532 ++++++++++++++ protocol/proto_021_PsquebeC/smart_rollup.go | 259 +++++++ protocol/proto_021_PsquebeC/transaction.go | 137 ++++ protocol/proto_021_PsquebeC/zk_rollup.go | 103 +++ protocol/test_data/021_PsquebeC/155262.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155263.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155264.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155265.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155266.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155267.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155268.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155269.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155270.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155271.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155272.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155273.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155274.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155275.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155276.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155277.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155278.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155279.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155280.bin | Bin 0 -> 2275 bytes protocol/test_data/021_PsquebeC/155281.bin | Bin 0 -> 2339 bytes 37 files changed, 2207 insertions(+), 44 deletions(-) delete mode 100644 protocol/context.go create mode 100644 protocol/proto_021_PsquebeC/balance_update.go create mode 100644 protocol/proto_021_PsquebeC/block.go create mode 100644 protocol/proto_021_PsquebeC/constants.go create mode 100644 protocol/proto_021_PsquebeC/constants_test.go create mode 100644 protocol/proto_021_PsquebeC/helpers.go create mode 100644 protocol/proto_021_PsquebeC/json_gen.go create mode 100644 protocol/proto_021_PsquebeC/operation_list.go create mode 100644 protocol/proto_021_PsquebeC/operations.go create mode 100644 protocol/proto_021_PsquebeC/smart_rollup.go create mode 100644 protocol/proto_021_PsquebeC/transaction.go create mode 100644 protocol/proto_021_PsquebeC/zk_rollup.go create mode 100644 protocol/test_data/021_PsquebeC/155262.bin create mode 100644 protocol/test_data/021_PsquebeC/155263.bin create mode 100644 protocol/test_data/021_PsquebeC/155264.bin create mode 100644 protocol/test_data/021_PsquebeC/155265.bin create mode 100644 protocol/test_data/021_PsquebeC/155266.bin create mode 100644 protocol/test_data/021_PsquebeC/155267.bin create mode 100644 protocol/test_data/021_PsquebeC/155268.bin create mode 100644 protocol/test_data/021_PsquebeC/155269.bin create mode 100644 protocol/test_data/021_PsquebeC/155270.bin create mode 100644 protocol/test_data/021_PsquebeC/155271.bin create mode 100644 protocol/test_data/021_PsquebeC/155272.bin create mode 100644 protocol/test_data/021_PsquebeC/155273.bin create mode 100644 protocol/test_data/021_PsquebeC/155274.bin create mode 100644 protocol/test_data/021_PsquebeC/155275.bin create mode 100644 protocol/test_data/021_PsquebeC/155276.bin create mode 100644 protocol/test_data/021_PsquebeC/155277.bin create mode 100644 protocol/test_data/021_PsquebeC/155278.bin create mode 100644 protocol/test_data/021_PsquebeC/155279.bin create mode 100644 protocol/test_data/021_PsquebeC/155280.bin create mode 100644 protocol/test_data/021_PsquebeC/155281.bin diff --git a/protocol/block.go b/protocol/block.go index 10af798..d236bab 100644 --- a/protocol/block.go +++ b/protocol/block.go @@ -13,6 +13,7 @@ import ( "github.com/ecadlabs/gotez/v2/protocol/proto_017_PtNairob" "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" "github.com/ecadlabs/gotez/v2/protocol/proto_019_PtParisB" + "github.com/ecadlabs/gotez/v2/protocol/proto_021_PsquebeC" ) type BlockInfo interface { @@ -31,6 +32,8 @@ type BlockHeaderInfo interface { func NewBlockInfo(proto *tz.ProtocolHash) (BlockInfo, error) { switch *proto { + case core.Proto021PsquebeC: + return new(proto_021_PsquebeC.BlockInfo), nil case core.Proto019PtParisB, core.Proto020PsParisC: return new(proto_019_PtParisB.BlockInfo), nil case core.Proto018Proxford: @@ -54,6 +57,8 @@ func NewBlockInfo(proto *tz.ProtocolHash) (BlockInfo, error) { func NewBlockHeaderInfo(proto *tz.ProtocolHash) (BlockHeaderInfo, error) { switch *proto { + case core.Proto021PsquebeC: + return new(proto_021_PsquebeC.BlockHeaderInfo), nil case core.Proto019PtParisB, core.Proto020PsParisC: return new(proto_019_PtParisB.BlockHeaderInfo), nil case core.Proto018Proxford: diff --git a/protocol/block_test.go b/protocol/block_test.go index e657e9f..33f6384 100644 --- a/protocol/block_test.go +++ b/protocol/block_test.go @@ -20,6 +20,31 @@ type protoTestData struct { } var testData = []protoTestData{ + { + proto: &core.Proto021PsquebeC, + blocks: []string{ + "155262", + "155263", + "155264", + "155265", + "155266", + "155267", + "155268", + "155269", + "155270", + "155271", + "155272", + "155273", + "155274", + "155275", + "155276", + "155277", + "155278", + "155279", + "155280", + "155281", + }, + }, { proto: &core.Proto019PtParisB, blocks: []string{ diff --git a/protocol/constants.go b/protocol/constants.go index 7a0f3b2..f32e342 100644 --- a/protocol/constants.go +++ b/protocol/constants.go @@ -13,10 +13,13 @@ import ( "github.com/ecadlabs/gotez/v2/protocol/proto_017_PtNairob" "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" "github.com/ecadlabs/gotez/v2/protocol/proto_019_PtParisB" + "github.com/ecadlabs/gotez/v2/protocol/proto_021_PsquebeC" ) func NewConstants(proto *tz.ProtocolHash) (constants core.Constants, err error) { switch *proto { + case core.Proto021PsquebeC: + constants = new(proto_021_PsquebeC.Constants) case core.Proto019PtParisB, core.Proto020PsParisC: constants = new(proto_019_PtParisB.Constants) case core.Proto018Proxford: diff --git a/protocol/context.go b/protocol/context.go deleted file mode 100644 index dc6199c..0000000 --- a/protocol/context.go +++ /dev/null @@ -1,40 +0,0 @@ -package protocol - -import ( - "fmt" - - tz "github.com/ecadlabs/gotez/v2" - "github.com/ecadlabs/gotez/v2/protocol/core" - "github.com/ecadlabs/gotez/v2/protocol/proto_012_Psithaca" - "github.com/ecadlabs/gotez/v2/protocol/proto_013_PtJakart" - "github.com/ecadlabs/gotez/v2/protocol/proto_014_PtKathma" - "github.com/ecadlabs/gotez/v2/protocol/proto_015_PtLimaPt" - "github.com/ecadlabs/gotez/v2/protocol/proto_016_PtMumbai" - "github.com/ecadlabs/gotez/v2/protocol/proto_017_PtNairob" - "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" - "github.com/ecadlabs/gotez/v2/protocol/proto_019_PtParisB" -) - -func NewDelegateInfo(proto *tz.ProtocolHash) (delegate core.DelegateInfo, err error) { - switch *proto { - case core.Proto019PtParisB, core.Proto020PsParisC: - delegate = new(proto_019_PtParisB.DelegateInfo) - case core.Proto018Proxford: - delegate = new(proto_018_Proxford.DelegateInfo) - case core.Proto017PtNairob: - delegate = new(proto_017_PtNairob.DelegateInfo) - case core.Proto016PtMumbai: - delegate = new(proto_016_PtMumbai.DelegateInfo) - case core.Proto015PtLimaPt: - delegate = new(proto_015_PtLimaPt.DelegateInfo) - case core.Proto014PtKathma: - delegate = new(proto_014_PtKathma.DelegateInfo) - case core.Proto013PtJakart: - delegate = new(proto_013_PtJakart.DelegateInfo) - case core.Proto012Psithaca: - delegate = new(proto_012_Psithaca.DelegateInfo) - default: - return nil, fmt.Errorf("gotez: NewDelegateInfo: unknown protocol version %d", proto) - } - return -} diff --git a/protocol/core/protocol.go b/protocol/core/protocol.go index d29e290..2659de5 100644 --- a/protocol/core/protocol.go +++ b/protocol/core/protocol.go @@ -26,6 +26,7 @@ var ( Proto018Proxford = tz.ProtocolHash{0x0b, 0xf4, 0x4c, 0x7d, 0x64, 0xe3, 0xd7, 0xda, 0x27, 0xd9, 0x25, 0xd1, 0x0a, 0xf5, 0x35, 0xfb, 0x36, 0xce, 0xf0, 0xad, 0x41, 0x93, 0x0c, 0x79, 0x29, 0x77, 0x3f, 0x47, 0x31, 0xeb, 0xa1, 0x37} Proto019PtParisB = tz.ProtocolHash{0xdb, 0xff, 0x65, 0x86, 0xa0, 0x48, 0x02, 0xd3, 0xf5, 0x13, 0xc6, 0x5a, 0x44, 0x4d, 0x9d, 0x4d, 0xeb, 0xe4, 0x2b, 0x17, 0xe9, 0xe7, 0x27, 0x3f, 0x8f, 0x6c, 0x11, 0x8e, 0xa3, 0xf4, 0xe0, 0x6e} Proto020PsParisC = tz.ProtocolHash{0x58, 0x4d, 0x32, 0x39, 0x2e, 0xf2, 0x1a, 0x17, 0xef, 0x36, 0xdf, 0x07, 0x4f, 0x48, 0xaf, 0x06, 0x65, 0x3a, 0x8d, 0x31, 0x59, 0x57, 0xc9, 0x07, 0xd6, 0xa4, 0xc1, 0x8c, 0x3a, 0x00, 0xa5, 0xe1} + Proto021PsquebeC = tz.ProtocolHash{0x94, 0x12, 0xc8, 0x4f, 0xe6, 0x49, 0x2d, 0x94, 0x8e, 0x1b, 0xcf, 0x75, 0xa3, 0xc8, 0xf6, 0xcb, 0xc9, 0x0a, 0xf9, 0xaf, 0x42, 0x76, 0x5a, 0xe0, 0x03, 0x8c, 0x8b, 0x77, 0x81, 0x34, 0xfa, 0xb1} ) var Protocols = []*tz.ProtocolHash{ @@ -50,6 +51,7 @@ var Protocols = []*tz.ProtocolHash{ &Proto018Proxford, &Proto019PtParisB, &Proto020PsParisC, + &Proto021PsquebeC, } var shortNames = map[tz.ProtocolHash]string{ @@ -74,6 +76,7 @@ var shortNames = map[tz.ProtocolHash]string{ Proto018Proxford: "018_Proxford", Proto019PtParisB: "019_PtParisA", Proto020PsParisC: "020_PsParisC", + Proto021PsquebeC: "021_PsquebeC", } var indices = map[tz.ProtocolHash]int{ @@ -98,6 +101,7 @@ var indices = map[tz.ProtocolHash]int{ Proto018Proxford: 18, Proto019PtParisB: 19, Proto020PsParisC: 20, + Proto021PsquebeC: 21, } func ProtocolShortName(proto *tz.ProtocolHash) string { diff --git a/protocol/latest/alias.go b/protocol/latest/alias.go index 488b640..0906dbb 100644 --- a/protocol/latest/alias.go +++ b/protocol/latest/alias.go @@ -2,7 +2,7 @@ package latest import ( "github.com/ecadlabs/gotez/v2/protocol/core" - latest "github.com/ecadlabs/gotez/v2/protocol/proto_019_PtParisB" + latest "github.com/ecadlabs/gotez/v2/protocol/proto_021_PsquebeC" ) var ( @@ -62,7 +62,6 @@ type EndorsementContentsAndResult = latest.AttestationContentsAndResult type InlinedEndorsementContents = latest.InlinedAttestationContents type InlinedAttestationContents = latest.InlinedAttestationContents type DALAttestation = latest.DALAttestation -type DALAttestationContentsAndResult = latest.DALAttestationContentsAndResult type Reveal = latest.Reveal type RevealContentsAndResult = latest.RevealContentsAndResult type Transaction = latest.Transaction @@ -99,8 +98,8 @@ type SmartRollupExecuteOutboxMessage = latest.SmartRollupExecuteOutboxMessage type SmartRollupExecuteOutboxMessageContentsAndResult = latest.SmartRollupExecuteOutboxMessageContentsAndResult type SmartRollupRecoverBond = latest.SmartRollupRecoverBond type SmartRollupRecoverBondContentsAndResult = latest.SmartRollupRecoverBondContentsAndResult -type DALPublishSlotHeader = latest.DALPublishSlotHeader -type DALPublishSlotHeaderContentsAndResult = latest.DALPublishSlotHeaderContentsAndResult +type DALPublishCommitment = latest.DALPublishCommitment +type DALPublishCommitmentContentsAndResult = latest.DALPublishCommitmentContentsAndResult type ZkRollupOrigination = latest.ZkRollupOrigination type ZkRollupOriginationContentsAndResult = latest.ZkRollupOriginationContentsAndResult type ZkRollupPublish = latest.ZkRollupPublish diff --git a/protocol/proto_021_PsquebeC/balance_update.go b/protocol/proto_021_PsquebeC/balance_update.go new file mode 100644 index 0000000..2ff1f12 --- /dev/null +++ b/protocol/proto_021_PsquebeC/balance_update.go @@ -0,0 +1,141 @@ +package proto_021_PsquebeC + +import ( + tz "github.com/ecadlabs/gotez/v2" + "github.com/ecadlabs/gotez/v2/encoding" + "github.com/ecadlabs/gotez/v2/protocol/core" + "github.com/ecadlabs/gotez/v2/protocol/proto_012_Psithaca" + "github.com/ecadlabs/gotez/v2/protocol/proto_016_PtMumbai" + "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" + "github.com/ecadlabs/gotez/v2/protocol/proto_019_PtParisB" +) + +type BalanceUpdates struct { + BalanceUpdates []*BalanceUpdate `tz:"dyn" json:"balance_updates"` +} + +func (b *BalanceUpdates) GetBalanceUpdates() []core.BalanceUpdate { + out := make([]core.BalanceUpdate, len(b.BalanceUpdates)) + for i, u := range b.BalanceUpdates { + out[i] = u + } + return out +} + +type BalanceUpdate struct { + Contents BalanceUpdateContents `json:"contents"` + Change int64 `json:"change"` + Origin core.BalanceUpdateOrigin `json:"origin"` +} + +func (b *BalanceUpdate) GetContents() core.BalanceUpdateContents { return b.Contents } +func (b *BalanceUpdate) GetChange() int64 { return b.Change } +func (b *BalanceUpdate) GetOrigin() core.BalanceUpdateOrigin { return b.Origin } + +type BalanceUpdateContract = proto_012_Psithaca.BalanceUpdateContract +type BalanceUpdateCommitments = proto_012_Psithaca.BalanceUpdateCommitments +type BalanceUpdateBlockFees = proto_012_Psithaca.BalanceUpdateBlockFees +type BalanceUpdateNonceRevelationRewards = proto_012_Psithaca.BalanceUpdateNonceRevelationRewards +type BalanceUpdateBakingRewards = proto_012_Psithaca.BalanceUpdateBakingRewards +type BalanceUpdateBakingBonuses = proto_012_Psithaca.BalanceUpdateBakingBonuses +type BalanceUpdateStorageFees = proto_012_Psithaca.BalanceUpdateStorageFees +type BalanceUpdateDoubleSigningPunishments = proto_012_Psithaca.BalanceUpdateDoubleSigningPunishments +type BalanceUpdateLiquidityBakingSubsidies = proto_012_Psithaca.BalanceUpdateLiquidityBakingSubsidies +type BalanceUpdateBurned = proto_012_Psithaca.BalanceUpdateBurned +type BalanceUpdateBootstrap = proto_012_Psithaca.BalanceUpdateBootstrap +type BalanceUpdateInvoice = proto_012_Psithaca.BalanceUpdateInvoice +type BalanceUpdateInitialCommitments = proto_012_Psithaca.BalanceUpdateInitialCommitments +type BalanceUpdateMinted = proto_012_Psithaca.BalanceUpdateMinted +type BalanceUpdateSmartRollupRefutationPunishments = proto_016_PtMumbai.BalanceUpdateSmartRollupRefutationPunishments +type BalanceUpdateSmartRollupRefutationRewards = proto_016_PtMumbai.BalanceUpdateSmartRollupRefutationRewards +type StakingDelegatorNumerator = proto_018_Proxford.StakingDelegatorNumerator +type StakingDelegateDenominator = proto_018_Proxford.StakingDelegateDenominator +type BalanceUpdateUnstakedDeposits = proto_018_Proxford.BalanceUpdateUnstakedDeposits +type BalanceUpdateDeposits = proto_019_PtParisB.BalanceUpdateDeposits + +//json:category=BalanceUpdateCategory(),kind=BalanceUpdateKind() +type BalanceUpdateAttestingRewards struct{} + +func (BalanceUpdateAttestingRewards) BalanceUpdateCategory() string { + return "attesting_rewards" +} +func (BalanceUpdateAttestingRewards) BalanceUpdateKind() core.BalanceUpdateKind { + return core.BalanceUpdateKindMinted +} + +//json:category=BalanceUpdateCategory(),kind=BalanceUpdateKind() +type BalanceUpdateLostAttestingRewards struct { + Delegate tz.PublicKeyHash `json:"delegate"` + Participation bool `json:"participation"` + Revelation bool `json:"revelation"` +} + +func (*BalanceUpdateLostAttestingRewards) BalanceUpdateCategory() string { + return "lost_attesting_rewards" +} +func (*BalanceUpdateLostAttestingRewards) BalanceUpdateKind() core.BalanceUpdateKind { + return core.BalanceUpdateKindBurned +} + +type BondID interface { + proto_016_PtMumbai.BondID +} + +type SmartRollupBondID struct { + Address *tz.SmartRollupAddress `json:"address"` +} + +func (SmartRollupBondID) BondID() {} + +func init() { + encoding.RegisterEnum(&encoding.Enum[BondID]{ + Variants: encoding.Variants[BondID]{ + 1: SmartRollupBondID{}, + }, + }) +} + +//json:category=BalanceUpdateCategory(),kind=BalanceUpdateKind() +type BalanceUpdateFrozenBonds struct { + Contract core.ContractID `json:"contract"` + BondID BondID `json:"bond_id"` +} + +func (*BalanceUpdateFrozenBonds) BalanceUpdateCategory() string { return "frozen_bonds" } +func (*BalanceUpdateFrozenBonds) BalanceUpdateKind() core.BalanceUpdateKind { + return core.BalanceUpdateKindFreezer +} + +type BalanceUpdateContents interface { + core.BalanceUpdateContents +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[BalanceUpdateContents]{ + Variants: encoding.Variants[BalanceUpdateContents]{ + 0: (*BalanceUpdateContract)(nil), + 2: BalanceUpdateBlockFees{}, + 4: (*BalanceUpdateDeposits)(nil), + 5: BalanceUpdateNonceRevelationRewards{}, + 7: BalanceUpdateAttestingRewards{}, + 8: BalanceUpdateBakingRewards{}, + 9: BalanceUpdateBakingBonuses{}, + 11: BalanceUpdateStorageFees{}, + 12: BalanceUpdateDoubleSigningPunishments{}, + 13: (*BalanceUpdateLostAttestingRewards)(nil), + 14: BalanceUpdateLiquidityBakingSubsidies{}, + 15: BalanceUpdateBurned{}, + 16: (*BalanceUpdateCommitments)(nil), + 17: BalanceUpdateBootstrap{}, + 18: BalanceUpdateInvoice{}, + 19: BalanceUpdateInitialCommitments{}, + 20: BalanceUpdateMinted{}, + 21: (*BalanceUpdateFrozenBonds)(nil), + 24: BalanceUpdateSmartRollupRefutationPunishments{}, + 25: BalanceUpdateSmartRollupRefutationRewards{}, + 26: (*BalanceUpdateUnstakedDeposits)(nil), + 27: StakingDelegatorNumerator{}, + 28: StakingDelegateDenominator{}, + }, + }) +} diff --git a/protocol/proto_021_PsquebeC/block.go b/protocol/proto_021_PsquebeC/block.go new file mode 100644 index 0000000..4cde07e --- /dev/null +++ b/protocol/proto_021_PsquebeC/block.go @@ -0,0 +1,93 @@ +package proto_021_PsquebeC + +import ( + tz "github.com/ecadlabs/gotez/v2" + "github.com/ecadlabs/gotez/v2/protocol/core" + "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" +) + +type UnsignedProtocolBlockHeader = proto_018_Proxford.UnsignedProtocolBlockHeader +type UnsignedBlockHeader = proto_018_Proxford.UnsignedBlockHeader +type BlockHeader = proto_018_Proxford.BlockHeader +type BlockHeaderInfo = proto_018_Proxford.BlockHeaderInfo + +type BlockInfo struct { + ChainID *tz.ChainID `json:"chain_id"` + Hash *tz.BlockHash `json:"hash"` + Header BlockHeader `tz:"dyn" json:"header"` + Metadata tz.Option[BlockMetadata] `json:"metadata"` + Operations []core.OperationsList[GroupContents] `tz:"dyn" json:"operations"` +} + +func (block *BlockInfo) GetChainID() *tz.ChainID { return block.ChainID } +func (block *BlockInfo) GetHash() *tz.BlockHash { return block.Hash } +func (block *BlockInfo) GetHeader() core.BlockHeader { return &block.Header } +func (block *BlockInfo) GetMetadata() tz.Option[core.BlockMetadata] { + if m, ok := block.Metadata.CheckUnwrapPtr(); ok { + return tz.Some[core.BlockMetadata](m) + } + return tz.None[core.BlockMetadata]() +} + +func (block *BlockInfo) GetOperations() [][]core.OperationsGroup { + out := make([][]core.OperationsGroup, len(block.Operations)) + for i, list := range block.Operations { + out[i] = list.GetGroups() + } + return out +} + +type BlockMetadata struct { + BlockMetadataContents `tz:"dyn"` +} + +type BlockMetadataContents struct { + core.BlockMetadataHeader + Proposer tz.PublicKeyHash `json:"proposer"` + Baker tz.PublicKeyHash `json:"baker"` + LevelInfo core.LevelInfo `json:"level_info"` + VotingPeriodInfo core.VotingPeriodInfo `json:"voting_period_info"` + NonceHash tz.Option1[*tz.CycleNonceHash] `json:"nonce_hash"` + Deactivated []tz.PublicKeyHash `tz:"dyn" json:"deactivated"` + BalanceUpdates []*BalanceUpdate `tz:"dyn" json:"balance_updates"` + LiquidityBakingToggleEMA int32 `json:"liquidity_baking_toggle_ema"` + AdaptiveIssuanceVoteEMA int32 `json:"adaptive_issuance_vote_ema"` + AdaptiveIssuanceActivationCycle tz.Option[int32] `json:"adaptive_issuance_activation_cycle"` + ImplicitOperationsResults []SuccessfulManagerOperationResult `tz:"dyn" json:"implicit_operations_results"` + ProposerConsensusKey tz.PublicKeyHash `json:"proposer_consensus_key"` + BakerConsensusKey tz.PublicKeyHash `json:"baker_consensus_key"` + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + DALAttestation tz.BigInt `json:"dal_attestation"` +} + +func (m *BlockMetadata) GetMetadataHeader() *core.BlockMetadataHeader { return &m.BlockMetadataHeader } +func (m *BlockMetadata) GetProposer() tz.PublicKeyHash { return m.Proposer } +func (m *BlockMetadata) GetBaker() tz.PublicKeyHash { return m.Baker } +func (m *BlockMetadata) GetLevelInfo() *core.LevelInfo { return &m.LevelInfo } +func (m *BlockMetadata) GetVotingPeriodInfo() *core.VotingPeriodInfo { return &m.VotingPeriodInfo } +func (m *BlockMetadata) GetNonceHash() tz.Option[*tz.CycleNonceHash] { return m.NonceHash.Option } +func (m *BlockMetadata) GetConsumedGas() tz.Option[tz.BigUint] { return tz.None[tz.BigUint]() } +func (m *BlockMetadata) GetConsumedMilligas() tz.Option[tz.BigUint] { + return tz.Some(m.ConsumedMilligas) +} +func (m *BlockMetadata) GetDeactivated() []tz.PublicKeyHash { return m.Deactivated } +func (m *BlockMetadata) GetBalanceUpdates() (updates []core.BalanceUpdate) { + updates = make([]core.BalanceUpdate, len(m.BalanceUpdates)) + for i, u := range m.BalanceUpdates { + updates[i] = u + } + return +} +func (m *BlockMetadata) GetImplicitOperationsResults() []core.SuccessfulManagerOperationResult { + out := make([]core.SuccessfulManagerOperationResult, len(m.ImplicitOperationsResults)) + for i, v := range m.ImplicitOperationsResults { + out[i] = v + } + return out +} +func (m *BlockMetadata) GetProposerConsensusKey() tz.Option[tz.PublicKeyHash] { + return tz.Some(m.ProposerConsensusKey) +} +func (m *BlockMetadata) GetBakerConsensusKey() tz.Option[tz.PublicKeyHash] { + return tz.Some(m.BakerConsensusKey) +} diff --git a/protocol/proto_021_PsquebeC/constants.go b/protocol/proto_021_PsquebeC/constants.go new file mode 100644 index 0000000..7614ea5 --- /dev/null +++ b/protocol/proto_021_PsquebeC/constants.go @@ -0,0 +1,11 @@ +package proto_021_PsquebeC + +import ( + "github.com/ecadlabs/gotez/v2/protocol/proto_019_PtParisB" +) + +type Constants = proto_019_PtParisB.Constants +type IssuanceWeights = proto_019_PtParisB.IssuanceWeights +type DALParametric = proto_019_PtParisB.DALParametric +type AdaptiveRewardsParams = proto_019_PtParisB.AdaptiveRewardsParams +type SmartRollupRevealActivationLevel = proto_019_PtParisB.SmartRollupRevealActivationLevel diff --git a/protocol/proto_021_PsquebeC/constants_test.go b/protocol/proto_021_PsquebeC/constants_test.go new file mode 100644 index 0000000..83c8b65 --- /dev/null +++ b/protocol/proto_021_PsquebeC/constants_test.go @@ -0,0 +1,188 @@ +package proto_021_PsquebeC + +import ( + "fmt" + "testing" + + "github.com/ecadlabs/gotez/v2" + "github.com/ecadlabs/gotez/v2/encoding" + "github.com/ecadlabs/gotez/v2/protocol/core" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestConstants(t *testing.T) { + src := []byte{ + 0x00, 0x00, 0x01, 0x55, 0x08, 0x20, 0x84, 0x00, 0x00, 0x80, 0x00, 0x14, 0x00, 0x00, 0xc3, 0x50, + 0x00, 0x00, 0xc3, 0x50, 0x00, 0x00, 0x27, 0x10, 0x03, 0x07, 0xd1, 0x02, 0x00, 0x00, 0x75, 0x30, + 0x00, 0x00, 0x10, 0x00, 0xc0, 0x84, 0x3d, 0x02, 0x01, 0x03, 0x00, 0x00, 0x00, 0xd2, 0x00, 0x00, + 0x00, 0x19, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x01, 0x80, 0xfa, 0x7e, 0x80, 0xa0, 0x96, + 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xf8, 0x82, 0xad, 0x16, 0x80, 0x8c, + 0x8d, 0x9e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x96, 0x80, 0x00, 0x00, 0x01, 0x01, 0xc4, + 0xbb, 0xc4, 0x28, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xfa, 0x01, 0xa0, 0xa9, 0x07, 0x00, 0x00, 0x07, 0xd0, + 0x00, 0x00, 0x1b, 0x58, 0x00, 0x00, 0x01, 0xf4, 0xc0, 0x96, 0xb1, 0x02, 0x00, 0x01, 0x86, 0xa0, + 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x1b, 0x58, 0x00, 0x00, 0x12, 0x3b, 0x00, 0x02, 0x00, 0x03, 0x09, 0x02, + 0xbc, 0x13, 0x88, 0x27, 0x10, 0x00, 0x00, 0x09, 0x1e, 0xff, 0x00, 0xc9, 0x7f, 0xb9, 0x64, 0xe7, + 0x69, 0xad, 0x54, 0x96, 0xdb, 0x51, 0xe8, 0x86, 0xe3, 0xf0, 0x7b, 0xd2, 0x81, 0xed, 0x74, 0x00, + 0x05, 0xf5, 0xe1, 0x00, 0x08, 0x08, 0xff, 0x00, 0x00, 0x20, 0x08, 0x42, 0x08, 0x0f, 0x7f, 0x00, + 0x01, 0xef, 0xe0, 0x02, 0x00, 0xff, 0x00, 0x00, 0x18, 0xaa, 0x00, 0x00, 0x00, 0x3e, 0x80, 0x90, + 0xa1, 0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xb7, 0x1b, 0x00, 0x00, 0x7b, 0x0c, 0x00, 0x00, + 0x00, 0x64, 0x20, 0x00, 0x00, 0x03, 0x0d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x03, 0xb1, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, + 0x08, 0x00, 0x05, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x90, 0x06, 0x01, 0x0a, 0x09, 0x88, 0x03, + 0x0b, 0x88, 0x03, 0x0a, 0x32, 0x00, 0x00, 0x2d, 0x79, 0x88, 0x3d, 0x20, 0x00, 0x01, 0xa4, 0x01, + 0x01, 0x02, 0x01, 0x32, 0xff, 0xff, 0x00, 0xff, 0x00, + } + + expect := Constants{ + ProofOfWorkNonceSize: 8, + NonceLength: 32, + MaxAnonOpsPerBlock: 132, + MaxOperationDataLength: 32768, + MaxProposalsPerDelegate: 20, + MaxMichelineNodeCount: 50000, + MaxMichelineBytesLimit: 50000, + MaxAllowedGlobalConstantsDepth: 10000, + CacheLayoutSize: 3, + MichelsonMaximumTypeSize: 2001, + MaxSlashingPeriod: 2, + SmartRollupMaxWrappedProofBinarySize: 30000, + SmartRollupMessageSizeLimit: 4096, + SmartRollupMaxNumberOfMessagesPerLevel: gotez.BigUint{0xc0, 0x84, 0x3d}, + ConsensusRightsDelay: 2, + BlocksPreservationCycles: 1, + DelegateParametersActivationDelay: 3, + BlocksPerCycle: 210, + BlocksPerCommitment: 25, + NonceRevelationThreshold: 50, + CyclesPerVotingPeriod: 1, + HardGasLimitPerOperation: gotez.BigInt{0x80, 0xfa, 0x7e}, + HardGasLimitPerBlock: gotez.BigInt{0x80, 0xa0, 0x96, 0x03}, + ProofOfWorkThreshold: -1, + MinimalStake: gotez.BigUint{0x80, 0xf8, 0x82, 0xad, 0x16}, + MinimalFrozenStake: gotez.BigUint{0x80, 0x8c, 0x8d, 0x9e, 02}, + VDFDifficulty: 10000000, + OriginationSize: 257, + IssuanceWeights: IssuanceWeights{ + BaseTotalIssuedPerMinute: gotez.BigUint{0xc4, 0xbb, 0xc4, 0x28}, + BakingRewardFixedPortionWeight: 5120, + BakingRewardBonusWeight: 5120, + AttestingRewardWeight: 10240, + SeedNonceRevelationTipWeight: 1, + VDFRevelationTipWeight: 1, + }, + CostPerByte: gotez.BigUint{0xfa, 0x01}, + HardStorageLimitPerOperation: gotez.BigInt{0xa0, 0xa9, 0x07}, + QuorumMin: 2000, + QuorumMax: 7000, + MinProposalQuorum: 500, + LiquidityBakingSubsidy: gotez.BigUint{0xc0, 0x96, 0xb1, 0x02}, + LiquidityBakingToggleEmaThreshold: 100000, + MaxOperationsTimeToLive: 187, + MinimalBlockDelay: 4, + DelayIncrementPerRound: 4, + ConsensusCommitteeSize: 7000, + ConsensusThreshold: 4667, + MinimalParticipationRatio: core.Rat{2, 3}, + LimitOfDelegationOverBaking: 9, + PercentageOfFrozenDepositsSlashedPerDoubleBaking: 700, + PercentageOfFrozenDepositsSlashedPerDoubleAttestation: 5000, + MaxSlashingPerBlock: 10000, + MaxSlashingThreshold: 2334, + TestnetDictator: gotez.Some[gotez.PublicKeyHash](&gotez.Ed25519PublicKeyHash{0xc9, 0x7f, 0xb9, 0x64, 0xe7, 0x69, 0xad, 0x54, 0x96, 0xdb, 0x51, 0xe8, 0x86, 0xe3, 0xf0, 0x7b, 0xd2, 0x81, 0xed, 0x74}), + InitialSeed: gotez.None[*gotez.Bytes32](), + CacheScriptSize: 100000000, + CacheStakeDistributionCycles: 8, + CacheSamplerStateCycles: 8, + DALParametric: DALParametric{ + FeatureEnable: true, + IncentivesEnable: false, + NumberOfSlots: 32, + AttestationLag: 8, + AttestationThreshold: 66, + RedundancyFactor: 8, + PageSize: 3967, + SlotSize: 126944, + NumberOfShards: 512, + }, + SmartRollupArithPvmEnable: true, + SmartRollupOriginationSize: 6314, + SmartRollupChallengeWindowInBlocks: 62, + SmartRollupStakeAmount: gotez.BigUint{0x80, 0x90, 0xa1, 0x0f}, + SmartRollupCommitmentPeriodInBlocks: 31, + SmartRollupMaxLookaheadInBlocks: 46875, + SmartRollupMaxActiveOutboxLevels: 31500, + SmartRollupMaxOutboxMessagesPerLevel: 100, + SmartRollupNumberOfSectionsInDissection: 32, + SmartRollupTimeoutPeriodInBlocks: 781, + SmartRollupMaxNumberOfCementedCommitments: 5, + SmartRollupMaxNumberOfParallelGames: 32, + SmartRollupRevealActivationLevel: SmartRollupRevealActivationLevel{ + RawData: 0, + Metadata: 0, + DALPage: 1, + DALParameters: 1, + DALAttestedSlotsValidityLag: 241920, + }, + SmartRollupPrivateEnable: true, + SmartRollupRiscvPVMEnable: true, + ZkRollupEnable: true, + ZkRollupOriginationSize: 4000, + ZkRollupMinPendingToProcess: 10, + ZkRollupMaxTicketPayloadSize: 2048, + GlobalLimitOfStakingOverBaking: 5, + EdgeOfStakingOverDelegation: 2, + AdaptiveIssuanceLaunchEMAThreshold: 0, + AdaptiveRewardsParams: AdaptiveRewardsParams{ + IssuanceRatioFinalMin: core.BigRat{ + gotez.BigInt{0x01}, + gotez.BigInt{0x90, 0x06}, + }, + IssuanceRatioFinalMax: core.BigRat{ + gotez.BigInt{0x01}, + gotez.BigInt{0x0a}, + }, + IssuanceRatioInitialMin: core.BigRat{ + gotez.BigInt{0x09}, + gotez.BigInt{0x88, 0x03}, + }, + IssuanceRatioInitialMax: core.BigRat{ + gotez.BigInt{0x0b}, + gotez.BigInt{0x88, 0x03}, + }, + InitialPeriod: 10, + TransitionPeriod: 50, + MaxBonus: 50000000000000, + GrowthRate: core.BigRat{ + gotez.BigInt{0x01}, + gotez.BigInt{0xa4, 0x01}, + }, + CenterDz: core.BigRat{ + gotez.BigInt{0x01}, + gotez.BigInt{0x02}, + }, + RadiusDz: core.BigRat{ + gotez.BigInt{0x01}, + gotez.BigInt{0x32}, + }, + }, + AdaptiveIssuanceActivationVoteEnable: true, + AutostakingEnable: true, + AdaptiveIssuanceForceActivation: false, + NSEnable: true, + DirectTicketSpendingEnable: false, + } + + var out Constants + _, err := encoding.Decode(src, &out, encoding.Dynamic()) + if !assert.NoError(t, err) { + if err, ok := err.(*encoding.Error); ok { + fmt.Println(err.Path) + } + } else { + require.Equal(t, &expect, &out) + } +} diff --git a/protocol/proto_021_PsquebeC/helpers.go b/protocol/proto_021_PsquebeC/helpers.go new file mode 100644 index 0000000..092a94f --- /dev/null +++ b/protocol/proto_021_PsquebeC/helpers.go @@ -0,0 +1,15 @@ +package proto_021_PsquebeC + +import ( + "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" + "github.com/ecadlabs/gotez/v2/protocol/proto_019_PtParisB" +) + +type UnsignedOperation = proto_018_Proxford.UnsignedOperationImpl[OperationContents] +type SignedOperation = proto_018_Proxford.SignedOperationImpl[OperationContents] +type RunOperationRequest = proto_018_Proxford.RunOperationRequestImpl[RunOperationRequestContents] +type RunOperationRequestContents = proto_019_PtParisB.RunOperationRequestContents + +var NewRunOperationRequest = proto_019_PtParisB.NewRunOperationRequest +var NewUnsignedOperation = proto_019_PtParisB.NewUnsignedOperation +var NewSignedOperation = proto_019_PtParisB.NewSignedOperation diff --git a/protocol/proto_021_PsquebeC/json_gen.go b/protocol/proto_021_PsquebeC/json_gen.go new file mode 100644 index 0000000..b2a3e11 --- /dev/null +++ b/protocol/proto_021_PsquebeC/json_gen.go @@ -0,0 +1,652 @@ +package proto_021_PsquebeC + +import "encoding/json" + +// Code generated by genmarshaller.go DO NOT EDIT. + +func (self *TransactionSuccessfulManagerResult) MarshalJSON() ([]byte, error) { + type TransactionSuccessfulManagerResult_no_json_marshaller TransactionSuccessfulManagerResult + + type json_TransactionSuccessfulManagerResult struct { + Marker0 any `json:"kind"` + TransactionSuccessfulManagerResult_no_json_marshaller + } + + tmp := json_TransactionSuccessfulManagerResult { + Marker0: self.OperationKind(), + TransactionSuccessfulManagerResult_no_json_marshaller: TransactionSuccessfulManagerResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *TransactionContentsAndResult) MarshalJSON() ([]byte, error) { + type TransactionContentsAndResult_no_json_marshaller TransactionContentsAndResult + + type json_TransactionContentsAndResult struct { + Marker0 any `json:"kind"` + TransactionContentsAndResult_no_json_marshaller + } + + tmp := json_TransactionContentsAndResult { + Marker0: self.OperationKind(), + TransactionContentsAndResult_no_json_marshaller: TransactionContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *TransactionInternalOperationResult) MarshalJSON() ([]byte, error) { + type TransactionInternalOperationResult_no_json_marshaller TransactionInternalOperationResult + + type json_TransactionInternalOperationResult struct { + Marker0 any `json:"kind"` + TransactionInternalOperationResult_no_json_marshaller + } + + tmp := json_TransactionInternalOperationResult { + Marker0: self.OperationKind(), + TransactionInternalOperationResult_no_json_marshaller: TransactionInternalOperationResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *BalanceUpdateAttestingRewards) MarshalJSON() ([]byte, error) { + type BalanceUpdateAttestingRewards_no_json_marshaller BalanceUpdateAttestingRewards + + type json_BalanceUpdateAttestingRewards struct { + Marker0 any `json:"category"` + Marker1 any `json:"kind"` + BalanceUpdateAttestingRewards_no_json_marshaller + } + + tmp := json_BalanceUpdateAttestingRewards { + Marker0: self.BalanceUpdateCategory(), + Marker1: self.BalanceUpdateKind(), + BalanceUpdateAttestingRewards_no_json_marshaller: BalanceUpdateAttestingRewards_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *BalanceUpdateLostAttestingRewards) MarshalJSON() ([]byte, error) { + type BalanceUpdateLostAttestingRewards_no_json_marshaller BalanceUpdateLostAttestingRewards + + type json_BalanceUpdateLostAttestingRewards struct { + Marker0 any `json:"category"` + Marker1 any `json:"kind"` + BalanceUpdateLostAttestingRewards_no_json_marshaller + } + + tmp := json_BalanceUpdateLostAttestingRewards { + Marker0: self.BalanceUpdateCategory(), + Marker1: self.BalanceUpdateKind(), + BalanceUpdateLostAttestingRewards_no_json_marshaller: BalanceUpdateLostAttestingRewards_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *BalanceUpdateFrozenBonds) MarshalJSON() ([]byte, error) { + type BalanceUpdateFrozenBonds_no_json_marshaller BalanceUpdateFrozenBonds + + type json_BalanceUpdateFrozenBonds struct { + Marker0 any `json:"category"` + Marker1 any `json:"kind"` + BalanceUpdateFrozenBonds_no_json_marshaller + } + + tmp := json_BalanceUpdateFrozenBonds { + Marker0: self.BalanceUpdateCategory(), + Marker1: self.BalanceUpdateKind(), + BalanceUpdateFrozenBonds_no_json_marshaller: BalanceUpdateFrozenBonds_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SeedNonceRevelationContentsAndResult) MarshalJSON() ([]byte, error) { + type SeedNonceRevelationContentsAndResult_no_json_marshaller SeedNonceRevelationContentsAndResult + + type json_SeedNonceRevelationContentsAndResult struct { + Marker0 any `json:"kind"` + SeedNonceRevelationContentsAndResult_no_json_marshaller + } + + tmp := json_SeedNonceRevelationContentsAndResult { + Marker0: self.OperationKind(), + SeedNonceRevelationContentsAndResult_no_json_marshaller: SeedNonceRevelationContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *DoubleAttestationEvidenceContentsAndResult) MarshalJSON() ([]byte, error) { + type DoubleAttestationEvidenceContentsAndResult_no_json_marshaller DoubleAttestationEvidenceContentsAndResult + + type json_DoubleAttestationEvidenceContentsAndResult struct { + Marker0 any `json:"kind"` + DoubleAttestationEvidenceContentsAndResult_no_json_marshaller + } + + tmp := json_DoubleAttestationEvidenceContentsAndResult { + Marker0: self.OperationKind(), + DoubleAttestationEvidenceContentsAndResult_no_json_marshaller: DoubleAttestationEvidenceContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *DoubleBakingEvidenceContentsAndResult) MarshalJSON() ([]byte, error) { + type DoubleBakingEvidenceContentsAndResult_no_json_marshaller DoubleBakingEvidenceContentsAndResult + + type json_DoubleBakingEvidenceContentsAndResult struct { + Marker0 any `json:"kind"` + DoubleBakingEvidenceContentsAndResult_no_json_marshaller + } + + tmp := json_DoubleBakingEvidenceContentsAndResult { + Marker0: self.OperationKind(), + DoubleBakingEvidenceContentsAndResult_no_json_marshaller: DoubleBakingEvidenceContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *ActivateAccountContentsAndResult) MarshalJSON() ([]byte, error) { + type ActivateAccountContentsAndResult_no_json_marshaller ActivateAccountContentsAndResult + + type json_ActivateAccountContentsAndResult struct { + Marker0 any `json:"kind"` + ActivateAccountContentsAndResult_no_json_marshaller + } + + tmp := json_ActivateAccountContentsAndResult { + Marker0: self.OperationKind(), + ActivateAccountContentsAndResult_no_json_marshaller: ActivateAccountContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *DoublePreattestationEvidenceContentsAndResult) MarshalJSON() ([]byte, error) { + type DoublePreattestationEvidenceContentsAndResult_no_json_marshaller DoublePreattestationEvidenceContentsAndResult + + type json_DoublePreattestationEvidenceContentsAndResult struct { + Marker0 any `json:"kind"` + DoublePreattestationEvidenceContentsAndResult_no_json_marshaller + } + + tmp := json_DoublePreattestationEvidenceContentsAndResult { + Marker0: self.OperationKind(), + DoublePreattestationEvidenceContentsAndResult_no_json_marshaller: DoublePreattestationEvidenceContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *VDFRevelationContentsAndResult) MarshalJSON() ([]byte, error) { + type VDFRevelationContentsAndResult_no_json_marshaller VDFRevelationContentsAndResult + + type json_VDFRevelationContentsAndResult struct { + Marker0 any `json:"kind"` + VDFRevelationContentsAndResult_no_json_marshaller + } + + tmp := json_VDFRevelationContentsAndResult { + Marker0: self.OperationKind(), + VDFRevelationContentsAndResult_no_json_marshaller: VDFRevelationContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *DrainDelegateContentsAndResult) MarshalJSON() ([]byte, error) { + type DrainDelegateContentsAndResult_no_json_marshaller DrainDelegateContentsAndResult + + type json_DrainDelegateContentsAndResult struct { + Marker0 any `json:"kind"` + DrainDelegateContentsAndResult_no_json_marshaller + } + + tmp := json_DrainDelegateContentsAndResult { + Marker0: self.OperationKind(), + DrainDelegateContentsAndResult_no_json_marshaller: DrainDelegateContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *AttestationContentsAndResult) MarshalJSON() ([]byte, error) { + type AttestationContentsAndResult_no_json_marshaller AttestationContentsAndResult + + type json_AttestationContentsAndResult struct { + Marker0 any `json:"kind"` + AttestationContentsAndResult_no_json_marshaller + } + + tmp := json_AttestationContentsAndResult { + Marker0: self.OperationKind(), + AttestationContentsAndResult_no_json_marshaller: AttestationContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *PreattestationContentsAndResult) MarshalJSON() ([]byte, error) { + type PreattestationContentsAndResult_no_json_marshaller PreattestationContentsAndResult + + type json_PreattestationContentsAndResult struct { + Marker0 any `json:"kind"` + PreattestationContentsAndResult_no_json_marshaller + } + + tmp := json_PreattestationContentsAndResult { + Marker0: self.OperationKind(), + PreattestationContentsAndResult_no_json_marshaller: PreattestationContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *AttestationWithDALContentsAndResult) MarshalJSON() ([]byte, error) { + type AttestationWithDALContentsAndResult_no_json_marshaller AttestationWithDALContentsAndResult + + type json_AttestationWithDALContentsAndResult struct { + Marker0 any `json:"kind"` + AttestationWithDALContentsAndResult_no_json_marshaller + } + + tmp := json_AttestationWithDALContentsAndResult { + Marker0: self.OperationKind(), + AttestationWithDALContentsAndResult_no_json_marshaller: AttestationWithDALContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *RevealContentsAndResult) MarshalJSON() ([]byte, error) { + type RevealContentsAndResult_no_json_marshaller RevealContentsAndResult + + type json_RevealContentsAndResult struct { + Marker0 any `json:"kind"` + RevealContentsAndResult_no_json_marshaller + } + + tmp := json_RevealContentsAndResult { + Marker0: self.OperationKind(), + RevealContentsAndResult_no_json_marshaller: RevealContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *DelegationContentsAndResult) MarshalJSON() ([]byte, error) { + type DelegationContentsAndResult_no_json_marshaller DelegationContentsAndResult + + type json_DelegationContentsAndResult struct { + Marker0 any `json:"kind"` + DelegationContentsAndResult_no_json_marshaller + } + + tmp := json_DelegationContentsAndResult { + Marker0: self.OperationKind(), + DelegationContentsAndResult_no_json_marshaller: DelegationContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *UpdateConsensusKeyContentsAndResult) MarshalJSON() ([]byte, error) { + type UpdateConsensusKeyContentsAndResult_no_json_marshaller UpdateConsensusKeyContentsAndResult + + type json_UpdateConsensusKeyContentsAndResult struct { + Marker0 any `json:"kind"` + UpdateConsensusKeyContentsAndResult_no_json_marshaller + } + + tmp := json_UpdateConsensusKeyContentsAndResult { + Marker0: self.OperationKind(), + UpdateConsensusKeyContentsAndResult_no_json_marshaller: UpdateConsensusKeyContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SetDepositsLimitContentsAndResult) MarshalJSON() ([]byte, error) { + type SetDepositsLimitContentsAndResult_no_json_marshaller SetDepositsLimitContentsAndResult + + type json_SetDepositsLimitContentsAndResult struct { + Marker0 any `json:"kind"` + SetDepositsLimitContentsAndResult_no_json_marshaller + } + + tmp := json_SetDepositsLimitContentsAndResult { + Marker0: self.OperationKind(), + SetDepositsLimitContentsAndResult_no_json_marshaller: SetDepositsLimitContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *DALPublishCommitmentContentsAndResult) MarshalJSON() ([]byte, error) { + type DALPublishCommitmentContentsAndResult_no_json_marshaller DALPublishCommitmentContentsAndResult + + type json_DALPublishCommitmentContentsAndResult struct { + Marker0 any `json:"kind"` + DALPublishCommitmentContentsAndResult_no_json_marshaller + } + + tmp := json_DALPublishCommitmentContentsAndResult { + Marker0: self.OperationKind(), + DALPublishCommitmentContentsAndResult_no_json_marshaller: DALPublishCommitmentContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *RegisterGlobalConstantContentsAndResult) MarshalJSON() ([]byte, error) { + type RegisterGlobalConstantContentsAndResult_no_json_marshaller RegisterGlobalConstantContentsAndResult + + type json_RegisterGlobalConstantContentsAndResult struct { + Marker0 any `json:"kind"` + RegisterGlobalConstantContentsAndResult_no_json_marshaller + } + + tmp := json_RegisterGlobalConstantContentsAndResult { + Marker0: self.OperationKind(), + RegisterGlobalConstantContentsAndResult_no_json_marshaller: RegisterGlobalConstantContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *OriginationSuccessfulManagerResult) MarshalJSON() ([]byte, error) { + type OriginationSuccessfulManagerResult_no_json_marshaller OriginationSuccessfulManagerResult + + type json_OriginationSuccessfulManagerResult struct { + Marker0 any `json:"kind"` + OriginationSuccessfulManagerResult_no_json_marshaller + } + + tmp := json_OriginationSuccessfulManagerResult { + Marker0: self.OperationKind(), + OriginationSuccessfulManagerResult_no_json_marshaller: OriginationSuccessfulManagerResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *OriginationContentsAndResult) MarshalJSON() ([]byte, error) { + type OriginationContentsAndResult_no_json_marshaller OriginationContentsAndResult + + type json_OriginationContentsAndResult struct { + Marker0 any `json:"kind"` + OriginationContentsAndResult_no_json_marshaller + } + + tmp := json_OriginationContentsAndResult { + Marker0: self.OperationKind(), + OriginationContentsAndResult_no_json_marshaller: OriginationContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *IncreasePaidStorageSuccessfulManagerResult) MarshalJSON() ([]byte, error) { + type IncreasePaidStorageSuccessfulManagerResult_no_json_marshaller IncreasePaidStorageSuccessfulManagerResult + + type json_IncreasePaidStorageSuccessfulManagerResult struct { + Marker0 any `json:"kind"` + IncreasePaidStorageSuccessfulManagerResult_no_json_marshaller + } + + tmp := json_IncreasePaidStorageSuccessfulManagerResult { + Marker0: self.OperationKind(), + IncreasePaidStorageSuccessfulManagerResult_no_json_marshaller: IncreasePaidStorageSuccessfulManagerResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *IncreasePaidStorageContentsAndResult) MarshalJSON() ([]byte, error) { + type IncreasePaidStorageContentsAndResult_no_json_marshaller IncreasePaidStorageContentsAndResult + + type json_IncreasePaidStorageContentsAndResult struct { + Marker0 any `json:"kind"` + IncreasePaidStorageContentsAndResult_no_json_marshaller + } + + tmp := json_IncreasePaidStorageContentsAndResult { + Marker0: self.OperationKind(), + IncreasePaidStorageContentsAndResult_no_json_marshaller: IncreasePaidStorageContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *TransferTicketContentsAndResult) MarshalJSON() ([]byte, error) { + type TransferTicketContentsAndResult_no_json_marshaller TransferTicketContentsAndResult + + type json_TransferTicketContentsAndResult struct { + Marker0 any `json:"kind"` + TransferTicketContentsAndResult_no_json_marshaller + } + + tmp := json_TransferTicketContentsAndResult { + Marker0: self.OperationKind(), + TransferTicketContentsAndResult_no_json_marshaller: TransferTicketContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *OriginationInternalOperationResult) MarshalJSON() ([]byte, error) { + type OriginationInternalOperationResult_no_json_marshaller OriginationInternalOperationResult + + type json_OriginationInternalOperationResult struct { + Marker0 any `json:"kind"` + OriginationInternalOperationResult_no_json_marshaller + } + + tmp := json_OriginationInternalOperationResult { + Marker0: self.OperationKind(), + OriginationInternalOperationResult_no_json_marshaller: OriginationInternalOperationResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupOriginateContentsAndResult) MarshalJSON() ([]byte, error) { + type SmartRollupOriginateContentsAndResult_no_json_marshaller SmartRollupOriginateContentsAndResult + + type json_SmartRollupOriginateContentsAndResult struct { + Marker0 any `json:"kind"` + SmartRollupOriginateContentsAndResult_no_json_marshaller + } + + tmp := json_SmartRollupOriginateContentsAndResult { + Marker0: self.OperationKind(), + SmartRollupOriginateContentsAndResult_no_json_marshaller: SmartRollupOriginateContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupAddMessagesContentsAndResult) MarshalJSON() ([]byte, error) { + type SmartRollupAddMessagesContentsAndResult_no_json_marshaller SmartRollupAddMessagesContentsAndResult + + type json_SmartRollupAddMessagesContentsAndResult struct { + Marker0 any `json:"kind"` + SmartRollupAddMessagesContentsAndResult_no_json_marshaller + } + + tmp := json_SmartRollupAddMessagesContentsAndResult { + Marker0: self.OperationKind(), + SmartRollupAddMessagesContentsAndResult_no_json_marshaller: SmartRollupAddMessagesContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupCementContentsAndResult) MarshalJSON() ([]byte, error) { + type SmartRollupCementContentsAndResult_no_json_marshaller SmartRollupCementContentsAndResult + + type json_SmartRollupCementContentsAndResult struct { + Marker0 any `json:"kind"` + SmartRollupCementContentsAndResult_no_json_marshaller + } + + tmp := json_SmartRollupCementContentsAndResult { + Marker0: self.OperationKind(), + SmartRollupCementContentsAndResult_no_json_marshaller: SmartRollupCementContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupPublishContentsAndResult) MarshalJSON() ([]byte, error) { + type SmartRollupPublishContentsAndResult_no_json_marshaller SmartRollupPublishContentsAndResult + + type json_SmartRollupPublishContentsAndResult struct { + Marker0 any `json:"kind"` + SmartRollupPublishContentsAndResult_no_json_marshaller + } + + tmp := json_SmartRollupPublishContentsAndResult { + Marker0: self.OperationKind(), + SmartRollupPublishContentsAndResult_no_json_marshaller: SmartRollupPublishContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupTimeoutContentsAndResult) MarshalJSON() ([]byte, error) { + type SmartRollupTimeoutContentsAndResult_no_json_marshaller SmartRollupTimeoutContentsAndResult + + type json_SmartRollupTimeoutContentsAndResult struct { + Marker0 any `json:"kind"` + SmartRollupTimeoutContentsAndResult_no_json_marshaller + } + + tmp := json_SmartRollupTimeoutContentsAndResult { + Marker0: self.OperationKind(), + SmartRollupTimeoutContentsAndResult_no_json_marshaller: SmartRollupTimeoutContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupRefuteContentsAndResult) MarshalJSON() ([]byte, error) { + type SmartRollupRefuteContentsAndResult_no_json_marshaller SmartRollupRefuteContentsAndResult + + type json_SmartRollupRefuteContentsAndResult struct { + Marker0 any `json:"kind"` + SmartRollupRefuteContentsAndResult_no_json_marshaller + } + + tmp := json_SmartRollupRefuteContentsAndResult { + Marker0: self.OperationKind(), + SmartRollupRefuteContentsAndResult_no_json_marshaller: SmartRollupRefuteContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupExecuteOutboxMessageContentsAndResult) MarshalJSON() ([]byte, error) { + type SmartRollupExecuteOutboxMessageContentsAndResult_no_json_marshaller SmartRollupExecuteOutboxMessageContentsAndResult + + type json_SmartRollupExecuteOutboxMessageContentsAndResult struct { + Marker0 any `json:"kind"` + SmartRollupExecuteOutboxMessageContentsAndResult_no_json_marshaller + } + + tmp := json_SmartRollupExecuteOutboxMessageContentsAndResult { + Marker0: self.OperationKind(), + SmartRollupExecuteOutboxMessageContentsAndResult_no_json_marshaller: SmartRollupExecuteOutboxMessageContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupRecoverBondContentsAndResult) MarshalJSON() ([]byte, error) { + type SmartRollupRecoverBondContentsAndResult_no_json_marshaller SmartRollupRecoverBondContentsAndResult + + type json_SmartRollupRecoverBondContentsAndResult struct { + Marker0 any `json:"kind"` + SmartRollupRecoverBondContentsAndResult_no_json_marshaller + } + + tmp := json_SmartRollupRecoverBondContentsAndResult { + Marker0: self.OperationKind(), + SmartRollupRecoverBondContentsAndResult_no_json_marshaller: SmartRollupRecoverBondContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *SmartRollupOriginateSuccessfulManagerResult) MarshalJSON() ([]byte, error) { + type SmartRollupOriginateSuccessfulManagerResult_no_json_marshaller SmartRollupOriginateSuccessfulManagerResult + + type json_SmartRollupOriginateSuccessfulManagerResult struct { + Marker0 any `json:"kind"` + SmartRollupOriginateSuccessfulManagerResult_no_json_marshaller + } + + tmp := json_SmartRollupOriginateSuccessfulManagerResult { + Marker0: self.OperationKind(), + SmartRollupOriginateSuccessfulManagerResult_no_json_marshaller: SmartRollupOriginateSuccessfulManagerResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *ZkRollupOriginationContentsAndResult) MarshalJSON() ([]byte, error) { + type ZkRollupOriginationContentsAndResult_no_json_marshaller ZkRollupOriginationContentsAndResult + + type json_ZkRollupOriginationContentsAndResult struct { + Marker0 any `json:"kind"` + ZkRollupOriginationContentsAndResult_no_json_marshaller + } + + tmp := json_ZkRollupOriginationContentsAndResult { + Marker0: self.OperationKind(), + ZkRollupOriginationContentsAndResult_no_json_marshaller: ZkRollupOriginationContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *ZkRollupPublishContentsAndResult) MarshalJSON() ([]byte, error) { + type ZkRollupPublishContentsAndResult_no_json_marshaller ZkRollupPublishContentsAndResult + + type json_ZkRollupPublishContentsAndResult struct { + Marker0 any `json:"kind"` + ZkRollupPublishContentsAndResult_no_json_marshaller + } + + tmp := json_ZkRollupPublishContentsAndResult { + Marker0: self.OperationKind(), + ZkRollupPublishContentsAndResult_no_json_marshaller: ZkRollupPublishContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + +func (self *ZkRollupUpdateContentsAndResult) MarshalJSON() ([]byte, error) { + type ZkRollupUpdateContentsAndResult_no_json_marshaller ZkRollupUpdateContentsAndResult + + type json_ZkRollupUpdateContentsAndResult struct { + Marker0 any `json:"kind"` + ZkRollupUpdateContentsAndResult_no_json_marshaller + } + + tmp := json_ZkRollupUpdateContentsAndResult { + Marker0: self.OperationKind(), + ZkRollupUpdateContentsAndResult_no_json_marshaller: ZkRollupUpdateContentsAndResult_no_json_marshaller(*self), + } + + return json.Marshal(tmp) +} + diff --git a/protocol/proto_021_PsquebeC/operation_list.go b/protocol/proto_021_PsquebeC/operation_list.go new file mode 100644 index 0000000..d5332ba --- /dev/null +++ b/protocol/proto_021_PsquebeC/operation_list.go @@ -0,0 +1,36 @@ +package proto_021_PsquebeC + +import ( + "github.com/ecadlabs/gotez/v2/encoding" + "github.com/ecadlabs/gotez/v2/protocol/core" + "github.com/ecadlabs/gotez/v2/protocol/proto_016_PtMumbai" +) + +type OperationWithOptionalMetadata = core.OperationWithOptionalMetadata[OperationWithOptionalMetadataContents] + +type GroupContents interface { + core.GroupContents +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[GroupContents]{ + Variants: encoding.Variants[GroupContents]{ + 0: (*proto_016_PtMumbai.OperationWithTooLargeMetadata[OperationContents])(nil), + 1: (*proto_016_PtMumbai.OperationWithoutMetadata[OperationContents])(nil), + 2: (*OperationWithOptionalMetadata)(nil), + }, + }) +} + +type OperationWithOptionalMetadataContents interface { + core.OperationWithOptionalMetadataContents +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[OperationWithOptionalMetadataContents]{ + Variants: encoding.Variants[OperationWithOptionalMetadataContents]{ + 0: (*proto_016_PtMumbai.OperationWithOptionalMetadataWithMetadata[OperationContentsAndResult])(nil), + 1: (*proto_016_PtMumbai.OperationWithOptionalMetadataWithoutMetadata[OperationContents])(nil), + }, + }) +} diff --git a/protocol/proto_021_PsquebeC/operations.go b/protocol/proto_021_PsquebeC/operations.go new file mode 100644 index 0000000..063e370 --- /dev/null +++ b/protocol/proto_021_PsquebeC/operations.go @@ -0,0 +1,532 @@ +package proto_021_PsquebeC + +//go:generate go run ../../cmd/genmarshaller.go + +import ( + "math/big" + + tz "github.com/ecadlabs/gotez/v2" + "github.com/ecadlabs/gotez/v2/encoding" + "github.com/ecadlabs/gotez/v2/protocol/core" + "github.com/ecadlabs/gotez/v2/protocol/proto_012_Psithaca" + "github.com/ecadlabs/gotez/v2/protocol/proto_012_Psithaca/lazy" + "github.com/ecadlabs/gotez/v2/protocol/proto_013_PtJakart" + "github.com/ecadlabs/gotez/v2/protocol/proto_014_PtKathma" + "github.com/ecadlabs/gotez/v2/protocol/proto_015_PtLimaPt" + "github.com/ecadlabs/gotez/v2/protocol/proto_016_PtMumbai" + "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" + "github.com/ecadlabs/gotez/v2/protocol/proto_019_PtParisB" +) + +type ManagerOperation = proto_012_Psithaca.ManagerOperation +type SeedNonceRevelation = proto_012_Psithaca.SeedNonceRevelation +type DoubleAttestationEvidence = proto_018_Proxford.DoubleAttestationEvidence +type DoubleBakingEvidence = proto_018_Proxford.DoubleBakingEvidence +type ActivateAccount = proto_012_Psithaca.ActivateAccount +type Proposals = proto_012_Psithaca.Proposals +type Ballot = proto_012_Psithaca.Ballot +type DoublePreattestationEvidence = proto_018_Proxford.DoublePreattestationEvidence +type VDFRevelation = proto_014_PtKathma.VDFRevelation +type DrainDelegate = proto_015_PtLimaPt.DrainDelegate +type FailingNoop = proto_012_Psithaca.FailingNoop +type Preattestation = proto_018_Proxford.Preattestation +type InlinedPreattestationContents = proto_018_Proxford.InlinedPreattestationContents +type Attestation = proto_018_Proxford.Attestation +type InlinedAttestationContents = proto_018_Proxford.InlinedAttestationContents +type AttestationWithDAL = proto_019_PtParisB.AttestationWithDAL +type Reveal = proto_012_Psithaca.Reveal +type Origination = proto_012_Psithaca.Origination +type Delegation = proto_012_Psithaca.Delegation +type RegisterGlobalConstant = proto_012_Psithaca.RegisterGlobalConstant +type IncreasePaidStorage = proto_014_PtKathma.IncreasePaidStorage +type SetDepositsLimit = proto_012_Psithaca.SetDepositsLimit +type UpdateConsensusKey = proto_015_PtLimaPt.UpdateConsensusKey +type TransferTicket = proto_013_PtJakart.TransferTicket +type SignaturePrefix = proto_016_PtMumbai.SignaturePrefix +type ConsumedGasResult = proto_014_PtKathma.ConsumedGasResult +type Script = proto_012_Psithaca.Script +type DALAttestation = proto_016_PtMumbai.DALAttestation +type DALPublishSlotHeader = proto_018_Proxford.DALPublishSlotHeader +type BLSSignaturePrefix = proto_016_PtMumbai.BLSSignaturePrefix +type DALPublishCommitment = proto_019_PtParisB.DALPublishCommitment + +type OperationContents = proto_019_PtParisB.OperationContents + +type OperationContentsAndResult interface { + core.OperationContentsAndResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[OperationContentsAndResult]{ + Variants: encoding.Variants[OperationContentsAndResult]{ + 1: (*SeedNonceRevelationContentsAndResult)(nil), + 2: (*DoubleAttestationEvidenceContentsAndResult)(nil), + 3: (*DoubleBakingEvidenceContentsAndResult)(nil), + 4: (*ActivateAccountContentsAndResult)(nil), + 5: (*Proposals)(nil), + 6: (*Ballot)(nil), + 7: (*DoublePreattestationEvidenceContentsAndResult)(nil), + 8: (*VDFRevelationContentsAndResult)(nil), + 9: (*DrainDelegateContentsAndResult)(nil), + 20: (*PreattestationContentsAndResult)(nil), + 21: (*AttestationContentsAndResult)(nil), + 23: (*AttestationWithDALContentsAndResult)(nil), + 107: (*RevealContentsAndResult)(nil), + 108: (*TransactionContentsAndResult)(nil), + 109: (*OriginationContentsAndResult)(nil), + 110: (*DelegationContentsAndResult)(nil), + 111: (*RegisterGlobalConstantContentsAndResult)(nil), + 112: (*SetDepositsLimitContentsAndResult)(nil), + 113: (*IncreasePaidStorageContentsAndResult)(nil), + 114: (*UpdateConsensusKeyContentsAndResult)(nil), + 158: (*TransferTicketContentsAndResult)(nil), + 200: (*SmartRollupOriginateContentsAndResult)(nil), + 201: (*SmartRollupAddMessagesContentsAndResult)(nil), + 202: (*SmartRollupCementContentsAndResult)(nil), + 203: (*SmartRollupPublishContentsAndResult)(nil), + 204: (*SmartRollupRefuteContentsAndResult)(nil), + 205: (*SmartRollupTimeoutContentsAndResult)(nil), + 206: (*SmartRollupExecuteOutboxMessageContentsAndResult)(nil), + 207: (*SmartRollupRecoverBondContentsAndResult)(nil), + 230: (*DALPublishCommitmentContentsAndResult)(nil), + 250: (*ZkRollupOriginationContentsAndResult)(nil), + 251: (*ZkRollupPublishContentsAndResult)(nil), + 252: (*ZkRollupUpdateContentsAndResult)(nil), + 255: (*SignaturePrefix)(nil), + }, + }) +} + +type ManagerMetadata[T core.ManagerOperationResult] struct { + BalanceUpdates + OperationResult T `json:"operation_result"` + InternalOperationResults []InternalOperationResult `tz:"dyn" json:"internal_operation_results"` +} + +func (m *ManagerMetadata[T]) GetResult() core.ManagerOperationResult { + return m.OperationResult +} +func (m *ManagerMetadata[T]) GetInternalOperationResults() []core.InternalOperationResult { + out := make([]core.InternalOperationResult, len(m.InternalOperationResults)) + for i, r := range m.InternalOperationResults { + out[i] = r + } + return out +} + +//json:kind=OperationKind() +type SeedNonceRevelationContentsAndResult struct { + SeedNonceRevelation + Metadata BalanceUpdates `json:"metadata"` +} + +func (*SeedNonceRevelationContentsAndResult) OperationContentsAndResult() {} +func (op *SeedNonceRevelationContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type DoubleAttestationEvidenceContentsAndResult struct { + DoubleAttestationEvidence + Metadata BalanceUpdates `json:"metadata"` +} + +func (*DoubleAttestationEvidenceContentsAndResult) OperationContentsAndResult() {} +func (op *DoubleAttestationEvidenceContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type DoubleBakingEvidenceContentsAndResult struct { + DoubleBakingEvidence + Metadata BalanceUpdates `json:"metadata"` +} + +func (*DoubleBakingEvidenceContentsAndResult) OperationContentsAndResult() {} +func (op *DoubleBakingEvidenceContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type ActivateAccountContentsAndResult struct { + ActivateAccount + Metadata BalanceUpdates `json:"metadata"` +} + +func (*ActivateAccountContentsAndResult) OperationContentsAndResult() {} +func (op *ActivateAccountContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type DoublePreattestationEvidenceContentsAndResult struct { + DoublePreattestationEvidence + Metadata BalanceUpdates `json:"metadata"` +} + +func (*DoublePreattestationEvidenceContentsAndResult) OperationContentsAndResult() {} +func (op *DoublePreattestationEvidenceContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type VDFRevelationContentsAndResult struct { + VDFRevelation + Metadata BalanceUpdates `json:"metadata"` +} + +func (*VDFRevelationContentsAndResult) OperationContentsAndResult() {} +func (op *VDFRevelationContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type DrainDelegateMetadata struct { + BalanceUpdates + AllocatedDestinationContract bool `json:"allocated_destination_contract"` +} + +//json:kind=OperationKind() +type DrainDelegateContentsAndResult struct { + DrainDelegate + Metadata DrainDelegateMetadata `json:"metadata"` +} + +func (*DrainDelegateContentsAndResult) OperationContentsAndResult() {} +func (op *DrainDelegateContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type AttestationMetadata struct { + BalanceUpdates + Delegate tz.PublicKeyHash `json:"delegate"` + ConsensusPower int32 `json:"consensus_power"` + ConsensusKey tz.PublicKeyHash `json:"consensus_key"` +} + +//json:kind=OperationKind() +type AttestationContentsAndResult struct { + Attestation + Metadata AttestationMetadata `json:"metadata"` +} + +func (*AttestationContentsAndResult) OperationContentsAndResult() {} +func (op *AttestationContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type PreattestationMetadata = AttestationMetadata + +//json:kind=OperationKind() +type PreattestationContentsAndResult struct { + Preattestation + Metadata PreattestationMetadata `json:"metadata"` +} + +func (*PreattestationContentsAndResult) OperationContentsAndResult() {} +func (op *PreattestationContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type AttestationWithDALContentsAndResult struct { + AttestationWithDAL + Metadata AttestationMetadata `json:"metadata"` +} + +func (*AttestationWithDALContentsAndResult) OperationContentsAndResult() {} +func (op *AttestationWithDALContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type RevealContentsAndResult struct { + Reveal + Metadata ManagerMetadata[ConsumedGasResult] `json:"metadata"` +} + +func (*RevealContentsAndResult) OperationContentsAndResult() {} +func (op *RevealContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type DelegationContentsAndResult struct { + Delegation + Metadata ManagerMetadata[ConsumedGasResult] `json:"metadata"` +} + +func (*DelegationContentsAndResult) OperationContentsAndResult() {} +func (op *DelegationContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type UpdateConsensusKeyContentsAndResult struct { + UpdateConsensusKey + Metadata ManagerMetadata[ConsumedGasResult] `json:"metadata"` +} + +func (*UpdateConsensusKeyContentsAndResult) OperationContentsAndResult() {} +func (op *UpdateConsensusKeyContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type SetDepositsLimitContentsAndResult struct { + SetDepositsLimit + Metadata ManagerMetadata[ConsumedGasResult] `json:"metadata"` +} + +func (*SetDepositsLimitContentsAndResult) OperationContentsAndResult() {} +func (op *SetDepositsLimitContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type DALPublishCommitmentContentsAndResult struct { + DALPublishCommitment + Metadata ManagerMetadata[ConsumedGasResult] `json:"metadata"` +} + +func (*DALPublishCommitmentContentsAndResult) OperationContentsAndResult() {} +func (op *DALPublishCommitmentContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type RegisterGlobalConstantContentsAndResult struct { + RegisterGlobalConstant + Metadata ManagerMetadata[RegisterGlobalConstantResult] `json:"metadata"` +} + +func (*RegisterGlobalConstantContentsAndResult) OperationContentsAndResult() {} +func (op *RegisterGlobalConstantContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type RegisterGlobalConstantResultContents struct { + BalanceUpdates + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + StorageSize tz.BigInt `json:"storage_size"` + GlobalAddress *tz.ScriptExprHash `json:"global_address"` +} + +func (r *RegisterGlobalConstantResultContents) GetConsumedMilligas() tz.BigUint { + return r.ConsumedMilligas +} +func (r *RegisterGlobalConstantResultContents) GetStorageSize() tz.BigInt { return r.StorageSize } +func (r *RegisterGlobalConstantResultContents) EstimateStorageSize(constants core.Constants) *big.Int { + return r.StorageSize.Int() +} + +type RegisterGlobalConstantResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[RegisterGlobalConstantResult]{ + Variants: encoding.Variants[RegisterGlobalConstantResult]{ + 0: (*core.OperationResultApplied[*RegisterGlobalConstantResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*RegisterGlobalConstantResultContents])(nil), + }, + }) +} + +type OriginationResultContents struct { + BalanceUpdates + OriginatedContracts []core.OriginatedContractID `tz:"dyn" json:"originated_contracts"` + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + StorageSize tz.BigInt `json:"storage_size"` + PaidStorageSizeDiff tz.BigInt `json:"paid_storage_size_diff"` + LazyStorageDiff tz.Option[lazy.StorageDiff] `json:"lazy_storage_diff"` +} + +func (r *OriginationResultContents) GetConsumedMilligas() tz.BigUint { return r.ConsumedMilligas } +func (r *OriginationResultContents) GetStorageSize() tz.BigInt { return r.StorageSize } +func (r *OriginationResultContents) GetPaidStorageSizeDiff() tz.BigInt { return r.PaidStorageSizeDiff } +func (r *OriginationResultContents) EstimateStorageSize(constants core.Constants) *big.Int { + x := r.PaidStorageSizeDiff.Int() + x.Add(x, big.NewInt(int64(constants.GetOriginationSize()))) + return x +} + +//json:kind=OperationKind() +type OriginationSuccessfulManagerResult struct { + core.OperationResultApplied[*OriginationResultContents] +} + +func (*OriginationSuccessfulManagerResult) OperationKind() string { return "origination" } + +type OriginationResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[OriginationResult]{ + Variants: encoding.Variants[OriginationResult]{ + 0: (*core.OperationResultApplied[*OriginationResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*OriginationResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type OriginationContentsAndResult struct { + Origination + Metadata ManagerMetadata[OriginationResult] `json:"metadata"` +} + +func (*OriginationContentsAndResult) OperationContentsAndResult() {} +func (op *OriginationContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type IncreasePaidStorageResultContents struct { + BalanceUpdates + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` +} + +func (r *IncreasePaidStorageResultContents) GetConsumedMilligas() tz.BigUint { + return r.ConsumedMilligas +} + +//json:kind=OperationKind() +type IncreasePaidStorageSuccessfulManagerResult struct { + core.OperationResultApplied[*IncreasePaidStorageResultContents] +} + +func (*IncreasePaidStorageSuccessfulManagerResult) OperationKind() string { + return "increase_paid_storage" +} + +type IncreasePaidStorageResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[IncreasePaidStorageResult]{ + Variants: encoding.Variants[IncreasePaidStorageResult]{ + 0: (*core.OperationResultApplied[*IncreasePaidStorageResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*IncreasePaidStorageResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type IncreasePaidStorageContentsAndResult struct { + IncreasePaidStorage + Metadata ManagerMetadata[IncreasePaidStorageResult] `json:"metadata"` +} + +func (*IncreasePaidStorageContentsAndResult) OperationContentsAndResult() {} +func (op *IncreasePaidStorageContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type TransferTicketContentsAndResult struct { + TransferTicket + Metadata ManagerMetadata[TransferTicketResult] `json:"metadata"` +} + +func (*TransferTicketContentsAndResult) OperationContentsAndResult() {} +func (op *TransferTicketContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type TransferTicketResultContents struct { + BalanceUpdates + TicketUpdates []*TicketReceipt `tz:"dyn" json:"ticket_updates"` + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + PaidStorageSizeDiff tz.BigInt `json:"paid_storage_size_diff"` +} + +func (r *TransferTicketResultContents) GetConsumedMilligas() tz.BigUint { return r.ConsumedMilligas } +func (r *TransferTicketResultContents) GetPaidStorageSizeDiff() tz.BigInt { + return r.PaidStorageSizeDiff +} +func (r *TransferTicketResultContents) EstimateStorageSize(constants core.Constants) *big.Int { + return r.PaidStorageSizeDiff.Int() +} + +type TransferTicketResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[TransferTicketResult]{ + Variants: encoding.Variants[TransferTicketResult]{ + 0: (*core.OperationResultApplied[*TransferTicketResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*TransferTicketResultContents])(nil), + }, + }) +} + +type InternalOperationResult interface { + core.InternalOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[InternalOperationResult]{ + Variants: encoding.Variants[InternalOperationResult]{ + 1: (*TransactionInternalOperationResult)(nil), + 2: (*OriginationInternalOperationResult)(nil), + 3: (*DelegationInternalOperationResult)(nil), + 4: (*EventInternalOperationResult)(nil), + }, + }) +} + +//json:kind=OperationKind() +type OriginationInternalOperationResult struct { + Source core.TransactionDestination `json:"source"` + Nonce uint16 `json:"nonce"` + Balance tz.BigUint `json:"balance"` + Delegate tz.Option[tz.PublicKeyHash] `json:"delegate"` + Script Script `json:"script"` + Result OriginationResult `json:"result"` +} + +func (r *OriginationInternalOperationResult) GetSource() core.TransactionDestination { return r.Source } + +func (r *OriginationInternalOperationResult) GetResult() core.ManagerOperationResult { + return r.Result +} +func (*OriginationInternalOperationResult) OperationKind() string { return "origination" } + +type DelegationInternalOperationResult = proto_014_PtKathma.DelegationInternalOperationResult +type EventInternalOperationResult = proto_014_PtKathma.EventInternalOperationResult + +type SuccessfulManagerOperationResult interface { + core.SuccessfulManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[SuccessfulManagerOperationResult]{ + Variants: encoding.Variants[SuccessfulManagerOperationResult]{ + 0: (*RevealSuccessfulManagerResult)(nil), + 1: (*TransactionSuccessfulManagerResult)(nil), + 2: (*OriginationSuccessfulManagerResult)(nil), + 3: (*DelegationSuccessfulManagerResult)(nil), + 6: (*UpdateConsensusKeySuccessfulManagerResult)(nil), + 9: (*IncreasePaidStorageSuccessfulManagerResult)(nil), + 200: (*SmartRollupOriginateSuccessfulManagerResult)(nil), + }, + }) +} + +type RevealSuccessfulManagerResult = proto_014_PtKathma.RevealSuccessfulManagerResult +type DelegationSuccessfulManagerResult = proto_014_PtKathma.DelegationSuccessfulManagerResult +type UpdateConsensusKeySuccessfulManagerResult = proto_015_PtLimaPt.UpdateConsensusKeySuccessfulManagerResult + +func ListOperations() []OperationContents { + return encoding.ListVariants[OperationContents]() +} diff --git a/protocol/proto_021_PsquebeC/smart_rollup.go b/protocol/proto_021_PsquebeC/smart_rollup.go new file mode 100644 index 0000000..f3605fb --- /dev/null +++ b/protocol/proto_021_PsquebeC/smart_rollup.go @@ -0,0 +1,259 @@ +package proto_021_PsquebeC + +import ( + "math/big" + + tz "github.com/ecadlabs/gotez/v2" + "github.com/ecadlabs/gotez/v2/encoding" + "github.com/ecadlabs/gotez/v2/protocol/core" + "github.com/ecadlabs/gotez/v2/protocol/proto_016_PtMumbai" + "github.com/ecadlabs/gotez/v2/protocol/proto_017_PtNairob" + "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" +) + +type SmartRollupAddMessages = proto_016_PtMumbai.SmartRollupAddMessages +type SmartRollupPublish = proto_016_PtMumbai.SmartRollupPublish +type SmartRollupRefute = proto_018_Proxford.SmartRollupRefute +type SmartRollupTimeout = proto_016_PtMumbai.SmartRollupTimeout +type SmartRollupExecuteOutboxMessage = proto_016_PtMumbai.SmartRollupExecuteOutboxMessage +type SmartRollupRecoverBond = proto_016_PtMumbai.SmartRollupRecoverBond +type SmartRollupOriginate = proto_018_Proxford.SmartRollupOriginate +type SmartRollupCement = proto_018_Proxford.SmartRollupCement +type SmartRollupCementResult = proto_017_PtNairob.SmartRollupCementResult +type GameStatus = proto_016_PtMumbai.GameStatus + +type SmartRollupOriginateResultContents struct { + BalanceUpdates + Address *tz.SmartRollupAddress `json:"address"` + GenesisCommitmentHash *tz.SmartRollupCommitmentHash `json:"genesis_commitment_hash"` + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + Size tz.BigInt `json:"size"` +} + +func (r *SmartRollupOriginateResultContents) GetConsumedMilligas() tz.BigUint { + return r.ConsumedMilligas +} +func (r *SmartRollupOriginateResultContents) EstimateStorageSize(constants core.Constants) *big.Int { + return r.Size.Int() +} + +type SmartRollupOriginateResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[SmartRollupOriginateResult]{ + Variants: encoding.Variants[SmartRollupOriginateResult]{ + 0: (*core.OperationResultApplied[*SmartRollupOriginateResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*SmartRollupOriginateResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type SmartRollupOriginateContentsAndResult struct { + SmartRollupOriginate + Metadata ManagerMetadata[SmartRollupOriginateResult] `json:"metadata"` +} + +func (*SmartRollupOriginateContentsAndResult) OperationContentsAndResult() {} +func (op *SmartRollupOriginateContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type SmartRollupAddMessagesContentsAndResult struct { + SmartRollupAddMessages + Metadata ManagerMetadata[ConsumedGasResult] `json:"metadata"` +} + +func (*SmartRollupAddMessagesContentsAndResult) OperationContentsAndResult() {} +func (op *SmartRollupAddMessagesContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type SmartRollupCementContentsAndResult struct { + SmartRollupCement + Metadata ManagerMetadata[SmartRollupCementResult] `json:"metadata"` +} + +func (*SmartRollupCementContentsAndResult) OperationContentsAndResult() {} +func (op *SmartRollupCementContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type SmartRollupPublishResultContents struct { + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + StakedHash *tz.SmartRollupCommitmentHash `json:"staked_hash"` + PublishedAtLevel int32 `json:"published_at_level"` + BalanceUpdates +} + +func (r *SmartRollupPublishResultContents) GetConsumedMilligas() tz.BigUint { + return r.ConsumedMilligas +} + +type SmartRollupPublishResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[SmartRollupPublishResult]{ + Variants: encoding.Variants[SmartRollupPublishResult]{ + 0: (*core.OperationResultApplied[*SmartRollupPublishResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*SmartRollupPublishResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type SmartRollupPublishContentsAndResult struct { + SmartRollupPublish + Metadata ManagerMetadata[SmartRollupPublishResult] `json:"metadata"` +} + +func (*SmartRollupPublishContentsAndResult) OperationContentsAndResult() {} +func (op *SmartRollupPublishContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type SmartRollupTimeoutResultContents struct { + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + GameStatus GameStatus `json:"game_status"` + BalanceUpdates +} + +func (r *SmartRollupTimeoutResultContents) GetConsumedMilligas() tz.BigUint { + return r.ConsumedMilligas +} + +type SmartRollupTimeoutResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[SmartRollupTimeoutResult]{ + Variants: encoding.Variants[SmartRollupTimeoutResult]{ + 0: (*core.OperationResultApplied[*SmartRollupTimeoutResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*SmartRollupTimeoutResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type SmartRollupTimeoutContentsAndResult struct { + SmartRollupTimeout + Metadata ManagerMetadata[SmartRollupTimeoutResult] `json:"metadata"` +} + +func (*SmartRollupTimeoutContentsAndResult) OperationContentsAndResult() {} +func (op *SmartRollupTimeoutContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type SmartRollupRefuteContentsAndResult struct { + SmartRollupRefute + Metadata ManagerMetadata[SmartRollupTimeoutResult] `json:"metadata"` +} + +func (*SmartRollupRefuteContentsAndResult) OperationContentsAndResult() {} +func (op *SmartRollupRefuteContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type SmartRollupExecuteOutboxMessageResultContents struct { + BalanceUpdates + TicketUpdates []*TicketReceipt `tz:"dyn" json:"ticket_updates"` + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + PaidStorageSizeDiff tz.BigInt `json:"paid_storage_size_diff"` +} + +func (r *SmartRollupExecuteOutboxMessageResultContents) GetConsumedMilligas() tz.BigUint { + return r.ConsumedMilligas +} + +func (r *SmartRollupExecuteOutboxMessageResultContents) GetPaidStorageSizeDiff() tz.BigInt { + return r.PaidStorageSizeDiff +} + +func (r *SmartRollupExecuteOutboxMessageResultContents) EstimateStorageSize(constants core.Constants) *big.Int { + return r.PaidStorageSizeDiff.Int() +} + +type SmartRollupExecuteOutboxMessageResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[SmartRollupExecuteOutboxMessageResult]{ + Variants: encoding.Variants[SmartRollupExecuteOutboxMessageResult]{ + 0: (*core.OperationResultApplied[*SmartRollupExecuteOutboxMessageResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*SmartRollupExecuteOutboxMessageResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type SmartRollupExecuteOutboxMessageContentsAndResult struct { + SmartRollupExecuteOutboxMessage + Metadata ManagerMetadata[SmartRollupExecuteOutboxMessageResult] `json:"metadata"` +} + +func (*SmartRollupExecuteOutboxMessageContentsAndResult) OperationContentsAndResult() {} +func (op *SmartRollupExecuteOutboxMessageContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type SmartRollupRecoverBondResultContents struct { + BalanceUpdates + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` +} + +func (r *SmartRollupRecoverBondResultContents) GetConsumedMilligas() tz.BigUint { + return r.ConsumedMilligas +} + +type SmartRollupRecoverBondResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[SmartRollupRecoverBondResult]{ + Variants: encoding.Variants[SmartRollupRecoverBondResult]{ + 0: (*core.OperationResultApplied[*SmartRollupRecoverBondResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*SmartRollupRecoverBondResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type SmartRollupRecoverBondContentsAndResult struct { + SmartRollupRecoverBond + Metadata ManagerMetadata[SmartRollupRecoverBondResult] `json:"metadata"` +} + +func (*SmartRollupRecoverBondContentsAndResult) OperationContentsAndResult() {} +func (op *SmartRollupRecoverBondContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type SmartRollupOriginateSuccessfulManagerResult struct { + core.OperationResultApplied[*SmartRollupOriginateResultContents] +} + +func (*SmartRollupOriginateSuccessfulManagerResult) OperationKind() string { + return "smart_rollup_originate" +} diff --git a/protocol/proto_021_PsquebeC/transaction.go b/protocol/proto_021_PsquebeC/transaction.go new file mode 100644 index 0000000..fff4ab2 --- /dev/null +++ b/protocol/proto_021_PsquebeC/transaction.go @@ -0,0 +1,137 @@ +package proto_021_PsquebeC + +import ( + "math/big" + + tz "github.com/ecadlabs/gotez/v2" + "github.com/ecadlabs/gotez/v2/encoding" + "github.com/ecadlabs/gotez/v2/protocol/core" + "github.com/ecadlabs/gotez/v2/protocol/core/expression" + "github.com/ecadlabs/gotez/v2/protocol/proto_012_Psithaca" + "github.com/ecadlabs/gotez/v2/protocol/proto_012_Psithaca/lazy" + "github.com/ecadlabs/gotez/v2/protocol/proto_013_PtJakart" + "github.com/ecadlabs/gotez/v2/protocol/proto_015_PtLimaPt" + "github.com/ecadlabs/gotez/v2/protocol/proto_016_PtMumbai" + "github.com/ecadlabs/gotez/v2/protocol/proto_018_Proxford" +) + +type EpDefault = proto_012_Psithaca.EpDefault +type EpRoot = proto_012_Psithaca.EpRoot +type EpDo = proto_012_Psithaca.EpDo +type EpSetDelegate = proto_012_Psithaca.EpSetDelegate +type EpRemoveDelegate = proto_012_Psithaca.EpRemoveDelegate +type EpDeposit = proto_015_PtLimaPt.EpDeposit +type EpNamed = proto_012_Psithaca.EpNamed +type EpStake = proto_018_Proxford.EpStake +type EpUnstake = proto_018_Proxford.EpUnstake +type EpFinalizeUnstake = proto_018_Proxford.EpFinalizeUnstake +type EpSetDelegateParameters = proto_018_Proxford.EpSetDelegateParameters +type PseudoOperation = proto_018_Proxford.PseudoOperation + +type Transaction = proto_018_Proxford.Transaction +type Parameters = proto_018_Proxford.Parameters +type TicketReceipt = proto_015_PtLimaPt.TicketReceipt +type ToSmartRollup = proto_016_PtMumbai.ToSmartRollup + +type ToContract struct { + Storage tz.Option[expression.Expression] `json:"storage"` + BalanceUpdates + TicketUpdates []*TicketReceipt `tz:"dyn" json:"ticket_updates"` + OriginatedContracts []core.OriginatedContractID `tz:"dyn" json:"originated_contracts"` + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + StorageSize tz.BigInt `json:"storage_size"` + PaidStorageSizeDiff tz.BigInt `json:"paid_storage_size_diff"` + AllocatedDestinationContract bool `json:"allocated_destination_contract"` + LazyStorageDiff tz.Option[lazy.StorageDiff] `json:"lazy_storage_diff"` +} + +func (*ToContract) TransactionResultDestination() {} +func (r *ToContract) GetConsumedMilligas() tz.BigUint { return r.ConsumedMilligas } +func (r *ToContract) GetStorageSize() tz.BigInt { return r.StorageSize } +func (r *ToContract) GetPaidStorageSizeDiff() tz.BigInt { return r.PaidStorageSizeDiff } +func (r *ToContract) EstimateStorageSize(constants core.Constants) *big.Int { + x := r.PaidStorageSizeDiff.Int() + if r.AllocatedDestinationContract { + x.Add(x, big.NewInt(int64(constants.GetOriginationSize()))) + } + return x +} + +type TransactionResultDestination interface { + proto_013_PtJakart.TransactionResultDestination +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[TransactionResultDestination]{ + Variants: encoding.Variants[TransactionResultDestination]{ + 0: (*ToContract)(nil), + 2: (*ToSmartRollup)(nil), + }, + }) +} + +type TransactionResultContents = TransactionResultDestination + +//json:kind=OperationKind() +type TransactionSuccessfulManagerResult struct { + core.OperationResultApplied[TransactionResultContents] +} + +func (TransactionSuccessfulManagerResult) OperationKind() string { return "transaction" } + +type TransactionResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[TransactionResult]{ + Variants: encoding.Variants[TransactionResult]{ + 0: (*core.OperationResultApplied[TransactionResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[TransactionResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type TransactionContentsAndResult struct { + Transaction + Metadata ManagerMetadata[TransactionResult] `json:"metadata"` +} + +func (*TransactionContentsAndResult) OperationContentsAndResult() {} +func (op *TransactionContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +//json:kind=OperationKind() +type TransactionInternalOperationResult struct { + Source core.TransactionDestination `json:"source"` + Nonce uint16 `json:"nonce"` + Amount tz.BigUint `json:"amount"` + Destination core.TransactionDestination `json:"destination"` + Parameters tz.Option[Parameters] `json:"parameters"` + Result TransactionResult `json:"result"` +} + +var _ core.TransactionInternalOperationResult = (*TransactionInternalOperationResult)(nil) + +func (r *TransactionInternalOperationResult) GetSource() core.TransactionDestination { return r.Source } +func (r *TransactionInternalOperationResult) GetNonce() uint16 { return r.Nonce } +func (t *TransactionInternalOperationResult) GetAmount() tz.BigUint { return t.Amount } +func (t *TransactionInternalOperationResult) GetDestination() core.TransactionDestination { + return t.Destination +} +func (t *TransactionInternalOperationResult) GetParameters() tz.Option[core.Parameters] { + if p, ok := t.Parameters.CheckUnwrapPtr(); ok { + return tz.Some[core.Parameters](p) + } + return tz.None[core.Parameters]() +} +func (r *TransactionInternalOperationResult) GetResult() core.ManagerOperationResult { + return r.Result +} +func (*TransactionInternalOperationResult) OperationKind() string { return "transaction" } + +var ListPseudoOperations = proto_018_Proxford.ListPseudoOperations diff --git a/protocol/proto_021_PsquebeC/zk_rollup.go b/protocol/proto_021_PsquebeC/zk_rollup.go new file mode 100644 index 0000000..2da40c3 --- /dev/null +++ b/protocol/proto_021_PsquebeC/zk_rollup.go @@ -0,0 +1,103 @@ +package proto_021_PsquebeC + +import ( + "math/big" + + tz "github.com/ecadlabs/gotez/v2" + "github.com/ecadlabs/gotez/v2/encoding" + "github.com/ecadlabs/gotez/v2/protocol/core" + "github.com/ecadlabs/gotez/v2/protocol/proto_015_PtLimaPt" + "github.com/ecadlabs/gotez/v2/protocol/proto_016_PtMumbai" +) + +type ZkRollupOrigination = proto_015_PtLimaPt.ZkRollupOrigination +type ZkRollupPublish = proto_015_PtLimaPt.ZkRollupPublish +type ZkRollupUpdate = proto_016_PtMumbai.ZkRollupUpdate + +//json:kind=OperationKind() +type ZkRollupOriginationContentsAndResult struct { + ZkRollupOrigination + Metadata ManagerMetadata[ZkRollupPublishResult] `json:"metadata"` +} + +func (*ZkRollupOriginationContentsAndResult) OperationContentsAndResult() {} +func (op *ZkRollupOriginationContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type ZkRollupPublishResultContents struct { + BalanceUpdates + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + Size tz.BigInt `json:"size"` +} + +func (r *ZkRollupPublishResultContents) GetConsumedMilligas() tz.BigUint { return r.ConsumedMilligas } +func (r *ZkRollupPublishResultContents) EstimateStorageSize(constants core.Constants) *big.Int { + return r.Size.Int() +} + +type ZkRollupPublishResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[ZkRollupPublishResult]{ + Variants: encoding.Variants[ZkRollupPublishResult]{ + 0: (*core.OperationResultApplied[*ZkRollupPublishResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*ZkRollupPublishResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type ZkRollupPublishContentsAndResult struct { + ZkRollupPublish + Metadata ManagerMetadata[ZkRollupPublishResult] `json:"metadata"` +} + +func (*ZkRollupPublishContentsAndResult) OperationContentsAndResult() {} +func (op *ZkRollupPublishContentsAndResult) GetMetadata() any { + return &op.Metadata +} + +type ZkRollupUpdateResultContents struct { + BalanceUpdates + ConsumedMilligas tz.BigUint `json:"consumed_milligas"` + PaidStorageSizeDiff tz.BigInt `json:"paid_storage_size_diff"` +} + +func (r *ZkRollupUpdateResultContents) GetConsumedMilligas() tz.BigUint { return r.ConsumedMilligas } +func (r *ZkRollupUpdateResultContents) GetPaidStorageSizeDiff() tz.BigInt { + return r.PaidStorageSizeDiff +} +func (r *ZkRollupUpdateResultContents) EstimateStorageSize(constants core.Constants) *big.Int { + return r.PaidStorageSizeDiff.Int() +} + +type ZkRollupUpdateResult interface { + core.ManagerOperationResult +} + +func init() { + encoding.RegisterEnum(&encoding.Enum[ZkRollupUpdateResult]{ + Variants: encoding.Variants[ZkRollupUpdateResult]{ + 0: (*core.OperationResultApplied[*ZkRollupUpdateResultContents])(nil), + 1: (*core.OperationResultFailed)(nil), + 2: (*core.OperationResultSkipped)(nil), + 3: (*core.OperationResultBacktracked[*ZkRollupUpdateResultContents])(nil), + }, + }) +} + +//json:kind=OperationKind() +type ZkRollupUpdateContentsAndResult struct { + ZkRollupUpdate + Metadata ManagerMetadata[ZkRollupUpdateResult] `json:"metadata"` +} + +func (*ZkRollupUpdateContentsAndResult) OperationContentsAndResult() {} +func (op *ZkRollupUpdateContentsAndResult) GetMetadata() any { + return &op.Metadata +} diff --git a/protocol/test_data/021_PsquebeC/155262.bin b/protocol/test_data/021_PsquebeC/155262.bin new file mode 100644 index 0000000000000000000000000000000000000000..f26e6605b179d1ce79e3021c4060e2a7e3fa4423 GIT binary patch literal 2275 zcmb7EX;f236rO|x!j^&(7nD^Cf@=%0APNcu37ZNLijp88L1l5lvNd3cBC=T)K>-yI zL^dsg91KBdQ7FoyQB;abfDjg04m+}@^J4$>oV2I8=iGN^=6>_N``vl-0KoCKjM`G_ z>!{?-wClvQb;36x+|TuH7uhpkzG0`%o$m1e_#=-B015@rvtrMn7OQ&4-?We(4okZMX!Pj@4#wKC-D`B$q1Pk&(N}&js`4yWjH*|I$Tm;*2>P zBTo3l&?WK_hDvA-H6$}Pd(qzUPF$c_-|yOOY_-v57b7jQKEg5e>hVn^0$hrEtJ4p5 z_wqj~_mAbfPB8h7F}pKotkG`HTfQ{$PHgljQ=Q^5$_Ddr5yZ|W<-O4S9{OYrSY0i%IlG)44_PHANUgVXRgCL$y}PKWEi<-SudR-Gwmg7;kvbOZzdb`=46r^ueQDBQ3{Mq*nbb`gTHRnTuk z&p<9qBBTFOkQbkIJ1MeyS=ly3ur@q;CdVvp+r||{iea-A+@P73os;cv*Z!*vm!sU% z?^Jpr=7Ue&w6_x3$LK}K=Ux5~lPfBUN`OPrp#xxbw}i|c+E!UqWz&|MJfM0C=hQ_m z{bJff5>$mI_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WHGkl*%KXN`WJ?lGzHG zPMD0n4;6M0%RxSt)js4D!g~JijIBYmvgr1y94^2=+<2v7MvYwcB7Y~$1-cvhbegTR z8imc7hW!GD?{V=!;(6lY{gJoNdG`0l75!mOv9zcFB3w!z9ROZvbg_+-Wp%Z#UH{s- z4BluSzGFa<^ys}#v-*~Fb{x$7kHP`kM<%0(>gSFXNBznO-(S1(PiJhqVD{qN4OVke z`0YIoS@-Cp!OIg;E`p-YCZix)4B$MTdGZc_ZP?p~FRN5o8CIe_Ck_&Ix@Ku>4iAr0hSO7@N+^xaF-JU4Bq|apdap#b@o~pA zZuzbga7(IE_ZNzrZBGmCn8j49A#_*1Hfb&H=DN~DzGttW*>P5w{5(IW$Dk;!DsMD; zy8WQMbg}Z#MQ@~yFJ+gTrW{JPh`(BzWN)QXs0!!9R%U>}5PK{rJG@m3(=FVpc;=(K z(PkrpVAbwO3BT0e15e6~xr}YLDVXHY9$cZ{S~RBM2(x6s-~@i{LLT$*4?yU?^hRdHP3%Zj>(jNyN@s|)gM zIt+lq8JU3_AG+-LKHa&(#1Y+ck=GlS17h8c%=N^IX#Gz6=DaovMxWO?Mas{oj?&MO z1OcZyMyMt8sUgoYui>l~LjXe87@JACHf)thjPg)+^%Ku}Go!kOIN#VUeetErQ07T^ zxqQQ{A{Sk|sY5(Wsy?-wT|p6> z&7!K-?(BYTjUtL$wQAUnie*ouY&d`EA2%mN?|3J&qh_~XFYo7@?`2Ni!6I~fI^71v zPQ8}16&`-VpXt8AyBBluh9)^~WnJfcdCn#B($$iSZUe{Q+q4y#D0b-H33i;t*-}*| zGR!7GRv^ziZK5MqX}Z>0aFkb_{wAzKTccj7%BZnsvP)Y;uYX~v`Ru)L)w8fHX7~W# dv@MG4DoirPeHUhI-D1%ap#rI3pd#`w`!_=wlqdiI literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155265.bin b/protocol/test_data/021_PsquebeC/155265.bin new file mode 100644 index 0000000000000000000000000000000000000000..d8199bc12d8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f%pY&iNv+3MCrb7{>i|2dREm5y)DmBJ+bSu4j+RiSRs+=Je6tY$71^sV6OG7g`r9{u$%8Y5)KL literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155266.bin b/protocol/test_data/021_PsquebeC/155266.bin new file mode 100644 index 0000000000000000000000000000000000000000..f8db681b2fee83ba2c9ef7940e6a64cbf5f37625 GIT binary patch literal 2275 zcmZQz;JB~z&O4-B`rNXQY#RRFg@*8o=7j+J+2FhVL1uipuwxF0X5c7S{wDsnqVb>8wwB)x>y^#Icc161-Fd~qMdn3b;@&bv zmA+k@iueCKW>=obYwxOV@n+_yZTqLKSIJ&;D%#maog3&Z#?K&=b~7+E04YY02NZx< zhQWb>0VvA>WH$gYlK_av&;k}}S@UNuOjE$cSAK6bejnjX(pQ z0JYBtnFM4o#Xf@ajDR#4tl$8J($~h%#tbY>*v$f}H9 z1e@9P-5sx)wH!MkDv2@^Vm3H%7+8Uv4n~Impcr>zU}RXc@&2kNW`-q2%8X|C5ErhybOFtCb=g6sr?BWHPLcz{?~g957{P%-N+ zAf5-rvp|{Uz3V1r^Uyn2_MI*hG})n>cxCGRoP*M52%2Inb zXH?pnYpawe#f0_yPV}zLocOSuxt4d&|EEATi@}bH6$LWEkDS8kMmfYf$=`>|o8ThA(U+`}DF=5t+PxdjZyVb$o)jKrJzW7AL>qAccyEht=2`uvLD*r|1KCLE#a^{Qu^Qwsov!w z$-6F_k|Z@P6sX&*w|{|6RIS+JEVRx*fmjT-Rv=*^5HecxSKiF4#Z$!U}7Z%Ll&X)g3o(zmv+0$MpbL?%qd1P0VLF&{8*Uw)LY~FM4vB*q;1zQ(dbujh_ z$vSsPW`%0UZ}OWUt-AVKPiU^Y(!qo+R-7&%@Ah1F6IQ$UqWgCCoaH|ERRc$Z=KEG_3Yp)STr>A~+Nm09$x;H?6Aw;rp+*E4rqxfl65 z=gi%7xUE>IQ@7n<$%gCGn!1W;%IRsxe6 literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155267.bin b/protocol/test_data/021_PsquebeC/155267.bin new file mode 100644 index 0000000000000000000000000000000000000000..07f63238cb8a48171e8a3e92d233af679cb35a25 GIT binary patch literal 2275 zcmb7`dpJ~S7{I?XGj6SMn@nzti3+J)bDP@2SeI?w*CmuoMp~A#W2ns_t(|O}3Av1# z5K1A630Z9$YRRR|x<-oJ@=$C>%6@0;U;E6{)4b2~p7;CS_x;}U{=V;=^Be#qhxKQj zJg{$G5d%4uc5W@j`u8o%G`VxS3dbv_+Y+>hmlcn|JQ7p{11~tVG_Gs zc%^WaTSgez7V;LYR1W|X8UzKVrXX}|!X%^26S-N!bxApY-cKhhvZeu!cLaJ^jI2SZ6E9)0y?qY4bukE$d$oVN} zf}9$`5+9Eq^ueIG(fj76I_hHPp6n`7Cr=s5ksS3H%A8HvQ5E^Ik^ZvBVNW9Aq92kZ zl;pE;g&zqvQRo52ksI90m6FX>jn2~NMoW2D7gqOJkskLhOQ-C2eVwy(Dzf24P1^8i z0(k?zRSfgUEOVp%8QRa-qa0^1IX|i-ip$x{o_m4lZN{3{&QBF0O@XhY4eUbpUtii2 znf5Z~cB!bi7?E&QH2kPX#cDGPYK*1?7Y5%B9J$R*y))m& z%k1RbiZ4|~eo#GMdk>3SvKg{DQb_r5K`}ytiN9gw;3`GR)a~)Xfp9uk*^RpSDGY(GPU`&q!2^ zt2&;D7Zq1R6kLo>=*-8n*NhVnG0kJSr6(y?(i{}mQ)qzjOY$&la7f#Q=4~C&bBDA@ z;73c*`Y$fq=++n>({pcO*B^|O4bqW(t76ljBR;vS#xaneBc1&;cptXe^ zpDqD$X+i_>c0(Gs3W)3j@)MPZBEu}Tw@q_p+g|#9|KKL&D3xj`lOL+*p2aBQ7Ts`2 ene32NpX!o*EZdSJUzo_FU*|)TwSR{H+kXK#C1uY5 literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155268.bin b/protocol/test_data/021_PsquebeC/155268.bin new file mode 100644 index 0000000000000000000000000000000000000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1wgd@t1vnE9k+bICrPYliYxBwF{|8jjvtR8Hfc^SEt*jIHxoE zmX$z5gYmN1a{Ywk^`3{J%y#Nh_qm$KdcT?`7+>k#FKs=xh@; z$h7dD6l@DMhg9MKK!XN_0H{FS3BOeQ{Lb8<}%#xC2+L9>^PmPacs@kYBDZTVSdt(qq4Xiaca0R!_w{sn3KEKlpFFTtQ|T4br#F4+sZM#q`xh% z-;ye0P7_%@OgL5 zGFp{#a8WOo7qiY~IF6X8Xx3|@gY}$jwOh&DSVf6=cRDX*bVZeVa#y26;u9G+pOXP@ zZ0`BM^a^RBID*?5clT8At^C}=vN$jE^6r<<#x{7@Ms~*JpxC@vXO(2wlTf%4Lg5NN z5|JE%2grWa&hMs#7SB;!Yo069@Oz$@9yV_!FkH(C)>p;p@ecgPzPtgWPAlyO>3Czc z6M>(Ok(`?|?EN%JPg(N}41())zC01l9NRV5bh?@G;{GEyjVaoX1|1Km-Lcv3y93`= z?x|I5+k@|J-c^~fBUTZ!QXi#}m4KZp2zT+?tqM&Pv!you=OJHdVcjd-5SkUtd9MtgW`-@~F8if@|I3;t{J6z!tgf zo#=5))MkPCXR3R)u2cNynm5y{zJtQzZV?6-z0+^{pKFD>zx&b*Da?XcYZI9a(IohNMLKZ_Z1XSBAB&pZE-ohw7aj!CZwEVzDoL+K$n06kgMR`F@)FD&G Y^32|C!zijbzM}sn@~_80MdW|>Uy1;gnE(I) literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155271.bin b/protocol/test_data/021_PsquebeC/155271.bin new file mode 100644 index 0000000000000000000000000000000000000000..3fc2dad1ece5439b8c8fb3b1bab65b4494dd672e GIT binary patch literal 2275 zcmb7^do+}37{K3e4CB7*&X6T{B4t*jC{Z$YENL+^xx_?t3bEm2Ttc~Qi3qLaG9$Om z*rg_ln1dZuNGsPk%C$Bn3OUPS*^V(gzVuHL;w&3U?@qLs+5<8R#9uJiC!mU{IsgY ztjJWsv+uiySjQI^2Xd|y04V++*(2CYGm)6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2niFogt1H8;n<7(Hj zgM3SYejJhG1;lxntU%vyVtS=r`phE$f+V)OnS%0|QZIid>)wOiLcGHzL@HIr3MsT)7YJ{4C!X$-wJa_d^d*moM_Wc}YbKK3xDfLD|U0WNt%2cX|7I}r`_t|On8!}(>} z;;3?jZOU6_cc;#imYUW-s=`bF+#D~7%xrZr_Hr`8jeMrm9Xr%W1wg2QZ=lEKh(^zL zrRS#W2UUyhymNJzRD!70=5)$Eoe@Kt1tnIU8Ztxl4$@{bb`(qklKta@&AClxie2hM zO}%!dLKxlLzp^wQJsqoY4e`3xA-apzVd*WglFBZ4v28STBat2gYZ8bq_9KCJ{D0Er zKN8f1?*Ju_yk)Ic6TUY`r;az@Pm#aZud7OM?eftZtU0!<7$;LiHDWN*my*K?=eT5} zFjB{GMeTJloj8#*ZYgp4`=l_sDTeYUnM16I=%Ssw{cUUqe5oVi85{f6)YbhH>1key zg3?6=qRTY-S#M>p)LNr;xoBrar+>!2pAZ0Ki~zp?`%U~ncb!d|Wlk66!YLMKlRkdK z1yR}3$x~ZZdmM5d-8woqjW=q`nOP>}%^r+-9AZt>G3yKl)RmX=0exk>={{KkqJFAj zYz0Fxc}dSDk=Vmci>a?JIQ>%hplOB~ZXhUKF@fkdT-CCS$0s2f{?6PCnn6m5bfh%= z91Z|}0rPI6x=L@CaeVCzStImhSCXAl)zZ=liw5~_OP%{~-Ia>%eS}W-Y1%Qq*a$1n znjUG>lK&#>^3ye$a2AxViXe2+?S3;~7-f1fzR?C@H%l&B8A~y- z={oWa7?n#8a-&N)X-eB5-gEu6M-yoe89t(w417nxR*r&ML67WZecHLZF>;q& c>B4z3zYyxvlJ9VGvMyijgH&)(G5L@E2TK5I5C8xG literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155275.bin b/protocol/test_data/021_PsquebeC/155275.bin new file mode 100644 index 0000000000000000000000000000000000000000..a410df65eabaccae4e6318454a8200fa3c6a06a2 GIT binary patch literal 2275 zcmb7FdpML?7(d@<7`Y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Ye^vZi%WNvSae0V zQzS-Y^R>*ou`Qj85$+&XC=m?koF^?j3el!$o?c^5<#-)Q(r@DMNR(6e=RVJEL>S09 bwb9E$H4RN_Sk(jOvTKJlq=JQt%75%XsSlP; literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155278.bin b/protocol/test_data/021_PsquebeC/155278.bin new file mode 100644 index 0000000000000000000000000000000000000000..acf0f23e7182e8051f1028b088e3876068dab735 GIT binary patch literal 2275 zcmb7EXH-;I5Wa8OWho0%0@8wPmL?*ih=O2HnxF_$R9IvMA&a2cC<+l=sfvP%N|z?! z0tp--6d@1^y#}!%pbHp^)Rn%}+_&aW&e`M1&N=hu-kG`In{V#C2LK;Ked>r^f?$%l zDS1YXW}GUzT(fs1=-{W9KGTYyBcGQRtVtB-0e~O?Ly5+m=$RZm7uz*pO3w{%T@Ub> zzjieJUE}J!bJ^uvoiPo8019=!VFkNT_1tj0ZzD7|;JVV>#T)C>=Qll>YtDa?W`4n< zYS=Ur<`JPH82G@V(9oiS-GG8xbQ7PIIy$Em8l_9IFk8|WaC#N?NxPXvlz-&d*=m03 zNbC2w^S;FjZo@nsIrNQ7$-8Y5Zd_xD$GgQoCYf*VnJqvu<~qxhQ40iO@6#{evD3J$ z#giM-T6WXEGfMuKu#!OhN|}0_dF{P6=8Vn(C6?03W5+WuOnUFH8?>PgGEE;=%Q+wI z(osz3g=HbLC{iT=G-wc%fC5xGZ~y=p<%4S)RE!9^1EFjOaIg&Hogmriow3r#_OBV2 zpSG#?;_O7bfT2V|fWP5!*mU*+<23m1P8nLZ(D~3Vv7TAS0xX6z7R=+d&-VoE%$1&W zY4jk+QlKBJL>U46UooeKzl|v>^EGp&7ysd#n2JjzG|m>Z9XP1B5U_#XxFJ9Q{Y_(j zFb~K?1fW9_`K-beUfj)Sa*%eVB(6T7HvPz21z$rF;|SJF#><~5DcBrb-=F2u9=Q*m z0cyf%$s5a`$1wnT9s6-EKyNhF$*y6zQoN07@^*lVCczg=N}%s#OIWsYd zM5No3rd`y?v|Wto#)R$rQIza8UhNy;{v75!Wf$cn0hjDc2cZ1K&IA?lQVpaiDSY;H zMBkrVh73hX=@t&IDj2G>y5hZ>drF&YSX(WZCwv19mYH?5;)&^F!yg_kb-9%Yed)Ow zMlMt?*o4v*&}?A(zhCn^T;!TjD|Wo}izrdEY-f(dHd;(v|C*pDtcfeS=#K=>`2VDv ztWVZrX%kkfP4n<=`EBkod#n)vgxvtAKn~u!Em!}RtE_Hg@ z{;Vr!^(rG(bqn4qEAFJM_KY4w><@a1RGx3eNOwq)juif)AWFAv{ReBS$4HWX3yH8t zohAD~wWt%v>p>LQ??AWLpDO2;E)Q39IZq%@G{<@66T)BQ@$}RAs2=DwDu+0Iw`~XA zR;-Z`=Ttf5A~ERGt{WF%ps_G%JuxHFM9QN}zi@Um%+G#_JDX-nuU*2UbVJU@*E0nK z_GTMl&Riu|rLQl{Tg;!BZtYeT#K!hAnz^Mb%ne?5Lo~X4`7SRRrIbm^-FV-syh)ok{*~rmc4! zw{$mgLl?+wIc0eTSN1rgOzW^`wOnwINsbSs8_6-yp2hTD*qVaOdbxz_Ve>@x1!=z* z45#+3S-0ej@|UE9J9-mT9v-O}p}ie@W3Rm3B>Kg($>4#6x2GA)k49YpN_Rwg?U3YO zz8Si#krwHO`ou1~>qPo;IQ1@}oIsAlq@~ literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155279.bin b/protocol/test_data/021_PsquebeC/155279.bin new file mode 100644 index 0000000000000000000000000000000000000000..01cb094bbc4ae6dcfe65a2f752cf366aac990f39 GIT binary patch literal 2275 zcmb7EdpML?7(d^b$uu#MMsmwUiFMf$iQ3IDt}UB8F_GNDwt2>FYK2ARZnj*?rNrd2 z*fpWdqMJ)X@t{TJR#a2&r76RnZ`yzMdFI)td7tO~-gD0TJHPY(&gBCDKcY2l5pGseCo?FZK=7-tpf>M&HX-sf*z@9UMtFFN_-d%^)&jsA+AB&P(vp8iEaKobz zsrYq-0LwxaP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jIf0-muTJu*<(RNf@`gBE3LGt3P8=E^5$`Cv7jgfIdc%E;CLfxtvRy zrimMp5T?JwG&9^VrBsq32~Sra2utAiZ=}bC>vD|dx%khO)DD+j8)8?T4Qh$X8s7U~ zvF=-GR9e5u98Jp^;lIspnNs9UZiwAkA5C`i9d7c94922z_a*3XyUVsGUbgOL*_kFU zumcS+zISWt=OwF8?hKk36jkmzQRHHF_`O|8E7yzljWLY4QW{M)mdHcpItWcXPi>(l zmkpesXHE1CIQg%1D)(2NtUBk?(3kX^+h|LqgW~sIbzNz<)wC>c>hzE)d0WNBd~_Qy T#L;0XXM6~HQL)fb`%nA_t8{`T literal 0 HcmV?d00001 diff --git a/protocol/test_data/021_PsquebeC/155280.bin b/protocol/test_data/021_PsquebeC/155280.bin new file mode 100644 index 0000000000000000000000000000000000000000..ca40a670400c81243c845992103769a9b056887a GIT binary patch literal 2275 zcmb7EdoDws`6uWdLrv?BN3ZOkR(G8xzs#G_5`FU+U=vZ7U zA7(Ez)iR(czA$DKNqi=eBm>3orA``o)wb%Vr6RBvcw0Wh%i-DTKqv2jVM>Y4jl14|Q zQ*?}HFQ&2r(xx=2Dhr_v;2!>9S*kv4ldhrMmGR-(o6LMBRz; zMhy#(g_=i@H~_>zgF*aMI;Mo&+`!AE!=(`L4pIc$LPPa&Cv3tTpY>LVlEvGuxPgT=-WpX;Z0RBA3TU_kSHzBy3z7~Is3|D0hE&`dpa3)JN=+OF z6r&{I0s-}I>j$ZY?_akcQlxq2tX%MIH(y){FVFlo^Mx6)`=CDu{h;m0&|Mgbs|D$v0zDLi?b*)xaP z)$V$^AvpV)cfMNqJgvn&*L6v3dSU&KIu1pHVxCXNER_^5q_td?iwSCX=vb`L)bTG! zZq=4V=o)66Y}WL)U7%7)wPc$%j1!*!>Vdx?c3B2RqMi;H+ zJH2|Yk`(I`vn#xyJlfU-$HK#eQ3N^?wbJX(UsBkpTJj)AN3~MoWv6`I6;7}x+aK{vm zJ2kD4_UT*QBTqheP8J^waTA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