Skip to content

Commit

Permalink
chore: remove unneeded scale tags
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior committed Dec 18, 2024
1 parent 4db6fcb commit ee0d791
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
52 changes: 26 additions & 26 deletions dot/parachain/types/async_backing.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,69 +24,69 @@ type InboundHrmpLimitations struct {
//
// It's only expected to contain block numbers at which messages were
// previously sent to a para, excluding most recent head.
ValidWatermarks []BlockNumber `scale:"1"`
ValidWatermarks []BlockNumber
}

// OutboundHrmpChannelLimitations constraints on outbound HRMP channels.
type OutboundHrmpChannelLimitations struct {
// The maximum bytes that can be written to the channel.
BytesRemaining uint32 `scale:"1"`
BytesRemaining uint32
// The maximum messages that can be written to the channel.
MessagesRemaining uint32 `scale:"2"`
MessagesRemaining uint32
}

// Constraints on the actions that can be taken by a new parachain block. These
// limitations are implicitly associated with some particular parachain, which should
// be apparent from usage.
type Constraints struct {
// The minimum relay-parent number accepted under these constraints.
MinRelayParentNumber BlockNumber `scale:"1"`
MinRelayParentNumber BlockNumber
// The maximum Proof-of-Validity size allowed, in bytes.
MaxPoVSize uint32 `scale:"2"`
MaxPoVSize uint32
// The maximum new validation code size allowed, in bytes.
MaxCodeSize uint32 `scale:"3"`
MaxCodeSize uint32
// The amount of UMP messages remaining.
UmpRemaining uint32 `scale:"4"`
UmpRemaining uint32
// The amount of UMP bytes remaining.
UmpRemainingBytes uint32 `scale:"5"`
UmpRemainingBytes uint32
// The maximum number of UMP messages allowed per candidate.
MaxUmpNumPerCandidate uint32 `scale:"6"`
MaxUmpNumPerCandidate uint32
// Remaining DMP queue. Only includes sent-at block numbers.
DmpRemainingMessages []uint32 `scale:"7"`
DmpRemainingMessages []uint32
// The limitations of all registered inbound HRMP channels.
HrmpInbound InboundHrmpLimitations `scale:"8"`
HrmpInbound InboundHrmpLimitations
// The limitations of all registered outbound HRMP channels.
HrmpChannelsOut map[ParaID]OutboundHrmpChannelLimitations `scale:"9"`
HrmpChannelsOut map[ParaID]OutboundHrmpChannelLimitations
// The maximum number of HRMP messages allowed per candidate.
MaxHrmpNumPerCandidate uint32 `scale:"10"`
MaxHrmpNumPerCandidate uint32
// The required parent head-data of the parachain.
RequiredParent HeadData `scale:"11"`
RequiredParent HeadData
// The expected validation-code-hash of this parachain.
ValidationCodeHash ValidationCodeHash `scale:"12"`
ValidationCodeHash ValidationCodeHash
// The code upgrade restriction signal as-of this parachain.
UpgradeRestriction *UpgradeRestriction `scale:"13"`
UpgradeRestriction *UpgradeRestriction
// The future validation code hash, if any, and at what relay-parent
// number the upgrade would be minimally applied.
FutureValidationCode *FutureValidationCode `scale:"15"`
FutureValidationCode *FutureValidationCode
}

// FutureValidationCode represents a tuple of BlockNumber and ValidationCodeHash
type FutureValidationCode struct {
BlockNumber BlockNumber `scale:"1"`
ValidationCodeHash ValidationCodeHash `scale:"2"`
BlockNumber BlockNumber
ValidationCodeHash ValidationCodeHash
}

type CandidatePendingAvailability struct {
CandidateHash CandidateHash `scale:"1"`
Descriptor CandidateDescriptorV2 `scale:"2"`
Commitments CandidateCommitments `scale:"3"`
RelayParentNumber BlockNumber `scale:"4"`
MaxPoVSize uint32 `scale:"5"`
CandidateHash CandidateHash
Descriptor CandidateDescriptorV2
Commitments CandidateCommitments
RelayParentNumber BlockNumber
MaxPoVSize uint32
}

// BackingState holds the state of the backing system per-parachain, including
// state-machine constraints and candidates pending availability
type BackingState struct {
Constraints Constraints `scale:"1"`
PendingAvailability []CandidatePendingAvailability `scale:"2"`
Constraints Constraints
PendingAvailability []CandidatePendingAvailability
}
24 changes: 12 additions & 12 deletions dot/parachain/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,35 +157,35 @@ func (cd CandidateDescriptor) CheckCollatorSignature() error {

type CandidateDescriptorV2 struct {
// The ID of the para this is a candidate for.
ParaID ParaID `scale:"1"`
ParaID ParaID
// RelayParent is the hash of the relay-chain block this should be executed in
// the context of.
RelayParent common.Hash `scale:"2"`
RelayParent common.Hash
// Version field. The raw value here is not exposed, instead it is used
// to determine the `CandidateDescriptorVersion`, see `fn version()`.
// For the current version this field is set to `0` and will be incremented
// by next versions.
Version uint8 `scale:"3"`
Version uint8
// The core index where the candidate is backed.
CoreIndex uint16 `scale:"4"`
CoreIndex uint16
// The session index of the candidate relay parent.
SessionIndex SessionIndex `scale:"5"`
SessionIndex SessionIndex
// Reserved bytes.
Reserved1 [25]uint8 `scale:"6"`
Reserved1 [25]uint8
// PersistedValidationDataHash is the blake2-256 hash of the persisted validation data. This is extra data derived from
// relay-chain state which may vary based on bitfields included before the candidate.
// Thus, it cannot be derived entirely from the relay-parent.
PersistedValidationDataHash common.Hash `scale:"7"`
PersistedValidationDataHash common.Hash
// PovHash is the hash of the `pov-block`.
PovHash common.Hash `scale:"8"`
PovHash common.Hash
// ErasureRoot is the root of a block's erasure encoding Merkle tree.
ErasureRoot common.Hash `scale:"9"`
ErasureRoot common.Hash
// Reserved bytes.
Reserved2 [64]uint8 `scale:"10"`
Reserved2 [64]uint8
// ParaHead is the hash of the para header that is being generated by this candidate.
ParaHead common.Hash `scale:"11"`
ParaHead common.Hash
// ValidationCodeHash is the blake2-256 hash of the validation code bytes.
ValidationCodeHash ValidationCodeHash `scale:"12"`
ValidationCodeHash ValidationCodeHash
}

// OccupiedCore Information about a core which is currently occupied.
Expand Down

0 comments on commit ee0d791

Please sign in to comment.