diff --git a/Makefile b/Makefile index cd528340d8..61203b4ead 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ fix: build $(GOBIN)/algofix */ modernize: - GOTOOLCHAIN=auto go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -any=false -bloop=false -rangeint=false -fmtappendf=false -waitgroup=false -stringsbuilder=false -omitzero=false -fix ./... + GOTOOLCHAIN=auto go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@v0.39.0 -any=false -bloop=false -rangeint=false -fmtappendf=false -waitgroup=false -stringsbuilder=false -omitzero=false -fix ./... lint: go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1 run -c .golangci.yml @@ -149,7 +149,7 @@ api: logic: make -C data/transactions/logic -MSGP := go run github.com/algorand/msgp@v1.1.61 +MSGP := go run github.com/algorand/msgp@v1.1.62 %/msgp_gen.go: ALWAYS @set +e; \ printf "$(MSGP) $(@D)..."; \ diff --git a/agreement/msgp_gen.go b/agreement/msgp_gen.go index f6921ceb92..9e6c1961b3 100644 --- a/agreement/msgp_gen.go +++ b/agreement/msgp_gen.go @@ -1,7 +1,7 @@ -package agreement - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package agreement + import ( "sort" @@ -877,7 +877,7 @@ func (z *Certificate) MsgIsZero() bool { return ((*z).Round.MsgIsZero()) && ((*z).Period == 0) && ((*z).Step == 0) && ((*z).Proposal.MsgIsZero()) && (len((*z).Votes) == 0) && (len((*z).EquivocationVotes) == 0) } -// MaxSize returns a maximum valid message size for this message type +// CertificateMaxSize returns a maximum valid message size for this message type func CertificateMaxSize() (s int) { s = 1 + 4 + basics.RoundMaxSize() + 4 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + ProposalValueMaxSize() + 5 // Calculating size of slice: z.Votes @@ -1047,7 +1047,7 @@ func (z *ConsensusVersionView) MsgIsZero() bool { return ((*z).Err == nil) && ((*z).Version.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// ConsensusVersionViewMaxSize returns a maximum valid message size for this message type func ConsensusVersionViewMaxSize() (s int) { s = 1 + 4 panic("Unable to determine max size: String type string(*z.Err) is unbounded") @@ -1180,7 +1180,7 @@ func (z *Deadline) MsgIsZero() bool { return ((*z).Duration == 0) && ((*z).Type == 0) } -// MaxSize returns a maximum valid message size for this message type +// DeadlineMaxSize returns a maximum valid message size for this message type func DeadlineMaxSize() (s int) { s = 1 + 9 + msgp.DurationSize + 5 + msgp.Int8Size return @@ -1240,7 +1240,7 @@ func (z LateCredentialTrackingEffect) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// LateCredentialTrackingEffectMaxSize returns a maximum valid message size for this message type func LateCredentialTrackingEffectMaxSize() (s int) { s = msgp.Uint8Size return @@ -1300,7 +1300,7 @@ func (z TimeoutType) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// TimeoutTypeMaxSize returns a maximum valid message size for this message type func TimeoutTypeMaxSize() (s int) { s = msgp.Int8Size return @@ -1360,7 +1360,7 @@ func (z actionType) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// ActionTypeMaxSize returns a maximum valid message size for this message type func ActionTypeMaxSize() (s int) { s = msgp.Uint8Size return @@ -1578,7 +1578,7 @@ func (z *blockAssembler) MsgIsZero() bool { return ((*z).Pipeline.MsgIsZero()) && ((*z).Filled == false) && ((*z).Payload.MsgIsZero()) && ((*z).Assembled == false) && (len((*z).Authenticators) == 0) } -// MaxSize returns a maximum valid message size for this message type +// BlockAssemblerMaxSize returns a maximum valid message size for this message type func BlockAssemblerMaxSize() (s int) { s = 1 + 9 + UnauthenticatedProposalMaxSize() + 7 + msgp.BoolSize + 8 + ProposalMaxSize() + 10 + msgp.BoolSize + 15 // Calculating size of slice: z.Authenticators @@ -1850,7 +1850,7 @@ func (z *bundle) MsgIsZero() bool { return ((*z).U.MsgIsZero()) && (len((*z).Votes) == 0) && (len((*z).EquivocationVotes) == 0) } -// MaxSize returns a maximum valid message size for this message type +// BundleMaxSize returns a maximum valid message size for this message type func BundleMaxSize() (s int) { s = 1 + 2 + UnauthenticatedBundleMaxSize() + 5 // Calculating size of slice: z.Votes @@ -1980,7 +1980,7 @@ func (z *compoundMessage) MsgIsZero() bool { return ((*z).Vote.MsgIsZero()) && ((*z).Proposal.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// CompoundMessageMaxSize returns a maximum valid message size for this message type func CompoundMessageMaxSize() (s int) { s = 1 + 5 + UnauthenticatedVoteMaxSize() + 9 + UnauthenticatedProposalMaxSize() return @@ -2245,7 +2245,7 @@ func (z *diskState) MsgIsZero() bool { return (len((*z).Router) == 0) && (len((*z).Player) == 0) && (len((*z).Clock) == 0) && (len((*z).ActionTypes) == 0) && (len((*z).Actions) == 0) } -// MaxSize returns a maximum valid message size for this message type +// DiskStateMaxSize returns a maximum valid message size for this message type func DiskStateMaxSize() (s int) { s = 1 + 7 panic("Unable to determine max size: Byteslice type z.Router is unbounded") @@ -2580,7 +2580,7 @@ func (z *equivocationVote) MsgIsZero() bool { return ((*z).Sender.MsgIsZero()) && ((*z).Round.MsgIsZero()) && ((*z).Period == 0) && ((*z).Step == 0) && ((*z).Cred.MsgIsZero()) && (((*z).Proposals[0].MsgIsZero()) && ((*z).Proposals[1].MsgIsZero())) && (((*z).Sigs[0].MsgIsZero()) && ((*z).Sigs[1].MsgIsZero())) } -// MaxSize returns a maximum valid message size for this message type +// EquivocationVoteMaxSize returns a maximum valid message size for this message type func EquivocationVoteMaxSize() (s int) { s = 1 + 4 + basics.AddressMaxSize() + 4 + basics.RoundMaxSize() + 4 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + committee.CredentialMaxSize() + 6 // Calculating size of array: z.Proposals @@ -2810,7 +2810,7 @@ func (z *equivocationVoteAuthenticator) MsgIsZero() bool { return ((*z).Sender.MsgIsZero()) && ((*z).Cred.MsgIsZero()) && (((*z).Sigs[0].MsgIsZero()) && ((*z).Sigs[1].MsgIsZero())) && (((*z).Proposals[0].MsgIsZero()) && ((*z).Proposals[1].MsgIsZero())) } -// MaxSize returns a maximum valid message size for this message type +// EquivocationVoteAuthenticatorMaxSize returns a maximum valid message size for this message type func EquivocationVoteAuthenticatorMaxSize() (s int) { s = 1 + 4 + basics.AddressMaxSize() + 5 + committee.UnauthenticatedCredentialMaxSize() + 4 // Calculating size of array: z.Sigs @@ -2875,7 +2875,7 @@ func (z eventType) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// EventTypeMaxSize returns a maximum valid message size for this message type func EventTypeMaxSize() (s int) { s = msgp.Uint8Size return @@ -3058,7 +3058,7 @@ func (z *freshnessData) MsgIsZero() bool { return ((*z).PlayerRound.MsgIsZero()) && ((*z).PlayerPeriod == 0) && ((*z).PlayerStep == 0) && ((*z).PlayerLastConcluding == 0) } -// MaxSize returns a maximum valid message size for this message type +// FreshnessDataMaxSize returns a maximum valid message size for this message type func FreshnessDataMaxSize() (s int) { s = 1 + 12 + basics.RoundMaxSize() + 13 + msgp.Uint64Size + 11 + msgp.Uint64Size + 21 + msgp.Uint64Size return @@ -3419,7 +3419,7 @@ func (z *message) MsgIsZero() bool { return ((*z).Tag.MsgIsZero()) && ((*z).Vote.MsgIsZero()) && ((*z).Proposal.MsgIsZero()) && ((*z).Bundle.MsgIsZero()) && ((*z).UnauthenticatedVote.MsgIsZero()) && ((*z).UnauthenticatedProposal.MsgIsZero()) && ((*z).UnauthenticatedBundle.MsgIsZero()) && (((*z).CompoundMessage.Vote.MsgIsZero()) && ((*z).CompoundMessage.Proposal.MsgIsZero())) } -// MaxSize returns a maximum valid message size for this message type +// MessageMaxSize returns a maximum valid message size for this message type func MessageMaxSize() (s int) { s = 1 + 4 + protocol.TagMaxSize() + 5 + VoteMaxSize() + 9 + ProposalMaxSize() + 7 + BundleMaxSize() + 20 + UnauthenticatedVoteMaxSize() + 24 + UnauthenticatedProposalMaxSize() + 22 + UnauthenticatedBundleMaxSize() + 16 + 1 + 5 + UnauthenticatedVoteMaxSize() + 9 + UnauthenticatedProposalMaxSize() return @@ -3709,7 +3709,7 @@ func (z *messageEvent) MsgIsZero() bool { return ((*z).T == 0) && ((*z).Input.MsgIsZero()) && ((*z).Err == nil) && ((*z).TaskIndex == 0) && ((*z).Tail == nil) && ((*z).Cancelled == false) && ((*z).Proto.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// MessageEventMaxSize returns a maximum valid message size for this message type func MessageEventMaxSize() (s int) { s = 1 + 2 + msgp.Uint8Size + 6 + MessageMaxSize() + 4 panic("Unable to determine max size: String type string(*z.Err) is unbounded") @@ -3834,7 +3834,7 @@ func (z *nextThresholdStatusEvent) MsgIsZero() bool { return ((*z).Bottom == false) && ((*z).Proposal.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// NextThresholdStatusEventMaxSize returns a maximum valid message size for this message type func NextThresholdStatusEventMaxSize() (s int) { s = 1 + 7 + msgp.BoolSize + 9 + ProposalValueMaxSize() return @@ -3894,7 +3894,7 @@ func (z period) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// PeriodMaxSize returns a maximum valid message size for this message type func PeriodMaxSize() (s int) { s = msgp.Uint64Size return @@ -4152,7 +4152,7 @@ func (z *periodRouter) MsgIsZero() bool { return ((*z).ProposalTracker.MsgIsZero()) && ((*z).VoteTrackerPeriod.MsgIsZero()) && ((*z).ProposalTrackerContract.MsgIsZero()) && (len((*z).Children) == 0) } -// MaxSize returns a maximum valid message size for this message type +// PeriodRouterMaxSize returns a maximum valid message size for this message type func PeriodRouterMaxSize() (s int) { s = 1 + 16 + ProposalTrackerMaxSize() + 18 + VoteTrackerPeriodMaxSize() + 24 + ProposalTrackerContractMaxSize() + 9 s += msgp.MapHeaderSize @@ -4433,7 +4433,7 @@ func (z *player) MsgIsZero() bool { return ((*z).Round.MsgIsZero()) && ((*z).Period == 0) && ((*z).Step == 0) && ((*z).LastConcluding == 0) && ((*z).Deadline.MsgIsZero()) && ((*z).OldDeadline == 0) && ((*z).Napping == false) && ((*z).FastRecoveryDeadline == 0) && ((*z).Pending.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// PlayerMaxSize returns a maximum valid message size for this message type func PlayerMaxSize() (s int) { s = 1 + 6 + basics.RoundMaxSize() + 7 + msgp.Uint64Size + 5 + msgp.Uint64Size + 15 + msgp.Uint64Size + 15 + DeadlineMaxSize() + 9 + msgp.DurationSize + 8 + msgp.BoolSize + 21 + msgp.DurationSize + 8 + ProposalTableMaxSize() return @@ -5571,7 +5571,7 @@ func (z *proposal) MsgIsZero() bool { return ((*z).unauthenticatedProposal.Block.BlockHeader.Round.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Branch.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Branch512.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Seed.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha512Commitment.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.TimeStamp == 0) && ((*z).unauthenticatedProposal.Block.BlockHeader.GenesisID == "") && ((*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Proposer.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.FeesCollected.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Bonus.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.ProposerPayout.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsLevel == 0) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRate == 0) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsResidue == 0) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolApprovals.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeApprove == false) && ((*z).unauthenticatedProposal.Block.BlockHeader.TxnCounter == 0) && (len((*z).unauthenticatedProposal.Block.BlockHeader.StateProofTracking) == 0) && (len((*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts) == 0) && (len((*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.AbsentParticipationAccounts) == 0) && ((*z).unauthenticatedProposal.Block.Payset.MsgIsZero()) && ((*z).unauthenticatedProposal.SeedProof.MsgIsZero()) && ((*z).unauthenticatedProposal.OriginalPeriod == 0) && ((*z).unauthenticatedProposal.OriginalProposer.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// ProposalMaxSize returns a maximum valid message size for this message type func ProposalMaxSize() (s int) { s = 3 + 4 + basics.RoundMaxSize() + 5 + bookkeeping.BlockHashMaxSize() + 8 + crypto.Sha512DigestMaxSize() + 5 + committee.SeedMaxSize() + 4 + crypto.DigestMaxSize() + 7 + crypto.DigestMaxSize() + 7 + crypto.Sha512DigestMaxSize() + 3 + msgp.Int64Size + 4 + msgp.StringPrefixSize + bounds.MaxGenesisIDLen + 3 + crypto.DigestMaxSize() + 4 + basics.AddressMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 5 + basics.AddressMaxSize() + 4 + basics.AddressMaxSize() + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 7 + basics.RoundMaxSize() + 6 + protocol.ConsensusVersionMaxSize() + 10 + protocol.ConsensusVersionMaxSize() + 8 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 12 + protocol.ConsensusVersionMaxSize() + 13 + basics.RoundMaxSize() + 11 + msgp.BoolSize + 3 + msgp.Uint64Size + 4 s += msgp.MapHeaderSize @@ -5678,7 +5678,7 @@ func (z *proposalManager) MsgIsZero() bool { return true } -// MaxSize returns a maximum valid message size for this message type +// ProposalManagerMaxSize returns a maximum valid message size for this message type func ProposalManagerMaxSize() (s int) { s = 1 return @@ -5820,7 +5820,7 @@ func (z *proposalSeeker) MsgIsZero() bool { return ((*z).Lowest.MsgIsZero()) && ((*z).Filled == false) && ((*z).Frozen == false) } -// MaxSize returns a maximum valid message size for this message type +// ProposalSeekerMaxSize returns a maximum valid message size for this message type func ProposalSeekerMaxSize() (s int) { s = 1 + 7 + VoteMaxSize() + 7 + msgp.BoolSize + 7 + msgp.BoolSize return @@ -6099,7 +6099,7 @@ func (z *proposalStore) MsgIsZero() bool { return (len((*z).Relevant) == 0) && ((*z).Pinned.MsgIsZero()) && (len((*z).Assemblers) == 0) } -// MaxSize returns a maximum valid message size for this message type +// ProposalStoreMaxSize returns a maximum valid message size for this message type func ProposalStoreMaxSize() (s int) { s = 1 + 9 s += msgp.MapHeaderSize @@ -6343,7 +6343,7 @@ func (z *proposalTable) MsgIsZero() bool { return (len((*z).Pending) == 0) && ((*z).PendingNext == 0) } -// MaxSize returns a maximum valid message size for this message type +// ProposalTableMaxSize returns a maximum valid message size for this message type func ProposalTableMaxSize() (s int) { s = 1 + 8 s += msgp.MapHeaderSize @@ -6555,7 +6555,7 @@ func (z *proposalTracker) MsgIsZero() bool { return (len((*z).Duplicate) == 0) && ((*z).Freezer.MsgIsZero()) && ((*z).Staging.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// ProposalTrackerMaxSize returns a maximum valid message size for this message type func ProposalTrackerMaxSize() (s int) { s = 1 + 10 s += msgp.MapHeaderSize @@ -6715,7 +6715,7 @@ func (z *proposalTrackerContract) MsgIsZero() bool { return ((*z).SawOneVote == false) && ((*z).Froze == false) && ((*z).SawSoftThreshold == false) && ((*z).SawCertThreshold == false) } -// MaxSize returns a maximum valid message size for this message type +// ProposalTrackerContractMaxSize returns a maximum valid message size for this message type func ProposalTrackerContractMaxSize() (s int) { s = 1 + 11 + msgp.BoolSize + 6 + msgp.BoolSize + 17 + msgp.BoolSize + 17 + msgp.BoolSize return @@ -6912,7 +6912,7 @@ func (z *proposalValue) MsgIsZero() bool { return ((*z).OriginalPeriod == 0) && ((*z).OriginalProposer.MsgIsZero()) && ((*z).BlockDigest.MsgIsZero()) && ((*z).EncodingDigest.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// ProposalValueMaxSize returns a maximum valid message size for this message type func ProposalValueMaxSize() (s int) { s = 1 + 5 + msgp.Uint64Size + 6 + basics.AddressMaxSize() + 4 + crypto.DigestMaxSize() + 7 + crypto.DigestMaxSize() return @@ -7105,7 +7105,7 @@ func (z *proposalVoteCounter) MsgIsZero() bool { return ((*z).Count == 0) && (len((*z).Votes) == 0) } -// MaxSize returns a maximum valid message size for this message type +// ProposalVoteCounterMaxSize returns a maximum valid message size for this message type func ProposalVoteCounterMaxSize() (s int) { s = 1 + 6 + msgp.Uint64Size + 6 s += msgp.MapHeaderSize @@ -7231,7 +7231,7 @@ func (z *proposerSeed) MsgIsZero() bool { return ((*z).Addr.MsgIsZero()) && ((*z).VRF.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// ProposerSeedMaxSize returns a maximum valid message size for this message type func ProposerSeedMaxSize() (s int) { s = 1 + 5 + basics.AddressMaxSize() + 4 + crypto.VrfOutputMaxSize() return @@ -7459,7 +7459,7 @@ func (z *rawVote) MsgIsZero() bool { return ((*z).Sender.MsgIsZero()) && ((*z).Round.MsgIsZero()) && ((*z).Period == 0) && ((*z).Step == 0) && ((*z).Proposal.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// RawVoteMaxSize returns a maximum valid message size for this message type func RawVoteMaxSize() (s int) { s = 1 + 4 + basics.AddressMaxSize() + 4 + basics.RoundMaxSize() + 4 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + ProposalValueMaxSize() return @@ -7846,7 +7846,7 @@ func (z *rootRouter) MsgIsZero() bool { return (len((*z).Children) == 0) } -// MaxSize returns a maximum valid message size for this message type +// RootRouterMaxSize returns a maximum valid message size for this message type func RootRouterMaxSize() (s int) { s = 1 + 16 + 1 + 15 + 1 + 9 s += msgp.MapHeaderSize @@ -8222,7 +8222,7 @@ func (z *roundRouter) MsgIsZero() bool { return ((*z).ProposalStore.MsgIsZero()) && (((*z).VoteTrackerRound.Freshest.MsgIsZero()) && ((*z).VoteTrackerRound.Ok == false)) && (len((*z).Children) == 0) } -// MaxSize returns a maximum valid message size for this message type +// RoundRouterMaxSize returns a maximum valid message size for this message type func RoundRouterMaxSize() (s int) { s = 1 + 14 + ProposalStoreMaxSize() + 17 + 1 + 9 + ThresholdEventMaxSize() + 3 + msgp.BoolSize + 9 s += msgp.MapHeaderSize @@ -8348,7 +8348,7 @@ func (z *seedInput) MsgIsZero() bool { return ((*z).Alpha.MsgIsZero()) && ((*z).History.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// SeedInputMaxSize returns a maximum valid message size for this message type func SeedInputMaxSize() (s int) { s = 1 + 6 + crypto.DigestMaxSize() + 5 + crypto.DigestMaxSize() return @@ -8523,7 +8523,7 @@ func (z *selector) MsgIsZero() bool { return ((*z).Seed.MsgIsZero()) && ((*z).Round.MsgIsZero()) && ((*z).Period == 0) && ((*z).Step == 0) } -// MaxSize returns a maximum valid message size for this message type +// SelectorMaxSize returns a maximum valid message size for this message type func SelectorMaxSize() (s int) { s = 1 + 5 + committee.SeedMaxSize() + 4 + basics.RoundMaxSize() + 4 + msgp.Uint64Size + 5 + msgp.Uint64Size return @@ -8583,7 +8583,7 @@ func (z serializableError) MsgIsZero() bool { return z == "" } -// MaxSize returns a maximum valid message size for this message type +// SerializableErrorMaxSize returns a maximum valid message size for this message type func SerializableErrorMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") } @@ -8642,7 +8642,7 @@ func (z step) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// StepMaxSize returns a maximum valid message size for this message type func StepMaxSize() (s int) { s = msgp.Uint64Size return @@ -8767,7 +8767,7 @@ func (z *stepRouter) MsgIsZero() bool { return ((*z).VoteTracker.MsgIsZero()) && ((*z).VoteTrackerContract.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// StepRouterMaxSize returns a maximum valid message size for this message type func StepRouterMaxSize() (s int) { s = 1 + 12 + VoteTrackerMaxSize() + 20 + VoteTrackerContractMaxSize() return @@ -9001,7 +9001,7 @@ func (z *thresholdEvent) MsgIsZero() bool { return ((*z).T == 0) && ((*z).Round.MsgIsZero()) && ((*z).Period == 0) && ((*z).Step == 0) && ((*z).Proposal.MsgIsZero()) && ((*z).Bundle.MsgIsZero()) && ((*z).Proto.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// ThresholdEventMaxSize returns a maximum valid message size for this message type func ThresholdEventMaxSize() (s int) { s = 1 + 2 + msgp.Uint8Size + 6 + basics.RoundMaxSize() + 7 + msgp.Uint64Size + 5 + msgp.Uint64Size + 9 + ProposalValueMaxSize() + 7 + UnauthenticatedBundleMaxSize() + 6 + protocol.ConsensusVersionMaxSize() return @@ -10162,7 +10162,7 @@ func (z *transmittedPayload) MsgIsZero() bool { return ((*z).unauthenticatedProposal.Block.BlockHeader.Round.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Branch.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Branch512.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Seed.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha256Commitment.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.TxnCommitments.Sha512Commitment.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.TimeStamp == 0) && ((*z).unauthenticatedProposal.Block.BlockHeader.GenesisID == "") && ((*z).unauthenticatedProposal.Block.BlockHeader.GenesisHash.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Proposer.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.FeesCollected.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.Bonus.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.ProposerPayout.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.FeeSink.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsPool.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsLevel == 0) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRate == 0) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsResidue == 0) && ((*z).unauthenticatedProposal.Block.BlockHeader.RewardsState.RewardsRecalculationRound.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.CurrentProtocol.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocol.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolApprovals.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradePropose.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeDelay.MsgIsZero()) && ((*z).unauthenticatedProposal.Block.BlockHeader.UpgradeVote.UpgradeApprove == false) && ((*z).unauthenticatedProposal.Block.BlockHeader.TxnCounter == 0) && (len((*z).unauthenticatedProposal.Block.BlockHeader.StateProofTracking) == 0) && (len((*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts) == 0) && (len((*z).unauthenticatedProposal.Block.BlockHeader.ParticipationUpdates.AbsentParticipationAccounts) == 0) && ((*z).unauthenticatedProposal.Block.Payset.MsgIsZero()) && ((*z).unauthenticatedProposal.SeedProof.MsgIsZero()) && ((*z).unauthenticatedProposal.OriginalPeriod == 0) && ((*z).unauthenticatedProposal.OriginalProposer.MsgIsZero()) && ((*z).PriorVote.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// TransmittedPayloadMaxSize returns a maximum valid message size for this message type func TransmittedPayloadMaxSize() (s int) { s = 3 + 4 + basics.RoundMaxSize() + 5 + bookkeeping.BlockHashMaxSize() + 8 + crypto.Sha512DigestMaxSize() + 5 + committee.SeedMaxSize() + 4 + crypto.DigestMaxSize() + 7 + crypto.DigestMaxSize() + 7 + crypto.Sha512DigestMaxSize() + 3 + msgp.Int64Size + 4 + msgp.StringPrefixSize + bounds.MaxGenesisIDLen + 3 + crypto.DigestMaxSize() + 4 + basics.AddressMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 5 + basics.AddressMaxSize() + 4 + basics.AddressMaxSize() + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 7 + basics.RoundMaxSize() + 6 + protocol.ConsensusVersionMaxSize() + 10 + protocol.ConsensusVersionMaxSize() + 8 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 12 + protocol.ConsensusVersionMaxSize() + 13 + basics.RoundMaxSize() + 11 + msgp.BoolSize + 3 + msgp.Uint64Size + 4 s += msgp.MapHeaderSize @@ -10533,7 +10533,7 @@ func (z *unauthenticatedBundle) MsgIsZero() bool { return ((*z).Round.MsgIsZero()) && ((*z).Period == 0) && ((*z).Step == 0) && ((*z).Proposal.MsgIsZero()) && (len((*z).Votes) == 0) && (len((*z).EquivocationVotes) == 0) } -// MaxSize returns a maximum valid message size for this message type +// UnauthenticatedBundleMaxSize returns a maximum valid message size for this message type func UnauthenticatedBundleMaxSize() (s int) { s = 1 + 4 + basics.RoundMaxSize() + 4 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + ProposalValueMaxSize() + 5 // Calculating size of slice: z.Votes @@ -10873,7 +10873,7 @@ func (z *unauthenticatedEquivocationVote) MsgIsZero() bool { return ((*z).Sender.MsgIsZero()) && ((*z).Round.MsgIsZero()) && ((*z).Period == 0) && ((*z).Step == 0) && ((*z).Cred.MsgIsZero()) && (((*z).Proposals[0].MsgIsZero()) && ((*z).Proposals[1].MsgIsZero())) && (((*z).Sigs[0].MsgIsZero()) && ((*z).Sigs[1].MsgIsZero())) } -// MaxSize returns a maximum valid message size for this message type +// UnauthenticatedEquivocationVoteMaxSize returns a maximum valid message size for this message type func UnauthenticatedEquivocationVoteMaxSize() (s int) { s = 1 + 4 + basics.AddressMaxSize() + 4 + basics.RoundMaxSize() + 4 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + committee.UnauthenticatedCredentialMaxSize() + 6 // Calculating size of array: z.Proposals @@ -12016,7 +12016,7 @@ func (z *unauthenticatedProposal) MsgIsZero() bool { return ((*z).Block.BlockHeader.Round.MsgIsZero()) && ((*z).Block.BlockHeader.Branch.MsgIsZero()) && ((*z).Block.BlockHeader.Branch512.MsgIsZero()) && ((*z).Block.BlockHeader.Seed.MsgIsZero()) && ((*z).Block.BlockHeader.TxnCommitments.NativeSha512_256Commitment.MsgIsZero()) && ((*z).Block.BlockHeader.TxnCommitments.Sha256Commitment.MsgIsZero()) && ((*z).Block.BlockHeader.TxnCommitments.Sha512Commitment.MsgIsZero()) && ((*z).Block.BlockHeader.TimeStamp == 0) && ((*z).Block.BlockHeader.GenesisID == "") && ((*z).Block.BlockHeader.GenesisHash.MsgIsZero()) && ((*z).Block.BlockHeader.Proposer.MsgIsZero()) && ((*z).Block.BlockHeader.FeesCollected.MsgIsZero()) && ((*z).Block.BlockHeader.Bonus.MsgIsZero()) && ((*z).Block.BlockHeader.ProposerPayout.MsgIsZero()) && ((*z).Block.BlockHeader.RewardsState.FeeSink.MsgIsZero()) && ((*z).Block.BlockHeader.RewardsState.RewardsPool.MsgIsZero()) && ((*z).Block.BlockHeader.RewardsState.RewardsLevel == 0) && ((*z).Block.BlockHeader.RewardsState.RewardsRate == 0) && ((*z).Block.BlockHeader.RewardsState.RewardsResidue == 0) && ((*z).Block.BlockHeader.RewardsState.RewardsRecalculationRound.MsgIsZero()) && ((*z).Block.BlockHeader.UpgradeState.CurrentProtocol.MsgIsZero()) && ((*z).Block.BlockHeader.UpgradeState.NextProtocol.MsgIsZero()) && ((*z).Block.BlockHeader.UpgradeState.NextProtocolApprovals.MsgIsZero()) && ((*z).Block.BlockHeader.UpgradeState.NextProtocolVoteBefore.MsgIsZero()) && ((*z).Block.BlockHeader.UpgradeState.NextProtocolSwitchOn.MsgIsZero()) && ((*z).Block.BlockHeader.UpgradeVote.UpgradePropose.MsgIsZero()) && ((*z).Block.BlockHeader.UpgradeVote.UpgradeDelay.MsgIsZero()) && ((*z).Block.BlockHeader.UpgradeVote.UpgradeApprove == false) && ((*z).Block.BlockHeader.TxnCounter == 0) && (len((*z).Block.BlockHeader.StateProofTracking) == 0) && (len((*z).Block.BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts) == 0) && (len((*z).Block.BlockHeader.ParticipationUpdates.AbsentParticipationAccounts) == 0) && ((*z).Block.Payset.MsgIsZero()) && ((*z).SeedProof.MsgIsZero()) && ((*z).OriginalPeriod == 0) && ((*z).OriginalProposer.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// UnauthenticatedProposalMaxSize returns a maximum valid message size for this message type func UnauthenticatedProposalMaxSize() (s int) { s = 3 + 4 + basics.RoundMaxSize() + 5 + bookkeeping.BlockHashMaxSize() + 8 + crypto.Sha512DigestMaxSize() + 5 + committee.SeedMaxSize() + 4 + crypto.DigestMaxSize() + 7 + crypto.DigestMaxSize() + 7 + crypto.Sha512DigestMaxSize() + 3 + msgp.Int64Size + 4 + msgp.StringPrefixSize + bounds.MaxGenesisIDLen + 3 + crypto.DigestMaxSize() + 4 + basics.AddressMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 5 + basics.AddressMaxSize() + 4 + basics.AddressMaxSize() + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 7 + basics.RoundMaxSize() + 6 + protocol.ConsensusVersionMaxSize() + 10 + protocol.ConsensusVersionMaxSize() + 8 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 12 + protocol.ConsensusVersionMaxSize() + 13 + basics.RoundMaxSize() + 11 + msgp.BoolSize + 3 + msgp.Uint64Size + 4 s += msgp.MapHeaderSize @@ -12197,7 +12197,7 @@ func (z *unauthenticatedVote) MsgIsZero() bool { return ((*z).R.MsgIsZero()) && ((*z).Cred.MsgIsZero()) && ((*z).Sig.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// UnauthenticatedVoteMaxSize returns a maximum valid message size for this message type func UnauthenticatedVoteMaxSize() (s int) { s = 1 + 2 + RawVoteMaxSize() + 5 + committee.UnauthenticatedCredentialMaxSize() + 4 + crypto.OneTimeSignatureMaxSize() return @@ -12363,7 +12363,7 @@ func (z *vote) MsgIsZero() bool { return ((*z).R.MsgIsZero()) && ((*z).Cred.MsgIsZero()) && ((*z).Sig.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// VoteMaxSize returns a maximum valid message size for this message type func VoteMaxSize() (s int) { s = 1 + 2 + RawVoteMaxSize() + 5 + committee.CredentialMaxSize() + 4 + crypto.OneTimeSignatureMaxSize() return @@ -12455,7 +12455,7 @@ func (z *voteAggregator) MsgIsZero() bool { return true } -// MaxSize returns a maximum valid message size for this message type +// VoteAggregatorMaxSize returns a maximum valid message size for this message type func VoteAggregatorMaxSize() (s int) { s = 1 return @@ -12609,7 +12609,7 @@ func (z *voteAuthenticator) MsgIsZero() bool { return ((*z).Sender.MsgIsZero()) && ((*z).Cred.MsgIsZero()) && ((*z).Sig.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// VoteAuthenticatorMaxSize returns a maximum valid message size for this message type func VoteAuthenticatorMaxSize() (s int) { s = 1 + 4 + basics.AddressMaxSize() + 5 + committee.UnauthenticatedCredentialMaxSize() + 4 + crypto.OneTimeSignatureMaxSize() return @@ -12975,7 +12975,7 @@ func (z *voteTracker) MsgIsZero() bool { return (len((*z).Voters) == 0) && (len((*z).Counts) == 0) && (len((*z).Equivocators) == 0) && ((*z).EquivocatorsCount == 0) } -// MaxSize returns a maximum valid message size for this message type +// VoteTrackerMaxSize returns a maximum valid message size for this message type func VoteTrackerMaxSize() (s int) { s = 1 + 7 s += msgp.MapHeaderSize @@ -13126,7 +13126,7 @@ func (z *voteTrackerContract) MsgIsZero() bool { return ((*z).Step == 0) && ((*z).StepOk == false) && ((*z).Emitted == false) } -// MaxSize returns a maximum valid message size for this message type +// VoteTrackerContractMaxSize returns a maximum valid message size for this message type func VoteTrackerContractMaxSize() (s int) { s = 1 + 5 + msgp.Uint64Size + 7 + msgp.BoolSize + 8 + msgp.BoolSize return @@ -13368,7 +13368,7 @@ func (z *voteTrackerPeriod) MsgIsZero() bool { return (((*z).Cached.Bottom == false) && ((*z).Cached.Proposal.MsgIsZero())) } -// MaxSize returns a maximum valid message size for this message type +// VoteTrackerPeriodMaxSize returns a maximum valid message size for this message type func VoteTrackerPeriodMaxSize() (s int) { s = 1 + 7 + 1 + 7 + msgp.BoolSize + 9 + ProposalValueMaxSize() return @@ -13493,7 +13493,7 @@ func (z *voteTrackerRound) MsgIsZero() bool { return ((*z).Freshest.MsgIsZero()) && ((*z).Ok == false) } -// MaxSize returns a maximum valid message size for this message type +// VoteTrackerRoundMaxSize returns a maximum valid message size for this message type func VoteTrackerRoundMaxSize() (s int) { s = 1 + 9 + ThresholdEventMaxSize() + 3 + msgp.BoolSize return diff --git a/agreement/msgp_gen_test.go b/agreement/msgp_gen_test.go index 2d3952add9..3c39a19979 100644 --- a/agreement/msgp_gen_test.go +++ b/agreement/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package agreement // Code generated by github.com/algorand/msgp DO NOT EDIT. +package agreement + import ( "testing" diff --git a/crypto/merklearray/msgp_gen.go b/crypto/merklearray/msgp_gen.go index db308439e0..c82fa0aa85 100644 --- a/crypto/merklearray/msgp_gen.go +++ b/crypto/merklearray/msgp_gen.go @@ -1,7 +1,7 @@ -package merklearray - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package merklearray + import ( "github.com/algorand/msgp/msgp" @@ -130,7 +130,7 @@ func (z Layer) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// LayerMaxSize returns a maximum valid message size for this message type func LayerMaxSize() (s int) { // Calculating size of slice: z s += msgp.ArrayHeaderSize + ((MaxNumLeavesOnEncodedTree) * (crypto.GenericDigestMaxSize())) @@ -350,7 +350,7 @@ func (z *Proof) MsgIsZero() bool { return (len((*z).Path) == 0) && ((*z).HashFactory.MsgIsZero()) && ((*z).TreeDepth == 0) } -// MaxSize returns a maximum valid message size for this message type +// ProofMaxSize returns a maximum valid message size for this message type func ProofMaxSize() (s int) { s = 1 + 4 // Calculating size of slice: z.Path @@ -860,7 +860,7 @@ func (z *Tree) MsgIsZero() bool { return (len((*z).Levels) == 0) && ((*z).NumOfElements == 0) && ((*z).Hash.MsgIsZero()) && ((*z).IsVectorCommitment == false) } -// MaxSize returns a maximum valid message size for this message type +// TreeMaxSize returns a maximum valid message size for this message type func TreeMaxSize() (s int) { s = 1 + 5 // Calculating size of slice: z.Levels diff --git a/crypto/merklearray/msgp_gen_test.go b/crypto/merklearray/msgp_gen_test.go index 2b50c643b4..4edf2cb78e 100644 --- a/crypto/merklearray/msgp_gen_test.go +++ b/crypto/merklearray/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package merklearray // Code generated by github.com/algorand/msgp DO NOT EDIT. +package merklearray + import ( "testing" diff --git a/crypto/merklesignature/msgp_gen.go b/crypto/merklesignature/msgp_gen.go index 8cac8a7395..6ec4827584 100644 --- a/crypto/merklesignature/msgp_gen.go +++ b/crypto/merklesignature/msgp_gen.go @@ -1,7 +1,7 @@ -package merklesignature - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package merklesignature + import ( "github.com/algorand/msgp/msgp" @@ -118,7 +118,7 @@ func (z *Commitment) MsgIsZero() bool { return (*z) == (Commitment{}) } -// MaxSize returns a maximum valid message size for this message type +// CommitmentMaxSize returns a maximum valid message size for this message type func CommitmentMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((MerkleSignatureSchemeRootSize) * (msgp.ByteSize)) @@ -293,7 +293,7 @@ func (z *KeyRoundPair) MsgIsZero() bool { return ((*z).Round == 0) && ((*z).Key == nil) } -// MaxSize returns a maximum valid message size for this message type +// KeyRoundPairMaxSize returns a maximum valid message size for this message type func KeyRoundPairMaxSize() (s int) { s = 1 + 4 + msgp.Uint64Size + 4 s += crypto.FalconSignerMaxSize() @@ -460,7 +460,7 @@ func (z *Secrets) MsgIsZero() bool { return ((*z).SignerContext.FirstValid == 0) && ((*z).SignerContext.KeyLifetime == 0) && ((*z).SignerContext.Tree.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// SecretsMaxSize returns a maximum valid message size for this message type func SecretsMaxSize() (s int) { s = 1 + 3 + msgp.Uint64Size + 3 + msgp.Uint64Size + 5 + merklearray.TreeMaxSize() return @@ -649,7 +649,7 @@ func (z *Signature) MsgIsZero() bool { return ((*z).Signature.MsgIsZero()) && ((*z).VectorCommitmentIndex == 0) && ((*z).Proof.MsgIsZero()) && ((*z).VerifyingKey.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// SignatureMaxSize returns a maximum valid message size for this message type func SignatureMaxSize() (s int) { s = 1 + 4 + crypto.FalconSignatureMaxSize() + 4 + msgp.Uint64Size + 4 + merklearray.SingleLeafProofMaxSize() + 5 + crypto.FalconVerifierMaxSize() return @@ -815,7 +815,7 @@ func (z *SignerContext) MsgIsZero() bool { return ((*z).FirstValid == 0) && ((*z).KeyLifetime == 0) && ((*z).Tree.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// SignerContextMaxSize returns a maximum valid message size for this message type func SignerContextMaxSize() (s int) { s = 1 + 3 + msgp.Uint64Size + 3 + msgp.Uint64Size + 5 + merklearray.TreeMaxSize() return @@ -958,7 +958,7 @@ func (z *Verifier) MsgIsZero() bool { return ((*z).Commitment == (Commitment{})) && ((*z).KeyLifetime == 0) } -// MaxSize returns a maximum valid message size for this message type +// VerifierMaxSize returns a maximum valid message size for this message type func VerifierMaxSize() (s int) { s = 1 + 4 // Calculating size of array: z.Commitment diff --git a/crypto/merklesignature/msgp_gen_test.go b/crypto/merklesignature/msgp_gen_test.go index 7a53df31a3..a421603921 100644 --- a/crypto/merklesignature/msgp_gen_test.go +++ b/crypto/merklesignature/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package merklesignature // Code generated by github.com/algorand/msgp DO NOT EDIT. +package merklesignature + import ( "testing" diff --git a/crypto/msgp_gen.go b/crypto/msgp_gen.go index 0b7142457f..6e64233c0d 100644 --- a/crypto/msgp_gen.go +++ b/crypto/msgp_gen.go @@ -1,7 +1,7 @@ -package crypto - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package crypto + import ( _ "runtime/cgo" _ "unsafe" @@ -419,7 +419,7 @@ func (z *Digest) MsgIsZero() bool { return (*z) == (Digest{}) } -// MaxSize returns a maximum valid message size for this message type +// DigestMaxSize returns a maximum valid message size for this message type func DigestMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((DigestSize) * (msgp.ByteSize)) @@ -473,7 +473,7 @@ func (z *FalconPrivateKey) MsgIsZero() bool { return (*z) == (FalconPrivateKey{}) } -// MaxSize returns a maximum valid message size for this message type +// FalconPrivateKeyMaxSize returns a maximum valid message size for this message type func FalconPrivateKeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((cfalcon.PrivateKeySize) * (msgp.ByteSize)) @@ -527,7 +527,7 @@ func (z *FalconPublicKey) MsgIsZero() bool { return (*z) == (FalconPublicKey{}) } -// MaxSize returns a maximum valid message size for this message type +// FalconPublicKeyMaxSize returns a maximum valid message size for this message type func FalconPublicKeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((cfalcon.PublicKeySize) * (msgp.ByteSize)) @@ -581,7 +581,7 @@ func (z *FalconSeed) MsgIsZero() bool { return (*z) == (FalconSeed{}) } -// MaxSize returns a maximum valid message size for this message type +// FalconSeedMaxSize returns a maximum valid message size for this message type func FalconSeedMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((FalconSeedSize) * (msgp.ByteSize)) @@ -652,7 +652,7 @@ func (z FalconSignature) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// FalconSignatureMaxSize returns a maximum valid message size for this message type func FalconSignatureMaxSize() (s int) { s = msgp.BytesPrefixSize + FalconMaxSignatureSize return @@ -795,7 +795,7 @@ func (z *FalconSigner) MsgIsZero() bool { return ((*z).PublicKey == (FalconPublicKey{})) && ((*z).PrivateKey == (FalconPrivateKey{})) } -// MaxSize returns a maximum valid message size for this message type +// FalconSignerMaxSize returns a maximum valid message size for this message type func FalconSignerMaxSize() (s int) { s = 1 + 3 // Calculating size of array: z.PublicKey @@ -920,7 +920,7 @@ func (z *FalconVerifier) MsgIsZero() bool { return ((*z).PublicKey == (FalconPublicKey{})) } -// MaxSize returns a maximum valid message size for this message type +// FalconVerifierMaxSize returns a maximum valid message size for this message type func FalconVerifierMaxSize() (s int) { s = 1 + 2 // Calculating size of array: z.PublicKey @@ -992,7 +992,7 @@ func (z GenericDigest) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// GenericDigestMaxSize returns a maximum valid message size for this message type func GenericDigestMaxSize() (s int) { s = msgp.BytesPrefixSize + MaxHashDigestSize return @@ -1123,7 +1123,7 @@ func (z *HashFactory) MsgIsZero() bool { return ((*z).HashType == 0) } -// MaxSize returns a maximum valid message size for this message type +// HashFactoryMaxSize returns a maximum valid message size for this message type func HashFactoryMaxSize() (s int) { s = 1 + 2 + msgp.Uint16Size return @@ -1183,7 +1183,7 @@ func (z HashType) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// HashTypeMaxSize returns a maximum valid message size for this message type func HashTypeMaxSize() (s int) { s = msgp.Uint16Size return @@ -1395,7 +1395,7 @@ func (z *HeartbeatProof) MsgIsZero() bool { return ((*z).Sig == (ed25519Signature{})) && ((*z).PK == (ed25519PublicKey{})) && ((*z).PK2 == (ed25519PublicKey{})) && ((*z).PK1Sig == (ed25519Signature{})) && ((*z).PK2Sig == (ed25519Signature{})) } -// MaxSize returns a maximum valid message size for this message type +// HeartbeatProofMaxSize returns a maximum valid message size for this message type func HeartbeatProofMaxSize() (s int) { s = 1 + 2 // Calculating size of array: z.Sig @@ -1462,7 +1462,7 @@ func (z *MasterDerivationKey) MsgIsZero() bool { return (*z) == (MasterDerivationKey{}) } -// MaxSize returns a maximum valid message size for this message type +// MasterDerivationKeyMaxSize returns a maximum valid message size for this message type func MasterDerivationKeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((masterDerivationKeyLenBytes) * (msgp.ByteSize)) @@ -1681,7 +1681,7 @@ func (z *MultisigSig) MsgIsZero() bool { return ((*z).Version == 0) && ((*z).Threshold == 0) && (len((*z).Subsigs) == 0) } -// MaxSize returns a maximum valid message size for this message type +// MultisigSigMaxSize returns a maximum valid message size for this message type func MultisigSigMaxSize() (s int) { s = 1 + 2 + msgp.Uint8Size + 4 + msgp.Uint8Size + 7 // Calculating size of slice: z.Subsigs @@ -1826,7 +1826,7 @@ func (z *MultisigSubsig) MsgIsZero() bool { return ((*z).Key == (PublicKey{})) && ((*z).Sig == (Signature{})) } -// MaxSize returns a maximum valid message size for this message type +// MultisigSubsigMaxSize returns a maximum valid message size for this message type func MultisigSubsigMaxSize() (s int) { s = 1 + 3 // Calculating size of array: z.Key @@ -2024,7 +2024,7 @@ func (z *OneTimeSignature) MsgIsZero() bool { return ((*z).Sig == (ed25519Signature{})) && ((*z).PK == (ed25519PublicKey{})) && ((*z).PKSigOld == (ed25519Signature{})) && ((*z).PK2 == (ed25519PublicKey{})) && ((*z).PK1Sig == (ed25519Signature{})) && ((*z).PK2Sig == (ed25519Signature{})) } -// MaxSize returns a maximum valid message size for this message type +// OneTimeSignatureMaxSize returns a maximum valid message size for this message type func OneTimeSignatureMaxSize() (s int) { s = 1 + 2 // Calculating size of array: z.Sig @@ -2385,7 +2385,7 @@ func (z *OneTimeSignatureSecrets) MsgIsZero() bool { return ((*z).OneTimeSignatureSecretsPersistent.OneTimeSignatureVerifier == (OneTimeSignatureVerifier{})) && ((*z).OneTimeSignatureSecretsPersistent.FirstBatch == 0) && (len((*z).OneTimeSignatureSecretsPersistent.Batches) == 0) && ((*z).OneTimeSignatureSecretsPersistent.FirstOffset == 0) && (len((*z).OneTimeSignatureSecretsPersistent.Offsets) == 0) && ((*z).OneTimeSignatureSecretsPersistent.OffsetsPK2 == (ed25519PublicKey{})) && ((*z).OneTimeSignatureSecretsPersistent.OffsetsPK2Sig == (ed25519Signature{})) } -// MaxSize returns a maximum valid message size for this message type +// OneTimeSignatureSecretsMaxSize returns a maximum valid message size for this message type func OneTimeSignatureSecretsMaxSize() (s int) { s = 1 + 25 // Calculating size of array: z.OneTimeSignatureSecretsPersistent.OneTimeSignatureVerifier @@ -2733,7 +2733,7 @@ func (z *OneTimeSignatureSecretsPersistent) MsgIsZero() bool { return ((*z).OneTimeSignatureVerifier == (OneTimeSignatureVerifier{})) && ((*z).FirstBatch == 0) && (len((*z).Batches) == 0) && ((*z).FirstOffset == 0) && (len((*z).Offsets) == 0) && ((*z).OffsetsPK2 == (ed25519PublicKey{})) && ((*z).OffsetsPK2Sig == (ed25519Signature{})) } -// MaxSize returns a maximum valid message size for this message type +// OneTimeSignatureSecretsPersistentMaxSize returns a maximum valid message size for this message type func OneTimeSignatureSecretsPersistentMaxSize() (s int) { s = 1 + 25 // Calculating size of array: z.OneTimeSignatureVerifier @@ -2862,7 +2862,7 @@ func (z *OneTimeSignatureSubkeyBatchID) MsgIsZero() bool { return ((*z).SubKeyPK == (ed25519PublicKey{})) && ((*z).Batch == 0) } -// MaxSize returns a maximum valid message size for this message type +// OneTimeSignatureSubkeyBatchIDMaxSize returns a maximum valid message size for this message type func OneTimeSignatureSubkeyBatchIDMaxSize() (s int) { s = 1 + 3 // Calculating size of array: z.SubKeyPK @@ -3007,7 +3007,7 @@ func (z *OneTimeSignatureSubkeyOffsetID) MsgIsZero() bool { return ((*z).SubKeyPK == (ed25519PublicKey{})) && ((*z).Batch == 0) && ((*z).Offset == 0) } -// MaxSize returns a maximum valid message size for this message type +// OneTimeSignatureSubkeyOffsetIDMaxSize returns a maximum valid message size for this message type func OneTimeSignatureSubkeyOffsetIDMaxSize() (s int) { s = 1 + 3 // Calculating size of array: z.SubKeyPK @@ -3063,7 +3063,7 @@ func (z *OneTimeSignatureVerifier) MsgIsZero() bool { return (*z) == (OneTimeSignatureVerifier{}) } -// MaxSize returns a maximum valid message size for this message type +// OneTimeSignatureVerifierMaxSize returns a maximum valid message size for this message type func OneTimeSignatureVerifierMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -3117,7 +3117,7 @@ func (z *PrivateKey) MsgIsZero() bool { return (*z) == (PrivateKey{}) } -// MaxSize returns a maximum valid message size for this message type +// PrivateKeyMaxSize returns a maximum valid message size for this message type func PrivateKeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((64) * (msgp.ByteSize)) @@ -3171,7 +3171,7 @@ func (z *PublicKey) MsgIsZero() bool { return (*z) == (PublicKey{}) } -// MaxSize returns a maximum valid message size for this message type +// PublicKeyMaxSize returns a maximum valid message size for this message type func PublicKeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -3225,7 +3225,7 @@ func (z *Seed) MsgIsZero() bool { return (*z) == (Seed{}) } -// MaxSize returns a maximum valid message size for this message type +// SeedMaxSize returns a maximum valid message size for this message type func SeedMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -3279,7 +3279,7 @@ func (z *Sha512Digest) MsgIsZero() bool { return (*z) == (Sha512Digest{}) } -// MaxSize returns a maximum valid message size for this message type +// Sha512DigestMaxSize returns a maximum valid message size for this message type func Sha512DigestMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((Sha512Size) * (msgp.ByteSize)) @@ -3333,7 +3333,7 @@ func (z *Signature) MsgIsZero() bool { return (*z) == (Signature{}) } -// MaxSize returns a maximum valid message size for this message type +// SignatureMaxSize returns a maximum valid message size for this message type func SignatureMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((64) * (msgp.ByteSize)) @@ -3459,7 +3459,7 @@ func (z *SignatureSecrets) MsgIsZero() bool { return ((*z).SignatureVerifier == (PublicKey{})) && ((*z).SK == (ed25519PrivateKey{})) } -// MaxSize returns a maximum valid message size for this message type +// SignatureSecretsMaxSize returns a maximum valid message size for this message type func SignatureSecretsMaxSize() (s int) { s = 1 + 18 // Calculating size of array: z.SignatureVerifier @@ -3589,7 +3589,7 @@ func (z *VRFSecrets) MsgIsZero() bool { return ((*z).PK == (VrfPubkey{})) && ((*z).SK == (VrfPrivkey{})) } -// MaxSize returns a maximum valid message size for this message type +// VRFSecretsMaxSize returns a maximum valid message size for this message type func VRFSecretsMaxSize() (s int) { s = 1 + 3 // Calculating size of array: z.PK @@ -3647,7 +3647,7 @@ func (z *VrfOutput) MsgIsZero() bool { return (*z) == (VrfOutput{}) } -// MaxSize returns a maximum valid message size for this message type +// VrfOutputMaxSize returns a maximum valid message size for this message type func VrfOutputMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((64) * (msgp.ByteSize)) @@ -3701,7 +3701,7 @@ func (z *VrfPrivkey) MsgIsZero() bool { return (*z) == (VrfPrivkey{}) } -// MaxSize returns a maximum valid message size for this message type +// VrfPrivkeyMaxSize returns a maximum valid message size for this message type func VrfPrivkeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((64) * (msgp.ByteSize)) @@ -3755,7 +3755,7 @@ func (z *VrfProof) MsgIsZero() bool { return (*z) == (VrfProof{}) } -// MaxSize returns a maximum valid message size for this message type +// VrfProofMaxSize returns a maximum valid message size for this message type func VrfProofMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((80) * (msgp.ByteSize)) @@ -3809,7 +3809,7 @@ func (z *VrfPubkey) MsgIsZero() bool { return (*z) == (VrfPubkey{}) } -// MaxSize returns a maximum valid message size for this message type +// VrfPubkeyMaxSize returns a maximum valid message size for this message type func VrfPubkeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -3863,7 +3863,7 @@ func (z *ed25519PrivateKey) MsgIsZero() bool { return (*z) == (ed25519PrivateKey{}) } -// MaxSize returns a maximum valid message size for this message type +// Ed25519PrivateKeyMaxSize returns a maximum valid message size for this message type func Ed25519PrivateKeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((64) * (msgp.ByteSize)) @@ -3917,7 +3917,7 @@ func (z *ed25519PublicKey) MsgIsZero() bool { return (*z) == (ed25519PublicKey{}) } -// MaxSize returns a maximum valid message size for this message type +// Ed25519PublicKeyMaxSize returns a maximum valid message size for this message type func Ed25519PublicKeyMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -3971,7 +3971,7 @@ func (z *ed25519Seed) MsgIsZero() bool { return (*z) == (ed25519Seed{}) } -// MaxSize returns a maximum valid message size for this message type +// Ed25519SeedMaxSize returns a maximum valid message size for this message type func Ed25519SeedMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -4025,7 +4025,7 @@ func (z *ed25519Signature) MsgIsZero() bool { return (*z) == (ed25519Signature{}) } -// MaxSize returns a maximum valid message size for this message type +// Ed25519SignatureMaxSize returns a maximum valid message size for this message type func Ed25519SignatureMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((64) * (msgp.ByteSize)) @@ -4185,7 +4185,7 @@ func (z *ephemeralSubkey) MsgIsZero() bool { return ((*z).PK == (ed25519PublicKey{})) && ((*z).SK == (ed25519PrivateKey{})) && ((*z).PKSigOld == (ed25519Signature{})) && ((*z).PKSigNew == (ed25519Signature{})) } -// MaxSize returns a maximum valid message size for this message type +// EphemeralSubkeyMaxSize returns a maximum valid message size for this message type func EphemeralSubkeyMaxSize() (s int) { s = 1 + 3 // Calculating size of array: z.PK diff --git a/crypto/msgp_gen_test.go b/crypto/msgp_gen_test.go index f864b58c44..8516b8c71c 100644 --- a/crypto/msgp_gen_test.go +++ b/crypto/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package crypto // Code generated by github.com/algorand/msgp DO NOT EDIT. +package crypto + import ( "testing" diff --git a/crypto/secp256k1/dummy.go b/crypto/secp256k1/dummy.go index 479e07dc8e..6164afd5ba 100644 --- a/crypto/secp256k1/dummy.go +++ b/crypto/secp256k1/dummy.go @@ -1,5 +1,4 @@ //go:build dummy -// +build dummy // This file is part of a workaround for `go mod vendor` which won't vendor // C files if there's no Go file in the same directory. diff --git a/crypto/secp256k1/panic_cb.go b/crypto/secp256k1/panic_cb.go index a30b04f51b..77119118a0 100644 --- a/crypto/secp256k1/panic_cb.go +++ b/crypto/secp256k1/panic_cb.go @@ -3,7 +3,6 @@ // the LICENSE file. //go:build !gofuzz && cgo -// +build !gofuzz,cgo package secp256k1 diff --git a/crypto/secp256k1/scalar_mult_cgo.go b/crypto/secp256k1/scalar_mult_cgo.go index d1b4c8b20e..d25046fd53 100644 --- a/crypto/secp256k1/scalar_mult_cgo.go +++ b/crypto/secp256k1/scalar_mult_cgo.go @@ -3,7 +3,6 @@ // the LICENSE file. //go:build !gofuzz && cgo -// +build !gofuzz,cgo package secp256k1 diff --git a/crypto/secp256k1/scalar_mult_nocgo.go b/crypto/secp256k1/scalar_mult_nocgo.go index 22f53ac6ae..956cfdb869 100644 --- a/crypto/secp256k1/scalar_mult_nocgo.go +++ b/crypto/secp256k1/scalar_mult_nocgo.go @@ -3,7 +3,6 @@ // the LICENSE file. //go:build gofuzz || !cgo -// +build gofuzz !cgo package secp256k1 diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go index 7fbce862e1..f2927c3bcd 100644 --- a/crypto/secp256k1/secp256.go +++ b/crypto/secp256k1/secp256.go @@ -3,7 +3,6 @@ // the LICENSE file. //go:build !gofuzz && cgo -// +build !gofuzz,cgo // Package secp256k1 wraps the bitcoin secp256k1 C library. package secp256k1 diff --git a/crypto/stateproof/msgp_gen.go b/crypto/stateproof/msgp_gen.go index 51b3dc3848..6cf9a5308b 100644 --- a/crypto/stateproof/msgp_gen.go +++ b/crypto/stateproof/msgp_gen.go @@ -1,7 +1,7 @@ -package stateproof - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package stateproof + import ( "sort" @@ -122,7 +122,7 @@ func (z *MessageHash) MsgIsZero() bool { return (*z) == (MessageHash{}) } -// MaxSize returns a maximum valid message size for this message type +// MessageHashMaxSize returns a maximum valid message size for this message type func MessageHashMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -466,7 +466,7 @@ func (z *Prover) MsgIsZero() bool { return ((*z).ProverPersistedFields.Data == (MessageHash{})) && ((*z).ProverPersistedFields.Round == 0) && (len((*z).ProverPersistedFields.Participants) == 0) && ((*z).ProverPersistedFields.Parttree == nil) && ((*z).ProverPersistedFields.LnProvenWeight == 0) && ((*z).ProverPersistedFields.ProvenWeight == 0) && ((*z).ProverPersistedFields.StrengthTarget == 0) } -// MaxSize returns a maximum valid message size for this message type +// ProverMaxSize returns a maximum valid message size for this message type func ProverMaxSize() (s int) { s = 1 + 5 // Calculating size of array: z.ProverPersistedFields.Data @@ -817,7 +817,7 @@ func (z *ProverPersistedFields) MsgIsZero() bool { return ((*z).Data == (MessageHash{})) && ((*z).Round == 0) && (len((*z).Participants) == 0) && ((*z).Parttree == nil) && ((*z).LnProvenWeight == 0) && ((*z).ProvenWeight == 0) && ((*z).StrengthTarget == 0) } -// MaxSize returns a maximum valid message size for this message type +// ProverPersistedFieldsMaxSize returns a maximum valid message size for this message type func ProverPersistedFieldsMaxSize() (s int) { s = 1 + 5 // Calculating size of array: z.Data @@ -1118,7 +1118,7 @@ func (z *Reveal) MsgIsZero() bool { return (((*z).SigSlot.Sig.MsgIsZero()) && ((*z).SigSlot.L == 0)) && ((*z).Part.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// RevealMaxSize returns a maximum valid message size for this message type func RevealMaxSize() (s int) { s = 1 + 2 + 1 + 2 + merklesignature.SignatureMaxSize() + 2 + msgp.Uint64Size + 2 + basics.ParticipantMaxSize() return @@ -1504,7 +1504,7 @@ func (z *StateProof) MsgIsZero() bool { return ((*z).SigCommit.MsgIsZero()) && ((*z).SignedWeight == 0) && ((*z).SigProofs.MsgIsZero()) && ((*z).PartProofs.MsgIsZero()) && ((*z).MerkleSignatureSaltVersion == 0) && (len((*z).Reveals) == 0) && (len((*z).PositionsToReveal) == 0) } -// MaxSize returns a maximum valid message size for this message type +// StateProofMaxSize returns a maximum valid message size for this message type func StateProofMaxSize() (s int) { s = 1 + 2 + crypto.GenericDigestMaxSize() + 2 + msgp.Uint64Size + 2 // Using maxtotalbytes for: z.SigProofs @@ -1661,7 +1661,7 @@ func (z *sigslotCommit) MsgIsZero() bool { return ((*z).Sig.MsgIsZero()) && ((*z).L == 0) } -// MaxSize returns a maximum valid message size for this message type +// SigslotCommitMaxSize returns a maximum valid message size for this message type func SigslotCommitMaxSize() (s int) { s = 1 + 2 + merklesignature.SignatureMaxSize() + 2 + msgp.Uint64Size return diff --git a/crypto/stateproof/msgp_gen_test.go b/crypto/stateproof/msgp_gen_test.go index 2812908b34..8d95e59119 100644 --- a/crypto/stateproof/msgp_gen_test.go +++ b/crypto/stateproof/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package stateproof // Code generated by github.com/algorand/msgp DO NOT EDIT. +package stateproof + import ( "testing" diff --git a/daemon/algod/api/spec/v2/msgp_gen.go b/daemon/algod/api/spec/v2/msgp_gen.go index f8afb04767..dd295c435b 100644 --- a/daemon/algod/api/spec/v2/msgp_gen.go +++ b/daemon/algod/api/spec/v2/msgp_gen.go @@ -1,7 +1,7 @@ -package v2 - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package v2 + import ( "github.com/algorand/msgp/msgp" @@ -230,7 +230,7 @@ func (z *AccountApplicationModel) MsgIsZero() bool { return ((*z).AppLocalState == nil) && ((*z).AppParams == nil) } -// MaxSize returns a maximum valid message size for this message type +// AccountApplicationModelMaxSize returns a maximum valid message size for this message type func AccountApplicationModelMaxSize() (s int) { s = 1 + 16 s += basics.AppLocalStateMaxSize() @@ -439,7 +439,7 @@ func (z *AccountAssetModel) MsgIsZero() bool { return ((*z).AssetParams == nil) && ((*z).AssetHolding == nil) } -// MaxSize returns a maximum valid message size for this message type +// AccountAssetModelMaxSize returns a maximum valid message size for this message type func AccountAssetModelMaxSize() (s int) { s = 1 + 13 s += basics.AssetParamsMaxSize() diff --git a/daemon/algod/api/spec/v2/msgp_gen_test.go b/daemon/algod/api/spec/v2/msgp_gen_test.go index 2fc11278d5..127bcc5635 100644 --- a/daemon/algod/api/spec/v2/msgp_gen_test.go +++ b/daemon/algod/api/spec/v2/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package v2 // Code generated by github.com/algorand/msgp DO NOT EDIT. +package v2 + import ( "testing" diff --git a/data/account/msgp_gen.go b/data/account/msgp_gen.go index 36459a83f3..b4217367e4 100644 --- a/data/account/msgp_gen.go +++ b/data/account/msgp_gen.go @@ -1,7 +1,7 @@ -package account - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package account + import ( "github.com/algorand/msgp/msgp" @@ -261,7 +261,7 @@ func (z *ParticipationKeyIdentity) MsgIsZero() bool { return ((*z).Parent.MsgIsZero()) && ((*z).VRFSK.MsgIsZero()) && ((*z).VoteID.MsgIsZero()) && ((*z).FirstValid.MsgIsZero()) && ((*z).LastValid.MsgIsZero()) && ((*z).KeyDilution == 0) } -// MaxSize returns a maximum valid message size for this message type +// ParticipationKeyIdentityMaxSize returns a maximum valid message size for this message type func ParticipationKeyIdentityMaxSize() (s int) { s = 1 + 5 + basics.AddressMaxSize() + 6 + crypto.VrfPrivkeyMaxSize() + 8 + crypto.OneTimeSignatureVerifierMaxSize() + 3 + basics.RoundMaxSize() + 3 + basics.RoundMaxSize() + 3 + msgp.Uint64Size return @@ -348,7 +348,7 @@ func (z StateProofKeys) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// StateProofKeysMaxSize returns a maximum valid message size for this message type func StateProofKeysMaxSize() (s int) { // Calculating size of slice: z s += msgp.ArrayHeaderSize + ((1000) * (merklesignature.KeyRoundPairMaxSize())) diff --git a/data/account/msgp_gen_test.go b/data/account/msgp_gen_test.go index 380e391fc3..43192d8c01 100644 --- a/data/account/msgp_gen_test.go +++ b/data/account/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package account // Code generated by github.com/algorand/msgp DO NOT EDIT. +package account + import ( "testing" diff --git a/data/basics/msgp_gen.go b/data/basics/msgp_gen.go index 9470f94db8..9234d2d789 100644 --- a/data/basics/msgp_gen.go +++ b/data/basics/msgp_gen.go @@ -1,7 +1,7 @@ -package basics - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package basics + import ( "sort" @@ -1501,7 +1501,7 @@ func (z *AccountData) MsgIsZero() bool { return ((*z).Status == 0) && ((*z).MicroAlgos.MsgIsZero()) && ((*z).RewardsBase == 0) && ((*z).RewardedMicroAlgos.MsgIsZero()) && ((*z).VoteID.MsgIsZero()) && ((*z).SelectionID.MsgIsZero()) && ((*z).StateProofID.MsgIsZero()) && ((*z).VoteFirstValid == 0) && ((*z).VoteLastValid == 0) && ((*z).VoteKeyDilution == 0) && ((*z).LastProposed == 0) && ((*z).LastHeartbeat == 0) && (len((*z).AssetParams) == 0) && (len((*z).Assets) == 0) && ((*z).AuthAddr.MsgIsZero()) && ((*z).IncentiveEligible == false) && (len((*z).AppLocalStates) == 0) && (len((*z).AppParams) == 0) && (((*z).TotalAppSchema.NumUint == 0) && ((*z).TotalAppSchema.NumByteSlice == 0)) && ((*z).TotalExtraAppPages == 0) && ((*z).TotalBoxes == 0) && ((*z).TotalBoxBytes == 0) } -// MaxSize returns a maximum valid message size for this message type +// AccountDataMaxSize returns a maximum valid message size for this message type func AccountDataMaxSize() (s int) { s = 3 + 4 + msgp.ByteSize + 5 + MicroAlgosMaxSize() + 6 + msgp.Uint64Size + 4 + MicroAlgosMaxSize() + 5 + crypto.OneTimeSignatureVerifierMaxSize() + 4 + crypto.VRFVerifierMaxSize() + 6 + merklesignature.CommitmentMaxSize() + 8 + msgp.Uint64Size + 8 + msgp.Uint64Size + 7 + msgp.Uint64Size + 4 + msgp.Uint64Size + 4 + msgp.Uint64Size + 5 s += msgp.MapHeaderSize @@ -1563,7 +1563,7 @@ func (z *Address) MsgIsZero() bool { return ((*(crypto.Digest))(z)).MsgIsZero() } -// MaxSize returns a maximum valid message size for this message type +// crypto.DigestMaxSize returns a maximum valid message size for this message type func AddressMaxSize() int { return crypto.DigestMaxSize() } @@ -1622,7 +1622,7 @@ func (z AppIndex) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// AppIndexMaxSize returns a maximum valid message size for this message type func AppIndexMaxSize() (s int) { s = msgp.Uint64Size return @@ -1993,7 +1993,7 @@ func (z *AppLocalState) MsgIsZero() bool { return (((*z).Schema.NumUint == 0) && ((*z).Schema.NumByteSlice == 0)) && (len((*z).KeyValue) == 0) } -// MaxSize returns a maximum valid message size for this message type +// AppLocalStateMaxSize returns a maximum valid message size for this message type func AppLocalStateMaxSize() (s int) { s = 1 + 5 + 1 + 4 + msgp.Uint64Size + 4 + msgp.Uint64Size + 4 s += msgp.MapHeaderSize @@ -2698,7 +2698,7 @@ func (z *AppParams) MsgIsZero() bool { return (len((*z).ApprovalProgram) == 0) && (len((*z).ClearStateProgram) == 0) && (len((*z).GlobalState) == 0) && (((*z).StateSchemas.LocalStateSchema.NumUint == 0) && ((*z).StateSchemas.LocalStateSchema.NumByteSlice == 0)) && (((*z).StateSchemas.GlobalStateSchema.NumUint == 0) && ((*z).StateSchemas.GlobalStateSchema.NumByteSlice == 0)) && ((*z).ExtraProgramPages == 0) && ((*z).Version == 0) && ((*z).SizeSponsor.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// AppParamsMaxSize returns a maximum valid message size for this message type func AppParamsMaxSize() (s int) { s = 1 + 7 + msgp.BytesPrefixSize + bounds.MaxAvailableAppProgramLen + 7 + msgp.BytesPrefixSize + bounds.MaxAvailableAppProgramLen + 3 s += msgp.MapHeaderSize @@ -2847,7 +2847,7 @@ func (z *AssetHolding) MsgIsZero() bool { return ((*z).Amount == 0) && ((*z).Frozen == false) } -// MaxSize returns a maximum valid message size for this message type +// AssetHoldingMaxSize returns a maximum valid message size for this message type func AssetHoldingMaxSize() (s int) { s = 1 + 2 + msgp.Uint64Size + 2 + msgp.BoolSize return @@ -2907,7 +2907,7 @@ func (z AssetIndex) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// AssetIndexMaxSize returns a maximum valid message size for this message type func AssetIndexMaxSize() (s int) { s = msgp.Uint64Size return @@ -3317,7 +3317,7 @@ func (z *AssetParams) MsgIsZero() bool { return ((*z).Total == 0) && ((*z).Decimals == 0) && ((*z).DefaultFrozen == false) && ((*z).UnitName == "") && ((*z).AssetName == "") && ((*z).URL == "") && ((*z).MetadataHash == ([32]byte{})) && ((*z).Manager.MsgIsZero()) && ((*z).Reserve.MsgIsZero()) && ((*z).Freeze.MsgIsZero()) && ((*z).Clawback.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// AssetParamsMaxSize returns a maximum valid message size for this message type func AssetParamsMaxSize() (s int) { s = 1 + 2 + msgp.Uint64Size + 3 + msgp.Uint32Size + 3 + msgp.BoolSize + 3 + msgp.StringPrefixSize + bounds.MaxAssetUnitNameBytes + 3 + msgp.StringPrefixSize + bounds.MaxAssetNameBytes + 3 + msgp.StringPrefixSize + bounds.MaxAssetURLBytes + 3 // Calculating size of array: z.MetadataHash @@ -4604,7 +4604,7 @@ func (z *BalanceRecord) MsgIsZero() bool { return ((*z).Addr.MsgIsZero()) && ((*z).AccountData.Status == 0) && ((*z).AccountData.MicroAlgos.MsgIsZero()) && ((*z).AccountData.RewardsBase == 0) && ((*z).AccountData.RewardedMicroAlgos.MsgIsZero()) && ((*z).AccountData.VoteID.MsgIsZero()) && ((*z).AccountData.SelectionID.MsgIsZero()) && ((*z).AccountData.StateProofID.MsgIsZero()) && ((*z).AccountData.VoteFirstValid == 0) && ((*z).AccountData.VoteLastValid == 0) && ((*z).AccountData.VoteKeyDilution == 0) && ((*z).AccountData.LastProposed == 0) && ((*z).AccountData.LastHeartbeat == 0) && (len((*z).AccountData.AssetParams) == 0) && (len((*z).AccountData.Assets) == 0) && ((*z).AccountData.AuthAddr.MsgIsZero()) && ((*z).AccountData.IncentiveEligible == false) && (len((*z).AccountData.AppLocalStates) == 0) && (len((*z).AccountData.AppParams) == 0) && (((*z).AccountData.TotalAppSchema.NumUint == 0) && ((*z).AccountData.TotalAppSchema.NumByteSlice == 0)) && ((*z).AccountData.TotalExtraAppPages == 0) && ((*z).AccountData.TotalBoxes == 0) && ((*z).AccountData.TotalBoxBytes == 0) } -// MaxSize returns a maximum valid message size for this message type +// BalanceRecordMaxSize returns a maximum valid message size for this message type func BalanceRecordMaxSize() (s int) { s = 3 + 5 + AddressMaxSize() + 4 + msgp.ByteSize + 5 + MicroAlgosMaxSize() + 6 + msgp.Uint64Size + 4 + MicroAlgosMaxSize() + 5 + crypto.OneTimeSignatureVerifierMaxSize() + 4 + crypto.VRFVerifierMaxSize() + 6 + merklesignature.CommitmentMaxSize() + 8 + msgp.Uint64Size + 8 + msgp.Uint64Size + 7 + msgp.Uint64Size + 4 + msgp.Uint64Size + 4 + msgp.Uint64Size + 5 s += msgp.MapHeaderSize @@ -4689,7 +4689,7 @@ func (z CreatableIndex) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// CreatableIndexMaxSize returns a maximum valid message size for this message type func CreatableIndexMaxSize() (s int) { s = msgp.Uint64Size return @@ -4749,7 +4749,7 @@ func (z CreatableType) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// CreatableTypeMaxSize returns a maximum valid message size for this message type func CreatableTypeMaxSize() (s int) { s = msgp.Uint64Size return @@ -4809,7 +4809,7 @@ func (z DeltaAction) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// DeltaActionMaxSize returns a maximum valid message size for this message type func DeltaActionMaxSize() (s int) { s = msgp.Uint64Size return @@ -4952,7 +4952,7 @@ func (z *Participant) MsgIsZero() bool { return ((*z).PK.MsgIsZero()) && ((*z).Weight == 0) } -// MaxSize returns a maximum valid message size for this message type +// ParticipantMaxSize returns a maximum valid message size for this message type func ParticipantMaxSize() (s int) { s = 1 + 2 + merklesignature.VerifierMaxSize() + 2 + msgp.Uint64Size return @@ -5012,7 +5012,7 @@ func (z Round) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// RoundMaxSize returns a maximum valid message size for this message type func RoundMaxSize() (s int) { s = msgp.Uint64Size return @@ -5072,7 +5072,7 @@ func (z RoundInterval) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// RoundIntervalMaxSize returns a maximum valid message size for this message type func RoundIntervalMaxSize() (s int) { s = msgp.Uint64Size return @@ -5178,7 +5178,7 @@ func (z StateDelta) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// StateDeltaMaxSize returns a maximum valid message size for this message type func StateDeltaMaxSize() (s int) { s += msgp.MapHeaderSize // Adding size of map keys for z @@ -5325,7 +5325,7 @@ func (z *StateSchema) MsgIsZero() bool { return ((*z).NumUint == 0) && ((*z).NumByteSlice == 0) } -// MaxSize returns a maximum valid message size for this message type +// StateSchemaMaxSize returns a maximum valid message size for this message type func StateSchemaMaxSize() (s int) { s = 1 + 4 + msgp.Uint64Size + 4 + msgp.Uint64Size return @@ -5768,7 +5768,7 @@ func (z *StateSchemas) MsgIsZero() bool { return (((*z).LocalStateSchema.NumUint == 0) && ((*z).LocalStateSchema.NumByteSlice == 0)) && (((*z).GlobalStateSchema.NumUint == 0) && ((*z).GlobalStateSchema.NumByteSlice == 0)) } -// MaxSize returns a maximum valid message size for this message type +// StateSchemasMaxSize returns a maximum valid message size for this message type func StateSchemasMaxSize() (s int) { s = 1 + 5 + 1 + 4 + msgp.Uint64Size + 4 + msgp.Uint64Size + 5 + 1 + 4 + msgp.Uint64Size + 4 + msgp.Uint64Size return @@ -5828,7 +5828,7 @@ func (z Status) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// StatusMaxSize returns a maximum valid message size for this message type func StatusMaxSize() (s int) { s = msgp.ByteSize return @@ -5934,7 +5934,7 @@ func (z TealKeyValue) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// TealKeyValueMaxSize returns a maximum valid message size for this message type func TealKeyValueMaxSize() (s int) { s += msgp.MapHeaderSize // Adding size of map keys for z @@ -5998,7 +5998,7 @@ func (z TealType) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// TealTypeMaxSize returns a maximum valid message size for this message type func TealTypeMaxSize() (s int) { s = msgp.Uint64Size return @@ -6172,7 +6172,7 @@ func (z *TealValue) MsgIsZero() bool { return ((*z).Type == 0) && ((*z).Bytes == "") && ((*z).Uint == 0) } -// MaxSize returns a maximum valid message size for this message type +// TealValueMaxSize returns a maximum valid message size for this message type func TealValueMaxSize() (s int) { s = 1 + 3 + msgp.Uint64Size + 3 panic("Unable to determine max size: String type z.Bytes is unbounded") @@ -6366,7 +6366,7 @@ func (z *ValueDelta) MsgIsZero() bool { return ((*z).Action == 0) && ((*z).Bytes == "") && ((*z).Uint == 0) } -// MaxSize returns a maximum valid message size for this message type +// ValueDeltaMaxSize returns a maximum valid message size for this message type func ValueDeltaMaxSize() (s int) { s = 1 + 3 + msgp.Uint64Size + 3 + msgp.StringPrefixSize + bounds.MaxAppBytesValueLen + 3 + msgp.Uint64Size return diff --git a/data/basics/msgp_gen_test.go b/data/basics/msgp_gen_test.go index c5e0f3d4a5..91677e8f1f 100644 --- a/data/basics/msgp_gen_test.go +++ b/data/basics/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package basics // Code generated by github.com/algorand/msgp DO NOT EDIT. +package basics + import ( "testing" diff --git a/data/bookkeeping/msgp_gen.go b/data/bookkeeping/msgp_gen.go index 32fe332eae..25745c831a 100644 --- a/data/bookkeeping/msgp_gen.go +++ b/data/bookkeeping/msgp_gen.go @@ -1,7 +1,7 @@ -package bookkeeping - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package bookkeeping + import ( "sort" @@ -1194,7 +1194,7 @@ func (z *Block) MsgIsZero() bool { return ((*z).BlockHeader.Round.MsgIsZero()) && ((*z).BlockHeader.Branch.MsgIsZero()) && ((*z).BlockHeader.Branch512.MsgIsZero()) && ((*z).BlockHeader.Seed.MsgIsZero()) && ((*z).BlockHeader.TxnCommitments.NativeSha512_256Commitment.MsgIsZero()) && ((*z).BlockHeader.TxnCommitments.Sha256Commitment.MsgIsZero()) && ((*z).BlockHeader.TxnCommitments.Sha512Commitment.MsgIsZero()) && ((*z).BlockHeader.TimeStamp == 0) && ((*z).BlockHeader.GenesisID == "") && ((*z).BlockHeader.GenesisHash.MsgIsZero()) && ((*z).BlockHeader.Proposer.MsgIsZero()) && ((*z).BlockHeader.FeesCollected.MsgIsZero()) && ((*z).BlockHeader.Bonus.MsgIsZero()) && ((*z).BlockHeader.ProposerPayout.MsgIsZero()) && ((*z).BlockHeader.RewardsState.FeeSink.MsgIsZero()) && ((*z).BlockHeader.RewardsState.RewardsPool.MsgIsZero()) && ((*z).BlockHeader.RewardsState.RewardsLevel == 0) && ((*z).BlockHeader.RewardsState.RewardsRate == 0) && ((*z).BlockHeader.RewardsState.RewardsResidue == 0) && ((*z).BlockHeader.RewardsState.RewardsRecalculationRound.MsgIsZero()) && ((*z).BlockHeader.UpgradeState.CurrentProtocol.MsgIsZero()) && ((*z).BlockHeader.UpgradeState.NextProtocol.MsgIsZero()) && ((*z).BlockHeader.UpgradeState.NextProtocolApprovals.MsgIsZero()) && ((*z).BlockHeader.UpgradeState.NextProtocolVoteBefore.MsgIsZero()) && ((*z).BlockHeader.UpgradeState.NextProtocolSwitchOn.MsgIsZero()) && ((*z).BlockHeader.UpgradeVote.UpgradePropose.MsgIsZero()) && ((*z).BlockHeader.UpgradeVote.UpgradeDelay.MsgIsZero()) && ((*z).BlockHeader.UpgradeVote.UpgradeApprove == false) && ((*z).BlockHeader.TxnCounter == 0) && (len((*z).BlockHeader.StateProofTracking) == 0) && (len((*z).BlockHeader.ParticipationUpdates.ExpiredParticipationAccounts) == 0) && (len((*z).BlockHeader.ParticipationUpdates.AbsentParticipationAccounts) == 0) && ((*z).Payset.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// BlockMaxSize returns a maximum valid message size for this message type func BlockMaxSize() (s int) { s = 3 + 4 + basics.RoundMaxSize() + 5 + BlockHashMaxSize() + 8 + crypto.Sha512DigestMaxSize() + 5 + committee.SeedMaxSize() + 4 + crypto.DigestMaxSize() + 7 + crypto.DigestMaxSize() + 7 + crypto.Sha512DigestMaxSize() + 3 + msgp.Int64Size + 4 + msgp.StringPrefixSize + bounds.MaxGenesisIDLen + 3 + crypto.DigestMaxSize() + 4 + basics.AddressMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 5 + basics.AddressMaxSize() + 4 + basics.AddressMaxSize() + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 7 + basics.RoundMaxSize() + 6 + protocol.ConsensusVersionMaxSize() + 10 + protocol.ConsensusVersionMaxSize() + 8 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 12 + protocol.ConsensusVersionMaxSize() + 13 + basics.RoundMaxSize() + 11 + msgp.BoolSize + 3 + msgp.Uint64Size + 4 s += msgp.MapHeaderSize @@ -1245,7 +1245,7 @@ func (z *BlockHash) MsgIsZero() bool { return ((*(crypto.Digest))(z)).MsgIsZero() } -// MaxSize returns a maximum valid message size for this message type +// crypto.DigestMaxSize returns a maximum valid message size for this message type func BlockHashMaxSize() int { return crypto.DigestMaxSize() } @@ -2281,7 +2281,7 @@ func (z *BlockHeader) MsgIsZero() bool { return ((*z).Round.MsgIsZero()) && ((*z).Branch.MsgIsZero()) && ((*z).Branch512.MsgIsZero()) && ((*z).Seed.MsgIsZero()) && ((*z).TxnCommitments.NativeSha512_256Commitment.MsgIsZero()) && ((*z).TxnCommitments.Sha256Commitment.MsgIsZero()) && ((*z).TxnCommitments.Sha512Commitment.MsgIsZero()) && ((*z).TimeStamp == 0) && ((*z).GenesisID == "") && ((*z).GenesisHash.MsgIsZero()) && ((*z).Proposer.MsgIsZero()) && ((*z).FeesCollected.MsgIsZero()) && ((*z).Bonus.MsgIsZero()) && ((*z).ProposerPayout.MsgIsZero()) && ((*z).RewardsState.FeeSink.MsgIsZero()) && ((*z).RewardsState.RewardsPool.MsgIsZero()) && ((*z).RewardsState.RewardsLevel == 0) && ((*z).RewardsState.RewardsRate == 0) && ((*z).RewardsState.RewardsResidue == 0) && ((*z).RewardsState.RewardsRecalculationRound.MsgIsZero()) && ((*z).UpgradeState.CurrentProtocol.MsgIsZero()) && ((*z).UpgradeState.NextProtocol.MsgIsZero()) && ((*z).UpgradeState.NextProtocolApprovals.MsgIsZero()) && ((*z).UpgradeState.NextProtocolVoteBefore.MsgIsZero()) && ((*z).UpgradeState.NextProtocolSwitchOn.MsgIsZero()) && ((*z).UpgradeVote.UpgradePropose.MsgIsZero()) && ((*z).UpgradeVote.UpgradeDelay.MsgIsZero()) && ((*z).UpgradeVote.UpgradeApprove == false) && ((*z).TxnCounter == 0) && (len((*z).StateProofTracking) == 0) && (len((*z).ParticipationUpdates.ExpiredParticipationAccounts) == 0) && (len((*z).ParticipationUpdates.AbsentParticipationAccounts) == 0) } -// MaxSize returns a maximum valid message size for this message type +// BlockHeaderMaxSize returns a maximum valid message size for this message type func BlockHeaderMaxSize() (s int) { s = 3 + 4 + basics.RoundMaxSize() + 5 + BlockHashMaxSize() + 8 + crypto.Sha512DigestMaxSize() + 5 + committee.SeedMaxSize() + 4 + crypto.DigestMaxSize() + 7 + crypto.DigestMaxSize() + 7 + crypto.Sha512DigestMaxSize() + 3 + msgp.Int64Size + 4 + msgp.StringPrefixSize + bounds.MaxGenesisIDLen + 3 + crypto.DigestMaxSize() + 4 + basics.AddressMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 5 + basics.AddressMaxSize() + 4 + basics.AddressMaxSize() + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 7 + basics.RoundMaxSize() + 6 + protocol.ConsensusVersionMaxSize() + 10 + protocol.ConsensusVersionMaxSize() + 8 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 11 + basics.RoundMaxSize() + 12 + protocol.ConsensusVersionMaxSize() + 13 + basics.RoundMaxSize() + 11 + msgp.BoolSize + 3 + msgp.Uint64Size + 4 s += msgp.MapHeaderSize @@ -2649,7 +2649,7 @@ func (z *Genesis) MsgIsZero() bool { return ((*z).SchemaID == "") && ((*z).Network.MsgIsZero()) && ((*z).Proto.MsgIsZero()) && (len((*z).Allocation) == 0) && ((*z).RewardsPool == "") && ((*z).FeeSink == "") && ((*z).Timestamp == 0) && ((*z).Comment == "") && ((*z).DevMode == false) } -// MaxSize returns a maximum valid message size for this message type +// GenesisMaxSize returns a maximum valid message size for this message type func GenesisMaxSize() (s int) { s = 1 + 3 panic("Unable to determine max size: String type z.SchemaID is unbounded") @@ -2930,7 +2930,7 @@ func (z *GenesisAccountData) MsgIsZero() bool { return ((*z).Status.MsgIsZero()) && ((*z).MicroAlgos.MsgIsZero()) && ((*z).VoteID.MsgIsZero()) && ((*z).StateProofID.MsgIsZero()) && ((*z).SelectionID.MsgIsZero()) && ((*z).VoteFirstValid.MsgIsZero()) && ((*z).VoteLastValid.MsgIsZero()) && ((*z).VoteKeyDilution == 0) } -// MaxSize returns a maximum valid message size for this message type +// GenesisAccountDataMaxSize returns a maximum valid message size for this message type func GenesisAccountDataMaxSize() (s int) { s = 1 + 4 + basics.StatusMaxSize() + 5 + basics.MicroAlgosMaxSize() + 5 + crypto.OneTimeSignatureVerifierMaxSize() + 6 + merklesignature.CommitmentMaxSize() + 4 + crypto.VRFVerifierMaxSize() + 8 + basics.RoundMaxSize() + 8 + basics.RoundMaxSize() + 7 + msgp.Uint64Size return @@ -3072,7 +3072,7 @@ func (z *GenesisAllocation) MsgIsZero() bool { return ((*z).Address == "") && ((*z).Comment == "") && ((*z).State.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// GenesisAllocationMaxSize returns a maximum valid message size for this message type func GenesisAllocationMaxSize() (s int) { s = 1 + 5 panic("Unable to determine max size: String type z.Address is unbounded") @@ -3284,7 +3284,7 @@ func (z *LightBlockHeader) MsgIsZero() bool { return ((*z).Seed.MsgIsZero()) && ((*z).BlockHash.MsgIsZero()) && ((*z).Round.MsgIsZero()) && ((*z).GenesisHash.MsgIsZero()) && ((*z).Sha256TxnCommitment.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// LightBlockHeaderMaxSize returns a maximum valid message size for this message type func LightBlockHeaderMaxSize() (s int) { s = 1 + 2 + committee.SeedMaxSize() + 2 + BlockHashMaxSize() + 2 + basics.RoundMaxSize() + 3 + crypto.DigestMaxSize() + 3 + crypto.GenericDigestMaxSize() return @@ -3532,7 +3532,7 @@ func (z *ParticipationUpdates) MsgIsZero() bool { return (len((*z).ExpiredParticipationAccounts) == 0) && (len((*z).AbsentParticipationAccounts) == 0) } -// MaxSize returns a maximum valid message size for this message type +// ParticipationUpdatesMaxSize returns a maximum valid message size for this message type func ParticipationUpdatesMaxSize() (s int) { s = 1 + 11 // Calculating size of slice: z.ExpiredParticipationAccounts @@ -3772,7 +3772,7 @@ func (z *RewardsState) MsgIsZero() bool { return ((*z).FeeSink.MsgIsZero()) && ((*z).RewardsPool.MsgIsZero()) && ((*z).RewardsLevel == 0) && ((*z).RewardsRate == 0) && ((*z).RewardsResidue == 0) && ((*z).RewardsRecalculationRound.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// RewardsStateMaxSize returns a maximum valid message size for this message type func RewardsStateMaxSize() (s int) { s = 1 + 5 + basics.AddressMaxSize() + 4 + basics.AddressMaxSize() + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 7 + basics.RoundMaxSize() return @@ -3938,7 +3938,7 @@ func (z *StateProofTrackingData) MsgIsZero() bool { return ((*z).StateProofVotersCommitment.MsgIsZero()) && ((*z).StateProofOnlineTotalWeight.MsgIsZero()) && ((*z).StateProofNextRound.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// StateProofTrackingDataMaxSize returns a maximum valid message size for this message type func StateProofTrackingDataMaxSize() (s int) { s = 1 + 2 + crypto.GenericDigestMaxSize() + 2 + basics.MicroAlgosMaxSize() + 2 + basics.RoundMaxSize() return @@ -4104,7 +4104,7 @@ func (z *TxnCommitments) MsgIsZero() bool { return ((*z).NativeSha512_256Commitment.MsgIsZero()) && ((*z).Sha256Commitment.MsgIsZero()) && ((*z).Sha512Commitment.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// TxnCommitmentsMaxSize returns a maximum valid message size for this message type func TxnCommitmentsMaxSize() (s int) { s = 1 + 4 + crypto.DigestMaxSize() + 7 + crypto.DigestMaxSize() + 7 + crypto.Sha512DigestMaxSize() return @@ -4270,7 +4270,7 @@ func (z *UpgradeVote) MsgIsZero() bool { return ((*z).UpgradePropose.MsgIsZero()) && ((*z).UpgradeDelay.MsgIsZero()) && ((*z).UpgradeApprove == false) } -// MaxSize returns a maximum valid message size for this message type +// UpgradeVoteMaxSize returns a maximum valid message size for this message type func UpgradeVoteMaxSize() (s int) { s = 1 + 12 + protocol.ConsensusVersionMaxSize() + 13 + basics.RoundMaxSize() + 11 + msgp.BoolSize return diff --git a/data/bookkeeping/msgp_gen_test.go b/data/bookkeeping/msgp_gen_test.go index b49bd7240e..7de75b670e 100644 --- a/data/bookkeeping/msgp_gen_test.go +++ b/data/bookkeeping/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package bookkeeping // Code generated by github.com/algorand/msgp DO NOT EDIT. +package bookkeeping + import ( "testing" diff --git a/data/committee/msgp_gen.go b/data/committee/msgp_gen.go index 9af6fdd4d8..3b67d45256 100644 --- a/data/committee/msgp_gen.go +++ b/data/committee/msgp_gen.go @@ -1,7 +1,7 @@ -package committee - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package committee + import ( "github.com/algorand/msgp/msgp" @@ -257,7 +257,7 @@ func (z *Credential) MsgIsZero() bool { return ((*z).Weight == 0) && ((*z).VrfOut.MsgIsZero()) && ((*z).DomainSeparationEnabled == false) && ((*z).Hashable.MsgIsZero()) && ((*z).UnauthenticatedCredential.Proof.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// CredentialMaxSize returns a maximum valid message size for this message type func CredentialMaxSize() (s int) { s = 1 + 3 + msgp.Uint64Size + 2 + crypto.DigestMaxSize() + 3 + msgp.BoolSize + 3 + HashableCredentialMaxSize() + 3 + crypto.VrfProofMaxSize() return @@ -310,7 +310,7 @@ func (z *Seed) MsgIsZero() bool { return (*z) == (Seed{}) } -// MaxSize returns a maximum valid message size for this message type +// SeedMaxSize returns a maximum valid message size for this message type func SeedMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -431,7 +431,7 @@ func (z *UnauthenticatedCredential) MsgIsZero() bool { return ((*z).Proof.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// UnauthenticatedCredentialMaxSize returns a maximum valid message size for this message type func UnauthenticatedCredentialMaxSize() (s int) { s = 1 + 3 + crypto.VrfProofMaxSize() return @@ -597,7 +597,7 @@ func (z *hashableCredential) MsgIsZero() bool { return ((*z).RawOut.MsgIsZero()) && ((*z).Member.MsgIsZero()) && ((*z).Iter == 0) } -// MaxSize returns a maximum valid message size for this message type +// HashableCredentialMaxSize returns a maximum valid message size for this message type func HashableCredentialMaxSize() (s int) { s = 1 + 2 + crypto.VrfOutputMaxSize() + 2 + basics.AddressMaxSize() + 2 + msgp.Uint64Size return diff --git a/data/committee/msgp_gen_test.go b/data/committee/msgp_gen_test.go index fc6b79ce76..aac5f4f6b1 100644 --- a/data/committee/msgp_gen_test.go +++ b/data/committee/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package committee // Code generated by github.com/algorand/msgp DO NOT EDIT. +package committee + import ( "testing" diff --git a/data/hashable/msgp_gen.go b/data/hashable/msgp_gen.go index fc20f28a28..81d05c9737 100644 --- a/data/hashable/msgp_gen.go +++ b/data/hashable/msgp_gen.go @@ -1,7 +1,7 @@ -package hashable - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package hashable + import ( "github.com/algorand/msgp/msgp" ) @@ -132,7 +132,7 @@ func (z *Message) MsgIsZero() bool { return ((*z).Message == "") } -// MaxSize returns a maximum valid message size for this message type +// MessageMaxSize returns a maximum valid message size for this message type func MessageMaxSize() (s int) { s = 1 + 4 panic("Unable to determine max size: String type z.Message is unbounded") diff --git a/data/hashable/msgp_gen_test.go b/data/hashable/msgp_gen_test.go index 50178fac0e..173f9fc349 100644 --- a/data/hashable/msgp_gen_test.go +++ b/data/hashable/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package hashable // Code generated by github.com/algorand/msgp DO NOT EDIT. +package hashable + import ( "testing" diff --git a/data/stateproofmsg/msgp_gen.go b/data/stateproofmsg/msgp_gen.go index ed245dad0d..9f68ebaba9 100644 --- a/data/stateproofmsg/msgp_gen.go +++ b/data/stateproofmsg/msgp_gen.go @@ -1,7 +1,7 @@ -package stateproofmsg - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package stateproofmsg + import ( "github.com/algorand/msgp/msgp" @@ -267,7 +267,7 @@ func (z *Message) MsgIsZero() bool { return (len((*z).BlockHeadersCommitment) == 0) && (len((*z).VotersCommitment) == 0) && ((*z).LnProvenWeight == 0) && ((*z).FirstAttestedRound.MsgIsZero()) && ((*z).LastAttestedRound.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// MessageMaxSize returns a maximum valid message size for this message type func MessageMaxSize() (s int) { s = 1 + 2 + msgp.BytesPrefixSize + crypto.Sha256Size + 2 + msgp.BytesPrefixSize + crypto.SumhashDigestSize + 2 + msgp.Uint64Size + 2 + basics.RoundMaxSize() + 2 + basics.RoundMaxSize() return diff --git a/data/stateproofmsg/msgp_gen_test.go b/data/stateproofmsg/msgp_gen_test.go index c8ce88e556..4d411fa7a3 100644 --- a/data/stateproofmsg/msgp_gen_test.go +++ b/data/stateproofmsg/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package stateproofmsg // Code generated by github.com/algorand/msgp DO NOT EDIT. +package stateproofmsg + import ( "testing" diff --git a/data/transactions/msgp_gen.go b/data/transactions/msgp_gen.go index a0d916fa10..5f6fabcea6 100644 --- a/data/transactions/msgp_gen.go +++ b/data/transactions/msgp_gen.go @@ -1,7 +1,7 @@ -package transactions - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package transactions + import ( "sort" @@ -1230,7 +1230,7 @@ func (z *ApplicationCallTxnFields) MsgIsZero() bool { return ((*z).ApplicationID.MsgIsZero()) && ((*z).OnCompletion == 0) && (len((*z).ApplicationArgs) == 0) && (len((*z).Accounts) == 0) && (len((*z).ForeignAssets) == 0) && (len((*z).ForeignApps) == 0) && (len((*z).Access) == 0) && (len((*z).Boxes) == 0) && ((*z).LocalStateSchema.MsgIsZero()) && ((*z).GlobalStateSchema.MsgIsZero()) && (len((*z).ApprovalProgram) == 0) && (len((*z).ClearStateProgram) == 0) && ((*z).ExtraProgramPages == 0) && ((*z).RejectVersion == 0) } -// MaxSize returns a maximum valid message size for this message type +// ApplicationCallTxnFieldsMaxSize returns a maximum valid message size for this message type func ApplicationCallTxnFieldsMaxSize() (s int) { s = 1 + 5 + basics.AppIndexMaxSize() + 5 + msgp.Uint64Size + 5 // Calculating size of slice: z.ApplicationArgs @@ -1528,7 +1528,7 @@ func (z *ApplyData) MsgIsZero() bool { return ((*z).ClosingAmount.MsgIsZero()) && ((*z).AssetClosingAmount == 0) && ((*z).SenderRewards.MsgIsZero()) && ((*z).ReceiverRewards.MsgIsZero()) && ((*z).CloseRewards.MsgIsZero()) && ((*z).EvalDelta.MsgIsZero()) && ((*z).ConfigAsset.MsgIsZero()) && ((*z).ApplicationID.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// ApplyDataMaxSize returns a maximum valid message size for this message type func ApplyDataMaxSize() (s int) { s = 1 + 3 + basics.MicroAlgosMaxSize() + 4 + msgp.Uint64Size + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + EvalDeltaMaxSize() + 5 + basics.AssetIndexMaxSize() + 5 + basics.AppIndexMaxSize() return @@ -1671,7 +1671,7 @@ func (z *AssetConfigTxnFields) MsgIsZero() bool { return ((*z).ConfigAsset.MsgIsZero()) && ((*z).AssetParams.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// AssetConfigTxnFieldsMaxSize returns a maximum valid message size for this message type func AssetConfigTxnFieldsMaxSize() (s int) { s = 1 + 5 + basics.AssetIndexMaxSize() + 5 + basics.AssetParamsMaxSize() return @@ -1837,7 +1837,7 @@ func (z *AssetFreezeTxnFields) MsgIsZero() bool { return ((*z).FreezeAccount.MsgIsZero()) && ((*z).FreezeAsset.MsgIsZero()) && ((*z).AssetFrozen == false) } -// MaxSize returns a maximum valid message size for this message type +// AssetFreezeTxnFieldsMaxSize returns a maximum valid message size for this message type func AssetFreezeTxnFieldsMaxSize() (s int) { s = 1 + 5 + basics.AddressMaxSize() + 5 + basics.AssetIndexMaxSize() + 5 + msgp.BoolSize return @@ -2049,7 +2049,7 @@ func (z *AssetTransferTxnFields) MsgIsZero() bool { return ((*z).XferAsset.MsgIsZero()) && ((*z).AssetAmount == 0) && ((*z).AssetSender.MsgIsZero()) && ((*z).AssetReceiver.MsgIsZero()) && ((*z).AssetCloseTo.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// AssetTransferTxnFieldsMaxSize returns a maximum valid message size for this message type func AssetTransferTxnFieldsMaxSize() (s int) { s = 1 + 5 + basics.AssetIndexMaxSize() + 5 + msgp.Uint64Size + 5 + basics.AddressMaxSize() + 5 + basics.AddressMaxSize() + 7 + basics.AddressMaxSize() return @@ -2212,7 +2212,7 @@ func (z *BoxRef) MsgIsZero() bool { return ((*z).Index == 0) && (len((*z).Name) == 0) } -// MaxSize returns a maximum valid message size for this message type +// BoxRefMaxSize returns a maximum valid message size for this message type func BoxRefMaxSize() (s int) { s = 1 + 2 + msgp.Uint64Size + 2 + msgp.BytesPrefixSize + bounds.MaxBytesKeyValueLen return @@ -2661,7 +2661,7 @@ func (z *EvalDelta) MsgIsZero() bool { return ((*z).GlobalDelta.MsgIsZero()) && (len((*z).LocalDeltas) == 0) && (len((*z).SharedAccts) == 0) && (len((*z).Logs) == 0) && (len((*z).InnerTxns) == 0) } -// MaxSize returns a maximum valid message size for this message type +// EvalDeltaMaxSize returns a maximum valid message size for this message type func EvalDeltaMaxSize() (s int) { s = 1 + 3 + basics.StateDeltaMaxSize() + 3 s += msgp.MapHeaderSize @@ -3041,7 +3041,7 @@ func (z *Header) MsgIsZero() bool { return ((*z).Sender.MsgIsZero()) && ((*z).Fee.MsgIsZero()) && ((*z).FirstValid.MsgIsZero()) && ((*z).LastValid.MsgIsZero()) && (len((*z).Note) == 0) && ((*z).GenesisID == "") && ((*z).GenesisHash.MsgIsZero()) && ((*z).Group.MsgIsZero()) && ((*z).Lease == ([32]byte{})) && ((*z).RekeyTo.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// HeaderMaxSize returns a maximum valid message size for this message type func HeaderMaxSize() (s int) { s = 1 + 4 + basics.AddressMaxSize() + 4 + basics.MicroAlgosMaxSize() + 3 + basics.RoundMaxSize() + 3 + basics.RoundMaxSize() + 5 + msgp.BytesPrefixSize + bounds.MaxTxnNoteBytes + 4 + msgp.StringPrefixSize + bounds.MaxGenesisIDLen + 3 + crypto.DigestMaxSize() + 4 + crypto.DigestMaxSize() + 3 // Calculating size of array: z.Lease @@ -3256,7 +3256,7 @@ func (z *HeartbeatTxnFields) MsgIsZero() bool { return ((*z).HbAddress.MsgIsZero()) && ((*z).HbProof.MsgIsZero()) && ((*z).HbSeed.MsgIsZero()) && ((*z).HbVoteID.MsgIsZero()) && ((*z).HbKeyDilution == 0) } -// MaxSize returns a maximum valid message size for this message type +// HeartbeatTxnFieldsMaxSize returns a maximum valid message size for this message type func HeartbeatTxnFieldsMaxSize() (s int) { s = 1 + 2 + basics.AddressMaxSize() + 4 + crypto.HeartbeatProofMaxSize() + 3 + committee.SeedMaxSize() + 4 + crypto.OneTimeSignatureVerifierMaxSize() + 3 + msgp.Uint64Size return @@ -3399,7 +3399,7 @@ func (z *HoldingRef) MsgIsZero() bool { return ((*z).Address == 0) && ((*z).Asset == 0) } -// MaxSize returns a maximum valid message size for this message type +// HoldingRefMaxSize returns a maximum valid message size for this message type func HoldingRefMaxSize() (s int) { s = 1 + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size return @@ -3657,7 +3657,7 @@ func (z *KeyregTxnFields) MsgIsZero() bool { return ((*z).VotePK.MsgIsZero()) && ((*z).SelectionPK.MsgIsZero()) && ((*z).StateProofPK.MsgIsZero()) && ((*z).VoteFirst.MsgIsZero()) && ((*z).VoteLast.MsgIsZero()) && ((*z).VoteKeyDilution == 0) && ((*z).Nonparticipation == false) } -// MaxSize returns a maximum valid message size for this message type +// KeyregTxnFieldsMaxSize returns a maximum valid message size for this message type func KeyregTxnFieldsMaxSize() (s int) { s = 1 + 8 + crypto.OneTimeSignatureVerifierMaxSize() + 7 + crypto.VRFVerifierMaxSize() + 8 + merklesignature.CommitmentMaxSize() + 8 + basics.RoundMaxSize() + 8 + basics.RoundMaxSize() + 7 + msgp.Uint64Size + 8 + msgp.BoolSize return @@ -3800,7 +3800,7 @@ func (z *LocalsRef) MsgIsZero() bool { return ((*z).Address == 0) && ((*z).App == 0) } -// MaxSize returns a maximum valid message size for this message type +// LocalsRefMaxSize returns a maximum valid message size for this message type func LocalsRefMaxSize() (s int) { s = 1 + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size return @@ -4104,7 +4104,7 @@ func (z *LogicSig) MsgIsZero() bool { return (len((*z).Logic) == 0) && ((*z).Sig.MsgIsZero()) && ((*z).Msig.MsgIsZero()) && ((*z).LMsig.MsgIsZero()) && (len((*z).Args) == 0) } -// MaxSize returns a maximum valid message size for this message type +// LogicSigMaxSize returns a maximum valid message size for this message type func LogicSigMaxSize() (s int) { s = 1 + 2 + msgp.BytesPrefixSize + bounds.MaxLogicSigMaxSize + 4 + crypto.SignatureMaxSize() + 5 + crypto.MultisigSigMaxSize() + 6 + crypto.MultisigSigMaxSize() + 4 // Calculating size of slice: z.Args @@ -4166,7 +4166,7 @@ func (z OnCompletion) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// OnCompletionMaxSize returns a maximum valid message size for this message type func OnCompletionMaxSize() (s int) { s = msgp.Uint64Size return @@ -4332,7 +4332,7 @@ func (z *PaymentTxnFields) MsgIsZero() bool { return ((*z).Receiver.MsgIsZero()) && ((*z).Amount.MsgIsZero()) && ((*z).CloseRemainderTo.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// PaymentTxnFieldsMaxSize returns a maximum valid message size for this message type func PaymentTxnFieldsMaxSize() (s int) { s = 1 + 4 + basics.AddressMaxSize() + 4 + basics.MicroAlgosMaxSize() + 6 + basics.AddressMaxSize() return @@ -4419,7 +4419,7 @@ func (z Payset) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// PaysetMaxSize returns a maximum valid message size for this message type func PaysetMaxSize() (s int) { // Calculating size of slice: z s += msgp.ArrayHeaderSize + ((100000) * (SignedTxnInBlockMaxSize())) @@ -5145,7 +5145,7 @@ func (z *ResourceRef) MsgIsZero() bool { return ((*z).Address.MsgIsZero()) && ((*z).Asset.MsgIsZero()) && ((*z).App.MsgIsZero()) && (((*z).Holding.Address == 0) && ((*z).Holding.Asset == 0)) && (((*z).Locals.Address == 0) && ((*z).Locals.App == 0)) && (((*z).Box.Index == 0) && (len((*z).Box.Name) == 0)) } -// MaxSize returns a maximum valid message size for this message type +// ResourceRefMaxSize returns a maximum valid message size for this message type func ResourceRefMaxSize() (s int) { s = 1 + 2 + basics.AddressMaxSize() + 2 + basics.AssetIndexMaxSize() + 2 + basics.AppIndexMaxSize() + 2 + 1 + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + 1 + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + 1 + 2 + msgp.Uint64Size + 2 + msgp.BytesPrefixSize + bounds.MaxBytesKeyValueLen return @@ -5357,7 +5357,7 @@ func (z *SignedTxn) MsgIsZero() bool { return ((*z).Sig.MsgIsZero()) && ((*z).Msig.MsgIsZero()) && ((*z).Lsig.MsgIsZero()) && ((*z).Txn.MsgIsZero()) && ((*z).AuthAddr.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// SignedTxnMaxSize returns a maximum valid message size for this message type func SignedTxnMaxSize() (s int) { s = 1 + 4 + crypto.SignatureMaxSize() + 5 + crypto.MultisigSigMaxSize() + 5 + LogicSigMaxSize() + 4 + TransactionMaxSize() + 5 + basics.AddressMaxSize() return @@ -5799,7 +5799,7 @@ func (z *SignedTxnInBlock) MsgIsZero() bool { return ((*z).SignedTxnWithAD.SignedTxn.Sig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Msig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Lsig.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.Txn.MsgIsZero()) && ((*z).SignedTxnWithAD.SignedTxn.AuthAddr.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ClosingAmount.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.AssetClosingAmount == 0) && ((*z).SignedTxnWithAD.ApplyData.SenderRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ReceiverRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.CloseRewards.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.EvalDelta.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ConfigAsset.MsgIsZero()) && ((*z).SignedTxnWithAD.ApplyData.ApplicationID.MsgIsZero()) && ((*z).HasGenesisID == false) && ((*z).HasGenesisHash == false) } -// MaxSize returns a maximum valid message size for this message type +// SignedTxnInBlockMaxSize returns a maximum valid message size for this message type func SignedTxnInBlockMaxSize() (s int) { s = 1 + 4 + crypto.SignatureMaxSize() + 5 + crypto.MultisigSigMaxSize() + 5 + LogicSigMaxSize() + 4 + TransactionMaxSize() + 5 + basics.AddressMaxSize() + 3 + basics.MicroAlgosMaxSize() + 4 + msgp.Uint64Size + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + EvalDeltaMaxSize() + 5 + basics.AssetIndexMaxSize() + 5 + basics.AppIndexMaxSize() + 4 + msgp.BoolSize + 4 + msgp.BoolSize return @@ -6195,7 +6195,7 @@ func (z *SignedTxnWithAD) MsgIsZero() bool { return ((*z).SignedTxn.Sig.MsgIsZero()) && ((*z).SignedTxn.Msig.MsgIsZero()) && ((*z).SignedTxn.Lsig.MsgIsZero()) && ((*z).SignedTxn.Txn.MsgIsZero()) && ((*z).SignedTxn.AuthAddr.MsgIsZero()) && ((*z).ApplyData.ClosingAmount.MsgIsZero()) && ((*z).ApplyData.AssetClosingAmount == 0) && ((*z).ApplyData.SenderRewards.MsgIsZero()) && ((*z).ApplyData.ReceiverRewards.MsgIsZero()) && ((*z).ApplyData.CloseRewards.MsgIsZero()) && ((*z).ApplyData.EvalDelta.MsgIsZero()) && ((*z).ApplyData.ConfigAsset.MsgIsZero()) && ((*z).ApplyData.ApplicationID.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// SignedTxnWithADMaxSize returns a maximum valid message size for this message type func SignedTxnWithADMaxSize() (s int) { s = 1 + 4 + crypto.SignatureMaxSize() + 5 + crypto.MultisigSigMaxSize() + 5 + LogicSigMaxSize() + 4 + TransactionMaxSize() + 5 + basics.AddressMaxSize() + 3 + basics.MicroAlgosMaxSize() + 4 + msgp.Uint64Size + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + basics.MicroAlgosMaxSize() + 3 + EvalDeltaMaxSize() + 5 + basics.AssetIndexMaxSize() + 5 + basics.AppIndexMaxSize() return @@ -6361,7 +6361,7 @@ func (z *StateProofTxnFields) MsgIsZero() bool { return ((*z).StateProofType.MsgIsZero()) && ((*z).StateProof.MsgIsZero()) && ((*z).Message.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// StateProofTxnFieldsMaxSize returns a maximum valid message size for this message type func StateProofTxnFieldsMaxSize() (s int) { s = 1 + 7 + protocol.StateProofTypeMaxSize() + 3 + stateproof.StateProofMaxSize() + 6 + stateproofmsg.MessageMaxSize() return @@ -8212,7 +8212,7 @@ func (z *Transaction) MsgIsZero() bool { return ((*z).Type.MsgIsZero()) && ((*z).Header.Sender.MsgIsZero()) && ((*z).Header.Fee.MsgIsZero()) && ((*z).Header.FirstValid.MsgIsZero()) && ((*z).Header.LastValid.MsgIsZero()) && (len((*z).Header.Note) == 0) && ((*z).Header.GenesisID == "") && ((*z).Header.GenesisHash.MsgIsZero()) && ((*z).Header.Group.MsgIsZero()) && ((*z).Header.Lease == ([32]byte{})) && ((*z).Header.RekeyTo.MsgIsZero()) && ((*z).KeyregTxnFields.VotePK.MsgIsZero()) && ((*z).KeyregTxnFields.SelectionPK.MsgIsZero()) && ((*z).KeyregTxnFields.StateProofPK.MsgIsZero()) && ((*z).KeyregTxnFields.VoteFirst.MsgIsZero()) && ((*z).KeyregTxnFields.VoteLast.MsgIsZero()) && ((*z).KeyregTxnFields.VoteKeyDilution == 0) && ((*z).KeyregTxnFields.Nonparticipation == false) && ((*z).PaymentTxnFields.Receiver.MsgIsZero()) && ((*z).PaymentTxnFields.Amount.MsgIsZero()) && ((*z).PaymentTxnFields.CloseRemainderTo.MsgIsZero()) && ((*z).AssetConfigTxnFields.ConfigAsset.MsgIsZero()) && ((*z).AssetConfigTxnFields.AssetParams.MsgIsZero()) && ((*z).AssetTransferTxnFields.XferAsset.MsgIsZero()) && ((*z).AssetTransferTxnFields.AssetAmount == 0) && ((*z).AssetTransferTxnFields.AssetSender.MsgIsZero()) && ((*z).AssetTransferTxnFields.AssetReceiver.MsgIsZero()) && ((*z).AssetTransferTxnFields.AssetCloseTo.MsgIsZero()) && ((*z).AssetFreezeTxnFields.FreezeAccount.MsgIsZero()) && ((*z).AssetFreezeTxnFields.FreezeAsset.MsgIsZero()) && ((*z).AssetFreezeTxnFields.AssetFrozen == false) && ((*z).ApplicationCallTxnFields.ApplicationID.MsgIsZero()) && ((*z).ApplicationCallTxnFields.OnCompletion == 0) && (len((*z).ApplicationCallTxnFields.ApplicationArgs) == 0) && (len((*z).ApplicationCallTxnFields.Accounts) == 0) && (len((*z).ApplicationCallTxnFields.ForeignAssets) == 0) && (len((*z).ApplicationCallTxnFields.ForeignApps) == 0) && (len((*z).ApplicationCallTxnFields.Access) == 0) && (len((*z).ApplicationCallTxnFields.Boxes) == 0) && ((*z).ApplicationCallTxnFields.LocalStateSchema.MsgIsZero()) && ((*z).ApplicationCallTxnFields.GlobalStateSchema.MsgIsZero()) && (len((*z).ApplicationCallTxnFields.ApprovalProgram) == 0) && (len((*z).ApplicationCallTxnFields.ClearStateProgram) == 0) && ((*z).ApplicationCallTxnFields.ExtraProgramPages == 0) && ((*z).ApplicationCallTxnFields.RejectVersion == 0) && ((*z).StateProofTxnFields.StateProofType.MsgIsZero()) && ((*z).StateProofTxnFields.StateProof.MsgIsZero()) && ((*z).StateProofTxnFields.Message.MsgIsZero()) && ((*z).HeartbeatTxnFields == nil) } -// MaxSize returns a maximum valid message size for this message type +// TransactionMaxSize returns a maximum valid message size for this message type func TransactionMaxSize() (s int) { s = 3 + 5 + protocol.TxTypeMaxSize() + 4 + basics.AddressMaxSize() + 4 + basics.MicroAlgosMaxSize() + 3 + basics.RoundMaxSize() + 3 + basics.RoundMaxSize() + 5 + msgp.BytesPrefixSize + bounds.MaxTxnNoteBytes + 4 + msgp.StringPrefixSize + bounds.MaxGenesisIDLen + 3 + crypto.DigestMaxSize() + 4 + crypto.DigestMaxSize() + 3 // Calculating size of array: z.Header.Lease @@ -8405,7 +8405,7 @@ func (z *TxGroup) MsgIsZero() bool { return (len((*z).TxGroupHashes) == 0) } -// MaxSize returns a maximum valid message size for this message type +// TxGroupMaxSize returns a maximum valid message size for this message type func TxGroupMaxSize() (s int) { s = 1 + 7 // Calculating size of slice: z.TxGroupHashes @@ -8444,7 +8444,7 @@ func (z *Txid) MsgIsZero() bool { return ((*(crypto.Digest))(z)).MsgIsZero() } -// MaxSize returns a maximum valid message size for this message type +// crypto.DigestMaxSize returns a maximum valid message size for this message type func TxidMaxSize() int { return crypto.DigestMaxSize() } diff --git a/data/transactions/msgp_gen_test.go b/data/transactions/msgp_gen_test.go index 8cc316425c..d16eff9a0c 100644 --- a/data/transactions/msgp_gen_test.go +++ b/data/transactions/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package transactions // Code generated by github.com/algorand/msgp DO NOT EDIT. +package transactions + import ( "testing" diff --git a/ledger/encoded/msgp_gen.go b/ledger/encoded/msgp_gen.go index 129a37aa7a..07518c2924 100644 --- a/ledger/encoded/msgp_gen.go +++ b/ledger/encoded/msgp_gen.go @@ -1,7 +1,7 @@ -package encoded - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package encoded + import ( "sort" @@ -199,7 +199,7 @@ func (z *BalanceRecordV5) MsgIsZero() bool { return ((*z).Address.MsgIsZero()) && ((*z).AccountData.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// BalanceRecordV5MaxSize returns a maximum valid message size for this message type func BalanceRecordV5MaxSize() (s int) { s = 1 + 3 + basics.AddressMaxSize() + 3 panic("Unable to determine max size: MaxSize() not implemented for Raw type") @@ -467,7 +467,7 @@ func (z *BalanceRecordV6) MsgIsZero() bool { return ((*z).Address.MsgIsZero()) && ((*z).AccountData.MsgIsZero()) && (len((*z).Resources) == 0) && ((*z).ExpectingMoreEntries == false) } -// MaxSize returns a maximum valid message size for this message type +// BalanceRecordV6MaxSize returns a maximum valid message size for this message type func BalanceRecordV6MaxSize() (s int) { s = 1 + 2 + basics.AddressMaxSize() + 2 panic("Unable to determine max size: MaxSize() not implemented for Raw type") @@ -650,7 +650,7 @@ func (z *KVRecordV6) MsgIsZero() bool { return (len((*z).Key) == 0) && (len((*z).Value) == 0) } -// MaxSize returns a maximum valid message size for this message type +// KVRecordV6MaxSize returns a maximum valid message size for this message type func KVRecordV6MaxSize() (s int) { s = 1 + 2 + msgp.BytesPrefixSize + KVRecordV6MaxKeyLength + 2 + msgp.BytesPrefixSize + KVRecordV6MaxValueLength return @@ -862,7 +862,7 @@ func (z *OnlineAccountRecordV6) MsgIsZero() bool { return ((*z).Address.MsgIsZero()) && ((*z).UpdateRound.MsgIsZero()) && ((*z).NormalizedOnlineBalance == 0) && ((*z).VoteLastValid.MsgIsZero()) && ((*z).Data.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// OnlineAccountRecordV6MaxSize returns a maximum valid message size for this message type func OnlineAccountRecordV6MaxSize() (s int) { s = 1 + 5 + basics.AddressMaxSize() + 4 + basics.RoundMaxSize() + 4 + msgp.Uint64Size + 4 + basics.RoundMaxSize() + 5 panic("Unable to determine max size: MaxSize() not implemented for Raw type") @@ -1005,7 +1005,7 @@ func (z *OnlineRoundParamsRecordV6) MsgIsZero() bool { return ((*z).Round.MsgIsZero()) && ((*z).Data.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// OnlineRoundParamsRecordV6MaxSize returns a maximum valid message size for this message type func OnlineRoundParamsRecordV6MaxSize() (s int) { s = 1 + 4 + basics.RoundMaxSize() + 5 panic("Unable to determine max size: MaxSize() not implemented for Raw type") diff --git a/ledger/encoded/msgp_gen_test.go b/ledger/encoded/msgp_gen_test.go index b905d9616e..0400e1c118 100644 --- a/ledger/encoded/msgp_gen_test.go +++ b/ledger/encoded/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package encoded // Code generated by github.com/algorand/msgp DO NOT EDIT. +package encoded + import ( "testing" diff --git a/ledger/ledgercore/msgp_gen.go b/ledger/ledgercore/msgp_gen.go index 0f89af32aa..6c77736287 100644 --- a/ledger/ledgercore/msgp_gen.go +++ b/ledger/ledgercore/msgp_gen.go @@ -1,7 +1,7 @@ -package ledgercore - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package ledgercore + import ( "github.com/algorand/msgp/msgp" @@ -685,7 +685,7 @@ func (z *AccountTotals) MsgIsZero() bool { return (((*z).Online.Money.MsgIsZero()) && ((*z).Online.RewardUnits == 0)) && (((*z).Offline.Money.MsgIsZero()) && ((*z).Offline.RewardUnits == 0)) && (((*z).NotParticipating.Money.MsgIsZero()) && ((*z).NotParticipating.RewardUnits == 0)) && ((*z).RewardsLevel == 0) } -// MaxSize returns a maximum valid message size for this message type +// AccountTotalsMaxSize returns a maximum valid message size for this message type func AccountTotalsMaxSize() (s int) { s = 1 + 7 + 1 + 4 + basics.MicroAlgosMaxSize() + 4 + msgp.Uint64Size + 8 + 1 + 4 + basics.MicroAlgosMaxSize() + 4 + msgp.Uint64Size + 8 + 1 + 4 + basics.MicroAlgosMaxSize() + 4 + msgp.Uint64Size + 7 + msgp.Uint64Size return @@ -828,7 +828,7 @@ func (z *AlgoCount) MsgIsZero() bool { return ((*z).Money.MsgIsZero()) && ((*z).RewardUnits == 0) } -// MaxSize returns a maximum valid message size for this message type +// AlgoCountMaxSize returns a maximum valid message size for this message type func AlgoCountMaxSize() (s int) { s = 1 + 4 + basics.MicroAlgosMaxSize() + 4 + msgp.Uint64Size return @@ -994,7 +994,7 @@ func (z *OnlineRoundParamsData) MsgIsZero() bool { return ((*z).OnlineSupply == 0) && ((*z).RewardsLevel == 0) && ((*z).CurrentProtocol.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// OnlineRoundParamsDataMaxSize returns a maximum valid message size for this message type func OnlineRoundParamsDataMaxSize() (s int) { s = 1 + 7 + msgp.Uint64Size + 7 + msgp.Uint64Size + 6 + protocol.ConsensusVersionMaxSize() return @@ -1183,7 +1183,7 @@ func (z *StateProofVerificationContext) MsgIsZero() bool { return ((*z).LastAttestedRound.MsgIsZero()) && ((*z).VotersCommitment.MsgIsZero()) && ((*z).OnlineTotalWeight.MsgIsZero()) && ((*z).Version.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// StateProofVerificationContextMaxSize returns a maximum valid message size for this message type func StateProofVerificationContextMaxSize() (s int) { s = 1 + 8 + basics.RoundMaxSize() + 3 + crypto.GenericDigestMaxSize() + 3 + basics.MicroAlgosMaxSize() + 2 + protocol.ConsensusVersionMaxSize() return diff --git a/ledger/ledgercore/msgp_gen_test.go b/ledger/ledgercore/msgp_gen_test.go index 8478b9d8bc..41976ee333 100644 --- a/ledger/ledgercore/msgp_gen_test.go +++ b/ledger/ledgercore/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package ledgercore // Code generated by github.com/algorand/msgp DO NOT EDIT. +package ledgercore + import ( "testing" diff --git a/ledger/msgp_gen.go b/ledger/msgp_gen.go index 415c2bb6ae..d3d6aa5048 100644 --- a/ledger/msgp_gen.go +++ b/ledger/msgp_gen.go @@ -1,7 +1,7 @@ -package ledger - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package ledger + import ( "github.com/algorand/msgp/msgp" @@ -116,7 +116,7 @@ func (z CatchpointCatchupState) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// CatchpointCatchupStateMaxSize returns a maximum valid message size for this message type func CatchpointCatchupStateMaxSize() (s int) { s = msgp.Int32Size return @@ -466,7 +466,7 @@ func (z *CatchpointFileHeader) MsgIsZero() bool { return ((*z).Version == 0) && ((*z).BalancesRound.MsgIsZero()) && ((*z).BlocksRound.MsgIsZero()) && ((*z).Totals.MsgIsZero()) && ((*z).TotalAccounts == 0) && ((*z).TotalChunks == 0) && ((*z).TotalKVs == 0) && ((*z).TotalOnlineAccounts == 0) && ((*z).TotalOnlineRoundParams == 0) && ((*z).Catchpoint == "") && ((*z).BlockHeaderDigest.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// CatchpointFileHeaderMaxSize returns a maximum valid message size for this message type func CatchpointFileHeaderMaxSize() (s int) { s = 1 + 8 + msgp.Uint64Size + 14 + basics.RoundMaxSize() + 12 + basics.RoundMaxSize() + 14 + ledgercore.AccountTotalsMaxSize() + 14 + msgp.Uint64Size + 12 + msgp.Uint64Size + 9 + msgp.Uint64Size + 20 + msgp.Uint64Size + 23 + msgp.Uint64Size + 11 panic("Unable to determine max size: String type z.Catchpoint is unbounded") @@ -638,7 +638,7 @@ func (z *CatchpointSnapshotChunkV5) MsgIsZero() bool { return (len((*z).Balances) == 0) } -// MaxSize returns a maximum valid message size for this message type +// CatchpointSnapshotChunkV5MaxSize returns a maximum valid message size for this message type func CatchpointSnapshotChunkV5MaxSize() (s int) { s = 1 + 3 // Calculating size of slice: z.Balances @@ -1040,7 +1040,7 @@ func (z *CatchpointSnapshotChunkV6) MsgIsZero() bool { return (len((*z).Balances) == 0) && (len((*z).KVs) == 0) && (len((*z).OnlineAccounts) == 0) && (len((*z).OnlineRoundParams) == 0) } -// MaxSize returns a maximum valid message size for this message type +// CatchpointSnapshotChunkV6MaxSize returns a maximum valid message size for this message type func CatchpointSnapshotChunkV6MaxSize() (s int) { s = 1 + 3 // Calculating size of slice: z.Balances @@ -1223,7 +1223,7 @@ func (z *catchpointStateProofVerificationContext) MsgIsZero() bool { return (len((*z).Data) == 0) } -// MaxSize returns a maximum valid message size for this message type +// CatchpointStateProofVerificationContextMaxSize returns a maximum valid message size for this message type func CatchpointStateProofVerificationContextMaxSize() (s int) { s = 1 + 4 // Calculating size of slice: z.Data diff --git a/ledger/msgp_gen_test.go b/ledger/msgp_gen_test.go index 42660acb9b..aac1bef669 100644 --- a/ledger/msgp_gen_test.go +++ b/ledger/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package ledger // Code generated by github.com/algorand/msgp DO NOT EDIT. +package ledger + import ( "testing" diff --git a/ledger/store/trackerdb/generickv/msgp_gen.go b/ledger/store/trackerdb/generickv/msgp_gen.go index c15ead158c..0d3c09ab03 100644 --- a/ledger/store/trackerdb/generickv/msgp_gen.go +++ b/ledger/store/trackerdb/generickv/msgp_gen.go @@ -1,7 +1,7 @@ -package generickv - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package generickv + import ( "github.com/algorand/msgp/msgp" @@ -157,7 +157,7 @@ func (z *creatableEntry) MsgIsZero() bool { return ((*z).Ctype.MsgIsZero()) && (len((*z).CreatorAddr) == 0) } -// MaxSize returns a maximum valid message size for this message type +// CreatableEntryMaxSize returns a maximum valid message size for this message type func CreatableEntryMaxSize() (s int) { s = 1 + 6 + basics.CreatableTypeMaxSize() + 12 panic("Unable to determine max size: Byteslice type z.CreatorAddr is unbounded") diff --git a/ledger/store/trackerdb/generickv/msgp_gen_test.go b/ledger/store/trackerdb/generickv/msgp_gen_test.go index 88d79eec21..70cd6e503a 100644 --- a/ledger/store/trackerdb/generickv/msgp_gen_test.go +++ b/ledger/store/trackerdb/generickv/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package generickv // Code generated by github.com/algorand/msgp DO NOT EDIT. +package generickv + import ( "testing" diff --git a/ledger/store/trackerdb/msgp_gen.go b/ledger/store/trackerdb/msgp_gen.go index 228a718d40..f146d75c49 100644 --- a/ledger/store/trackerdb/msgp_gen.go +++ b/ledger/store/trackerdb/msgp_gen.go @@ -1,7 +1,7 @@ -package trackerdb - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package trackerdb + import ( "github.com/algorand/msgp/msgp" @@ -738,7 +738,7 @@ func (z *BaseAccountData) MsgIsZero() bool { return ((*z).Status.MsgIsZero()) && ((*z).MicroAlgos.MsgIsZero()) && ((*z).RewardsBase == 0) && ((*z).RewardedMicroAlgos.MsgIsZero()) && ((*z).AuthAddr.MsgIsZero()) && ((*z).TotalAppSchemaNumUint == 0) && ((*z).TotalAppSchemaNumByteSlice == 0) && ((*z).TotalExtraAppPages == 0) && ((*z).TotalAssetParams == 0) && ((*z).TotalAssets == 0) && ((*z).TotalAppParams == 0) && ((*z).TotalAppLocalStates == 0) && ((*z).TotalBoxes == 0) && ((*z).TotalBoxBytes == 0) && ((*z).IncentiveEligible == false) && ((*z).LastProposed.MsgIsZero()) && ((*z).LastHeartbeat.MsgIsZero()) && ((*z).BaseVotingData.VoteID.MsgIsZero()) && ((*z).BaseVotingData.SelectionID.MsgIsZero()) && ((*z).BaseVotingData.VoteFirstValid.MsgIsZero()) && ((*z).BaseVotingData.VoteLastValid.MsgIsZero()) && ((*z).BaseVotingData.VoteKeyDilution == 0) && ((*z).BaseVotingData.StateProofID.MsgIsZero()) && ((*z).UpdateRound == 0) } -// MaxSize returns a maximum valid message size for this message type +// BaseAccountDataMaxSize returns a maximum valid message size for this message type func BaseAccountDataMaxSize() (s int) { s = 3 + 2 + basics.StatusMaxSize() + 2 + basics.MicroAlgosMaxSize() + 2 + msgp.Uint64Size + 2 + basics.MicroAlgosMaxSize() + 2 + basics.AddressMaxSize() + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.Uint32Size + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.BoolSize + 2 + basics.RoundMaxSize() + 2 + basics.RoundMaxSize() + 2 + crypto.OneTimeSignatureVerifierMaxSize() + 2 + crypto.VRFVerifierMaxSize() + 2 + basics.RoundMaxSize() + 2 + basics.RoundMaxSize() + 2 + msgp.Uint64Size + 2 + merklesignature.CommitmentMaxSize() + 2 + msgp.Uint64Size return @@ -1088,7 +1088,7 @@ func (z *BaseOnlineAccountData) MsgIsZero() bool { return ((*z).BaseVotingData.VoteID.MsgIsZero()) && ((*z).BaseVotingData.SelectionID.MsgIsZero()) && ((*z).BaseVotingData.VoteFirstValid.MsgIsZero()) && ((*z).BaseVotingData.VoteLastValid.MsgIsZero()) && ((*z).BaseVotingData.VoteKeyDilution == 0) && ((*z).BaseVotingData.StateProofID.MsgIsZero()) && ((*z).LastProposed.MsgIsZero()) && ((*z).LastHeartbeat.MsgIsZero()) && ((*z).IncentiveEligible == false) && ((*z).MicroAlgos.MsgIsZero()) && ((*z).RewardsBase == 0) } -// MaxSize returns a maximum valid message size for this message type +// BaseOnlineAccountDataMaxSize returns a maximum valid message size for this message type func BaseOnlineAccountDataMaxSize() (s int) { s = 1 + 2 + crypto.OneTimeSignatureVerifierMaxSize() + 2 + crypto.VRFVerifierMaxSize() + 2 + basics.RoundMaxSize() + 2 + basics.RoundMaxSize() + 2 + msgp.Uint64Size + 2 + merklesignature.CommitmentMaxSize() + 2 + basics.RoundMaxSize() + 2 + basics.RoundMaxSize() + 2 + msgp.BoolSize + 2 + basics.MicroAlgosMaxSize() + 2 + msgp.Uint64Size return @@ -1323,7 +1323,7 @@ func (z *BaseVotingData) MsgIsZero() bool { return ((*z).VoteID.MsgIsZero()) && ((*z).SelectionID.MsgIsZero()) && ((*z).VoteFirstValid.MsgIsZero()) && ((*z).VoteLastValid.MsgIsZero()) && ((*z).VoteKeyDilution == 0) && ((*z).StateProofID.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// BaseVotingDataMaxSize returns a maximum valid message size for this message type func BaseVotingDataMaxSize() (s int) { s = 1 + 2 + crypto.OneTimeSignatureVerifierMaxSize() + 2 + crypto.VRFVerifierMaxSize() + 2 + basics.RoundMaxSize() + 2 + basics.RoundMaxSize() + 2 + msgp.Uint64Size + 2 + merklesignature.CommitmentMaxSize() return @@ -1673,7 +1673,7 @@ func (z *CatchpointFirstStageInfo) MsgIsZero() bool { return ((*z).Totals.MsgIsZero()) && ((*z).TrieBalancesHash.MsgIsZero()) && ((*z).TotalAccounts == 0) && ((*z).TotalKVs == 0) && ((*z).TotalOnlineAccounts == 0) && ((*z).TotalOnlineRoundParams == 0) && ((*z).TotalChunks == 0) && ((*z).BiggestChunkLen == 0) && ((*z).StateProofVerificationHash.MsgIsZero()) && ((*z).OnlineAccountsHash.MsgIsZero()) && ((*z).OnlineRoundParamsHash.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// CatchpointFirstStageInfoMaxSize returns a maximum valid message size for this message type func CatchpointFirstStageInfoMaxSize() (s int) { s = 1 + 14 + ledgercore.AccountTotalsMaxSize() + 17 + crypto.DigestMaxSize() + 14 + msgp.Uint64Size + 9 + msgp.Uint64Size + 20 + msgp.Uint64Size + 23 + msgp.Uint64Size + 12 + msgp.Uint64Size + 13 + msgp.Uint64Size + 19 + crypto.DigestMaxSize() + 19 + crypto.DigestMaxSize() + 22 + crypto.DigestMaxSize() return @@ -1733,7 +1733,7 @@ func (z ResourceFlags) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// ResourceFlagsMaxSize returns a maximum valid message size for this message type func ResourceFlagsMaxSize() (s int) { s = msgp.Uint8Size return @@ -2522,7 +2522,7 @@ func (z *ResourcesData) MsgIsZero() bool { return ((*z).Total == 0) && ((*z).Decimals == 0) && ((*z).DefaultFrozen == false) && ((*z).UnitName == "") && ((*z).AssetName == "") && ((*z).URL == "") && ((*z).MetadataHash == ([32]byte{})) && ((*z).Manager.MsgIsZero()) && ((*z).Reserve.MsgIsZero()) && ((*z).Freeze.MsgIsZero()) && ((*z).Clawback.MsgIsZero()) && ((*z).Amount == 0) && ((*z).Frozen == false) && ((*z).SchemaNumUint == 0) && ((*z).SchemaNumByteSlice == 0) && ((*z).KeyValue.MsgIsZero()) && (len((*z).ApprovalProgram) == 0) && (len((*z).ClearStateProgram) == 0) && ((*z).GlobalState.MsgIsZero()) && ((*z).LocalStateSchemaNumUint == 0) && ((*z).LocalStateSchemaNumByteSlice == 0) && ((*z).GlobalStateSchemaNumUint == 0) && ((*z).GlobalStateSchemaNumByteSlice == 0) && ((*z).ExtraProgramPages == 0) && ((*z).ResourceFlags == 0) && ((*z).UpdateRound == 0) && ((*z).Version == 0) && ((*z).SizeSponsor.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// ResourcesDataMaxSize returns a maximum valid message size for this message type func ResourcesDataMaxSize() (s int) { s = 3 + 2 + msgp.Uint64Size + 2 + msgp.Uint32Size + 2 + msgp.BoolSize + 2 panic("Unable to determine max size: String type z.UnitName is unbounded") @@ -2840,7 +2840,7 @@ func (z *TxTailRound) MsgIsZero() bool { return (len((*z).TxnIDs) == 0) && (len((*z).LastValid) == 0) && (len((*z).Leases) == 0) && ((*z).Hdr.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// TxTailRoundMaxSize returns a maximum valid message size for this message type func TxTailRoundMaxSize() (s int) { s = 1 + 2 // Calculating size of slice: z.TxnIDs @@ -3007,7 +3007,7 @@ func (z *TxTailRoundLease) MsgIsZero() bool { return ((*z).Sender.MsgIsZero()) && ((*z).Lease == ([32]byte{})) && ((*z).TxnIdx == 0) } -// MaxSize returns a maximum valid message size for this message type +// TxTailRoundLeaseMaxSize returns a maximum valid message size for this message type func TxTailRoundLeaseMaxSize() (s int) { s = 1 + 2 + basics.AddressMaxSize() + 2 // Calculating size of array: z.Lease diff --git a/ledger/store/trackerdb/msgp_gen_test.go b/ledger/store/trackerdb/msgp_gen_test.go index be8a232c32..f6965c5778 100644 --- a/ledger/store/trackerdb/msgp_gen_test.go +++ b/ledger/store/trackerdb/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package trackerdb // Code generated by github.com/algorand/msgp DO NOT EDIT. +package trackerdb + import ( "testing" diff --git a/ledger/testing/randomAccounts_test.go b/ledger/testing/randomAccounts_test.go index bb5d68df91..996a93c9cd 100644 --- a/ledger/testing/randomAccounts_test.go +++ b/ledger/testing/randomAccounts_test.go @@ -39,7 +39,7 @@ func TestAccounts(t *testing.T) { return true } stackTop := stack[len(stack)-1] - if path[len(path)-1].FieldName == "_struct" && stackTop == reflect.TypeOf(struct{}{}) { + if path[len(path)-1].FieldName == "_struct" && stackTop == reflect.TypeFor[struct{}]() { // Ignore the informational _struct field return true } diff --git a/libgoal/lockedFileLinux.go b/libgoal/lockedFileLinux.go index dee4507d50..9e9b2357e1 100644 --- a/libgoal/lockedFileLinux.go +++ b/libgoal/lockedFileLinux.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build linux -// +build linux package libgoal diff --git a/libgoal/lockedFileUnix.go b/libgoal/lockedFileUnix.go index cf37214769..71f82fe3a8 100644 --- a/libgoal/lockedFileUnix.go +++ b/libgoal/lockedFileUnix.go @@ -18,7 +18,6 @@ // in https://github.com/golang/sys/blob/master/unix/syscall_unix.go //go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd netbsd openbsd solaris package libgoal diff --git a/libgoal/lockedFileWindows.go b/libgoal/lockedFileWindows.go index 42000513c5..d71714fc70 100644 --- a/libgoal/lockedFileWindows.go +++ b/libgoal/lockedFileWindows.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build windows -// +build windows package libgoal diff --git a/network/limitlistener/helper_stub_test.go b/network/limitlistener/helper_stub_test.go index a1430427ca..f2d0e32e8f 100644 --- a/network/limitlistener/helper_stub_test.go +++ b/network/limitlistener/helper_stub_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows -// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows package limitlistener_test diff --git a/network/limitlistener/helper_unix_test.go b/network/limitlistener/helper_unix_test.go index 9cae789122..7c941479cf 100644 --- a/network/limitlistener/helper_unix_test.go +++ b/network/limitlistener/helper_unix_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris package limitlistener_test diff --git a/network/messagetracer/graphtrace.go b/network/messagetracer/graphtrace.go index 6b57a70562..0d75632b71 100644 --- a/network/messagetracer/graphtrace.go +++ b/network/messagetracer/graphtrace.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . // //go:build msgtrace -// +build msgtrace package messagetracer diff --git a/network/msgp_gen.go b/network/msgp_gen.go index 3d94f7f478..57cb238120 100644 --- a/network/msgp_gen.go +++ b/network/msgp_gen.go @@ -1,7 +1,7 @@ -package network - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package network + import ( "sort" @@ -166,7 +166,7 @@ func (z disconnectReason) MsgIsZero() bool { return z == "" } -// MaxSize returns a maximum valid message size for this message type +// DisconnectReasonMaxSize returns a maximum valid message size for this message type func DisconnectReasonMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") } @@ -351,7 +351,7 @@ func (z *identityChallenge) MsgIsZero() bool { return ((*z).Key.MsgIsZero()) && ((*z).Challenge == (identityChallengeValue{})) && (len((*z).PublicAddress) == 0) } -// MaxSize returns a maximum valid message size for this message type +// IdentityChallengeMaxSize returns a maximum valid message size for this message type func IdentityChallengeMaxSize() (s int) { s = 1 + 3 + crypto.PublicKeyMaxSize() + 2 // Calculating size of array: z.Challenge @@ -520,7 +520,7 @@ func (z *identityChallengeResponse) MsgIsZero() bool { return ((*z).Key.MsgIsZero()) && ((*z).Challenge == (identityChallengeValue{})) && ((*z).ResponseChallenge == (identityChallengeValue{})) } -// MaxSize returns a maximum valid message size for this message type +// IdentityChallengeResponseMaxSize returns a maximum valid message size for this message type func IdentityChallengeResponseMaxSize() (s int) { s = 1 + 3 + crypto.PublicKeyMaxSize() + 2 // Calculating size of array: z.Challenge @@ -668,7 +668,7 @@ func (z *identityChallengeResponseSigned) MsgIsZero() bool { return ((*z).Msg.MsgIsZero()) && ((*z).Signature.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// IdentityChallengeResponseSignedMaxSize returns a maximum valid message size for this message type func IdentityChallengeResponseSignedMaxSize() (s int) { s = 1 + 4 + IdentityChallengeResponseMaxSize() + 4 + crypto.SignatureMaxSize() return @@ -811,7 +811,7 @@ func (z *identityChallengeSigned) MsgIsZero() bool { return ((*z).Msg.MsgIsZero()) && ((*z).Signature.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// IdentityChallengeSignedMaxSize returns a maximum valid message size for this message type func IdentityChallengeSignedMaxSize() (s int) { s = 1 + 3 + IdentityChallengeMaxSize() + 4 + crypto.SignatureMaxSize() return @@ -864,7 +864,7 @@ func (z *identityChallengeValue) MsgIsZero() bool { return (*z) == (identityChallengeValue{}) } -// MaxSize returns a maximum valid message size for this message type +// IdentityChallengeValueMaxSize returns a maximum valid message size for this message type func IdentityChallengeValueMaxSize() (s int) { // Calculating size of array: z s = msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) @@ -985,7 +985,7 @@ func (z *identityVerificationMessage) MsgIsZero() bool { return ((*z).ResponseChallenge == (identityChallengeValue{})) } -// MaxSize returns a maximum valid message size for this message type +// IdentityVerificationMessageMaxSize returns a maximum valid message size for this message type func IdentityVerificationMessageMaxSize() (s int) { s = 1 + 3 // Calculating size of array: z.ResponseChallenge @@ -1243,7 +1243,7 @@ func (z *identityVerificationMessageSigned) MsgIsZero() bool { return ((*z).Msg.ResponseChallenge == (identityChallengeValue{})) && ((*z).Signature.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// IdentityVerificationMessageSignedMaxSize returns a maximum valid message size for this message type func IdentityVerificationMessageSignedMaxSize() (s int) { s = 1 + 4 + 1 + 3 // Calculating size of array: z.Msg.ResponseChallenge @@ -1383,7 +1383,7 @@ func (z peerMetaHeaders) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// PeerMetaHeadersMaxSize returns a maximum valid message size for this message type func PeerMetaHeadersMaxSize() (s int) { s += msgp.MapHeaderSize // Adding size of map keys for z @@ -1472,7 +1472,7 @@ func (z peerMetaValues) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// PeerMetaValuesMaxSize returns a maximum valid message size for this message type func PeerMetaValuesMaxSize() (s int) { // Calculating size of slice: z s += msgp.ArrayHeaderSize diff --git a/network/msgp_gen_test.go b/network/msgp_gen_test.go index 0144dea16e..3415eb7fbc 100644 --- a/network/msgp_gen_test.go +++ b/network/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package network // Code generated by github.com/algorand/msgp DO NOT EDIT. +package network + import ( "testing" diff --git a/node/msgp_gen.go b/node/msgp_gen.go index 9d79065fe8..5cada2558b 100644 --- a/node/msgp_gen.go +++ b/node/msgp_gen.go @@ -1,7 +1,7 @@ -package node - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package node + import ( "github.com/algorand/msgp/msgp" @@ -165,7 +165,7 @@ func (z *netPrioResponse) MsgIsZero() bool { return ((*z).Nonce == "") } -// MaxSize returns a maximum valid message size for this message type +// NetPrioResponseMaxSize returns a maximum valid message size for this message type func NetPrioResponseMaxSize() (s int) { s = 1 + 6 + msgp.StringPrefixSize + netPrioChallengeSizeBase64Encoded return @@ -507,7 +507,7 @@ func (z *netPrioResponseSigned) MsgIsZero() bool { return ((*z).Response.Nonce == "") && ((*z).Round.MsgIsZero()) && ((*z).Sender.MsgIsZero()) && ((*z).Sig.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// NetPrioResponseSignedMaxSize returns a maximum valid message size for this message type func NetPrioResponseSignedMaxSize() (s int) { s = 1 + 9 + 1 + 6 + msgp.StringPrefixSize + netPrioChallengeSizeBase64Encoded + 6 + basics.RoundMaxSize() + 7 + basics.AddressMaxSize() + 4 + crypto.OneTimeSignatureMaxSize() return diff --git a/node/msgp_gen_test.go b/node/msgp_gen_test.go index 46590cb228..55e3696f00 100644 --- a/node/msgp_gen_test.go +++ b/node/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package node // Code generated by github.com/algorand/msgp DO NOT EDIT. +package node + import ( "testing" diff --git a/nodecontrol/kmdControl_common.go b/nodecontrol/kmdControl_common.go index 86973b9704..19c4ba70c8 100644 --- a/nodecontrol/kmdControl_common.go +++ b/nodecontrol/kmdControl_common.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build !windows -// +build !windows package nodecontrol diff --git a/protocol/msgp_gen.go b/protocol/msgp_gen.go index a6288eac0b..56ec47bd7a 100644 --- a/protocol/msgp_gen.go +++ b/protocol/msgp_gen.go @@ -1,7 +1,7 @@ -package protocol - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package protocol + import ( "github.com/algorand/msgp/msgp" @@ -144,7 +144,7 @@ func (z ConsensusVersion) MsgIsZero() bool { return z == "" } -// MaxSize returns a maximum valid message size for this message type +// ConsensusVersionMaxSize returns a maximum valid message size for this message type func ConsensusVersionMaxSize() (s int) { s = msgp.StringPrefixSize + bounds.MaxConsensusVersionLen return @@ -204,7 +204,7 @@ func (z Error) MsgIsZero() bool { return z == "" } -// MaxSize returns a maximum valid message size for this message type +// ErrorMaxSize returns a maximum valid message size for this message type func ErrorMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") } @@ -263,7 +263,7 @@ func (z HashID) MsgIsZero() bool { return z == "" } -// MaxSize returns a maximum valid message size for this message type +// HashIDMaxSize returns a maximum valid message size for this message type func HashIDMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") } @@ -322,7 +322,7 @@ func (z NetworkID) MsgIsZero() bool { return z == "" } -// MaxSize returns a maximum valid message size for this message type +// NetworkIDMaxSize returns a maximum valid message size for this message type func NetworkIDMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") } @@ -381,7 +381,7 @@ func (z StateProofType) MsgIsZero() bool { return z == 0 } -// MaxSize returns a maximum valid message size for this message type +// StateProofTypeMaxSize returns a maximum valid message size for this message type func StateProofTypeMaxSize() (s int) { s = msgp.Uint64Size return @@ -441,7 +441,7 @@ func (z Tag) MsgIsZero() bool { return z == "" } -// MaxSize returns a maximum valid message size for this message type +// TagMaxSize returns a maximum valid message size for this message type func TagMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") } @@ -510,7 +510,7 @@ func (z TxType) MsgIsZero() bool { return z == "" } -// MaxSize returns a maximum valid message size for this message type +// TxTypeMaxSize returns a maximum valid message size for this message type func TxTypeMaxSize() (s int) { s = msgp.StringPrefixSize + txTypeMaxLen return diff --git a/protocol/msgp_gen_test.go b/protocol/msgp_gen_test.go index e9cbe36b16..72b6f3fb9e 100644 --- a/protocol/msgp_gen_test.go +++ b/protocol/msgp_gen_test.go @@ -1,6 +1,5 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package protocol // Code generated by github.com/algorand/msgp DO NOT EDIT. + +package protocol diff --git a/protocol/test/msgp_gen.go b/protocol/test/msgp_gen.go index b7500acdd9..c15f5a82c2 100644 --- a/protocol/test/msgp_gen.go +++ b/protocol/test/msgp_gen.go @@ -1,7 +1,7 @@ -package test - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package test + import ( "github.com/algorand/msgp/msgp" ) @@ -96,7 +96,7 @@ func (z testSlice) MsgIsZero() bool { return len(z) == 0 } -// MaxSize returns a maximum valid message size for this message type +// TestSliceMaxSize returns a maximum valid message size for this message type func TestSliceMaxSize() (s int) { // Calculating size of slice: z s += msgp.ArrayHeaderSize + ((16) * (msgp.Uint64Size)) diff --git a/protocol/test/msgp_gen_test.go b/protocol/test/msgp_gen_test.go index 7ee90531d1..3e34169266 100644 --- a/protocol/test/msgp_gen_test.go +++ b/protocol/test/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package test // Code generated by github.com/algorand/msgp DO NOT EDIT. +package test + import ( "testing" diff --git a/rpcs/msgp_gen.go b/rpcs/msgp_gen.go index 4e091781cd..848d0a22fb 100644 --- a/rpcs/msgp_gen.go +++ b/rpcs/msgp_gen.go @@ -1,7 +1,7 @@ -package rpcs - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package rpcs + import ( "github.com/algorand/msgp/msgp" @@ -140,7 +140,7 @@ func (z *EncodedBlockCert) MsgIsZero() bool { return ((*z).Block.MsgIsZero()) && ((*z).Certificate.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// EncodedBlockCertMaxSize returns a maximum valid message size for this message type func EncodedBlockCertMaxSize() (s int) { s = 1 + 6 + bookkeeping.BlockMaxSize() + 5 + agreement.CertificateMaxSize() return diff --git a/rpcs/msgp_gen_test.go b/rpcs/msgp_gen_test.go index d88b73039b..5d2ec6fc7a 100644 --- a/rpcs/msgp_gen_test.go +++ b/rpcs/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package rpcs // Code generated by github.com/algorand/msgp DO NOT EDIT. +package rpcs + import ( "testing" diff --git a/stateproof/msgp_gen.go b/stateproof/msgp_gen.go index f7a04efecd..ec0afd18eb 100644 --- a/stateproof/msgp_gen.go +++ b/stateproof/msgp_gen.go @@ -1,7 +1,7 @@ -package stateproof - // Code generated by github.com/algorand/msgp DO NOT EDIT. +package stateproof + import ( "sort" @@ -196,7 +196,7 @@ func (z *sigFromAddr) MsgIsZero() bool { return ((*z).SignerAddress.MsgIsZero()) && ((*z).Round.MsgIsZero()) && ((*z).Sig.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// SigFromAddrMaxSize returns a maximum valid message size for this message type func SigFromAddrMaxSize() (s int) { s = 1 + 2 + basics.AddressMaxSize() + 2 + basics.RoundMaxSize() + 2 + merklesignature.SignatureMaxSize() return @@ -496,7 +496,7 @@ func (z *spProver) MsgIsZero() bool { return ((*z).Prover == nil) && (len((*z).AddrToPos) == 0) && ((*z).VotersHdr.MsgIsZero()) && ((*z).Message.MsgIsZero()) } -// MaxSize returns a maximum valid message size for this message type +// SpProverMaxSize returns a maximum valid message size for this message type func SpProverMaxSize() (s int) { s = 1 + 4 s += stateproof.ProverMaxSize() diff --git a/stateproof/msgp_gen_test.go b/stateproof/msgp_gen_test.go index 0a2c025304..f651ef97bb 100644 --- a/stateproof/msgp_gen_test.go +++ b/stateproof/msgp_gen_test.go @@ -1,10 +1,9 @@ //go:build !skip_msgp_testing -// +build !skip_msgp_testing - -package stateproof // Code generated by github.com/algorand/msgp DO NOT EDIT. +package stateproof + import ( "testing" diff --git a/test/framework/fixtures/goalFixture.go b/test/framework/fixtures/goalFixture.go index 5c5c3fa6ce..17c8782464 100644 --- a/test/framework/fixtures/goalFixture.go +++ b/test/framework/fixtures/goalFixture.go @@ -206,10 +206,10 @@ func (f *GoalFixture) ClerkSendNoteb64(from, to string, amount, fee int64, noteb func parseClerkSendResponse(ret string) (txID string, err error) { if strings.HasPrefix(ret, "Sent ") { - txIndex := strings.Index(ret, "ID: ") - if txIndex > 0 { + _, after, ok := strings.Cut(ret, "ID: ") + if ok { // Extract "tx-" string - txID = ret[txIndex+4:] + txID = after txID = txID[:52] // 52 is the len of txid return } diff --git a/tools/network/dnssec/config_unix.go b/tools/network/dnssec/config_unix.go index fb72bde3d5..6157ab8193 100644 --- a/tools/network/dnssec/config_unix.go +++ b/tools/network/dnssec/config_unix.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build !windows -// +build !windows package dnssec diff --git a/tools/network/dnssec/config_unix_test.go b/tools/network/dnssec/config_unix_test.go index b689ff2236..9d9b82f9e5 100644 --- a/tools/network/dnssec/config_unix_test.go +++ b/tools/network/dnssec/config_unix_test.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build !windows -// +build !windows package dnssec diff --git a/tools/network/dnssec/config_windows.go b/tools/network/dnssec/config_windows.go index b1e303d6e3..8e4457b5aa 100644 --- a/tools/network/dnssec/config_windows.go +++ b/tools/network/dnssec/config_windows.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build windows -// +build windows package dnssec diff --git a/util/process_common.go b/util/process_common.go index 6b58da56f1..05c7cf6c90 100644 --- a/util/process_common.go +++ b/util/process_common.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build !windows -// +build !windows package util diff --git a/util/process_windows.go b/util/process_windows.go index a134e38e93..721beb51bc 100644 --- a/util/process_windows.go +++ b/util/process_windows.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build windows -// +build windows package util diff --git a/util/sleep.go b/util/sleep.go index 9059025f04..3f1e189efa 100644 --- a/util/sleep.go +++ b/util/sleep.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build !linux -// +build !linux package util diff --git a/util/sleep_linux_32.go b/util/sleep_linux_32.go index cd8156371e..1ee2140132 100644 --- a/util/sleep_linux_32.go +++ b/util/sleep_linux_32.go @@ -15,8 +15,6 @@ // along with go-algorand. If not, see . //go:build linux && (arm || 386) -// +build linux -// +build arm 386 package util diff --git a/util/sleep_linux_64.go b/util/sleep_linux_64.go index 6a2c90fec8..7811275f0f 100644 --- a/util/sleep_linux_64.go +++ b/util/sleep_linux_64.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build linux && !(arm || 386) -// +build linux,!arm,!386 package util diff --git a/util/tcpinfo_noop.go b/util/tcpinfo_noop.go index 6576a7f20f..4ca0e1b961 100644 --- a/util/tcpinfo_noop.go +++ b/util/tcpinfo_noop.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build !linux && !darwin -// +build !linux,!darwin package util diff --git a/util/util.go b/util/util.go index 74c8d2e219..f0c64bd40d 100644 --- a/util/util.go +++ b/util/util.go @@ -15,7 +15,6 @@ // along with go-algorand. If not, see . //go:build !windows -// +build !windows package util