-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(prospective-parachains): Implement FragmentChain
#4337
base: feat/parachain
Are you sure you want to change the base?
Conversation
- Added: Candidate Entry - (inclusion_emulator): Added ProspectiveCandidate, Modification error and Fragment Validity error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some types, nits & questions
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a lot of unused/unnecessary methods. Can you please remove unused/unnecessary methods?
Also if you need some logic only in test please consider creating test helper function.
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
dot/parachain/prospective-parachains/fragment-chain/fragment_chain.go
Outdated
Show resolved
Hide resolved
…ssamer into eclesio/fragment-chain-impl
…ssamer into eclesio/fragment-chain-impl
@@ -17,3 +22,90 @@ type AsyncBackingParams struct { | |||
// When async backing is disabled, the only valid value is 0. | |||
AllowedAncestryLen uint32 `scale:"2"` | |||
} | |||
|
|||
// InboundHrmpLimitations constraints on inbound HRMP channels. | |||
type InboundHrmpLimitations struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we use this and the below code in any subsystem other than the prospective parachain subsystem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we only use in prospective-parachains pkg, however since this types are a representation of what the runtime uses to validate the constraints I think placing them here is the better approach, given that they are in the same level as CandidateHash
, PersistedValidationData
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this package, we keep all the types that are used in multiple subsystems.
CandidateHashm and PersistedValidationData are the types we use in multiple subsystems.
As I can see In Rust implementation, the InboundHrmpLimitations
type is only being used in prospective parachain.
Please move this to prospective parachain package
@@ -17,3 +22,90 @@ type AsyncBackingParams struct { | |||
// When async backing is disabled, the only valid value is 0. | |||
AllowedAncestryLen uint32 `scale:"2"` | |||
} | |||
|
|||
// InboundHrmpLimitations constraints on inbound HRMP channels. | |||
type InboundHrmpLimitations struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this package, we keep all the types that are used in multiple subsystems.
CandidateHashm and PersistedValidationData are the types we use in multiple subsystems.
As I can see In Rust implementation, the InboundHrmpLimitations
type is only being used in prospective parachain.
Please move this to prospective parachain package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes.
You can merge after addressing the comments.
|
||
// UpgradeRestriction a possible restriction that prevents a parachain | ||
// from performing an upgrade | ||
type UpgradeRestriction struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write the unit test to ensure we are getting the correct encoding/decoding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will address that in another PR under issue #4416, which means that this PR is blocked by that issue
Changes
prospective-parachains
subsystems in order to keep the best backable chain of parachain blocksTests
Tests coverage from Polkadot-SDK
go test -timeout 10m github.com/ChainSafe/gossamer/dot/parachain/prospective-parachains/fragment-chain
Issues