Skip to content
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(dot/parachain/backing): handle statement message coming from overseer #3532

Merged
merged 62 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
eaede54
candidate backing skeleton
axaysagathiya Sep 29, 2023
ac70372
add types
axaysagathiya Sep 29, 2023
5f7cf18
lint
axaysagathiya Sep 29, 2023
c25dc7e
register subsystem
axaysagathiya Oct 2, 2023
d8fc37e
correct the channel direction
axaysagathiya Oct 2, 2023
8f10724
tag issues with todo
axaysagathiya Oct 2, 2023
bab70bc
add license
axaysagathiya Oct 2, 2023
6a2c20c
WIP
axaysagathiya Oct 3, 2023
b15e612
Merge branch 'feat/parachain'
axaysagathiya Oct 3, 2023
9ecf2b6
handle statement message
axaysagathiya Oct 3, 2023
f4cbfc7
handle statement
axaysagathiya Oct 11, 2023
b8395cd
create func to handle data received from channel
axaysagathiya Oct 11, 2023
b08bffd
implement import statement function
axaysagathiya Oct 14, 2023
491942d
implement post import statement actions
axaysagathiya Oct 17, 2023
95f9572
address reviews
axaysagathiya Oct 17, 2023
47f9d62
move subsystem types to separate file and add comments
axaysagathiya Oct 19, 2023
34a70dc
link issues with todo
axaysagathiya Oct 19, 2023
d4c884c
implement todos
axaysagathiya Oct 30, 2023
e9d4593
Merge branch 'feat/parachain'
axaysagathiya Oct 30, 2023
914b0b6
lint
axaysagathiya Oct 31, 2023
f4e0d22
test statement message coming from overseer (WIP)
axaysagathiya Nov 6, 2023
981b49d
reviews
axaysagathiya Nov 9, 2023
0ea3806
reviews
axaysagathiya Nov 21, 2023
dbc18dc
implement enum using interface
axaysagathiya Nov 21, 2023
8b5d176
test import statement
axaysagathiya Nov 28, 2023
e687e3b
unit test for import statement func
axaysagathiya Nov 28, 2023
f3678d1
test post import statement (WIP)
axaysagathiya Nov 29, 2023
5549e9f
implement misbehaviour enum using interface
axaysagathiya Nov 29, 2023
4477a3a
test post import statement
axaysagathiya Dec 3, 2023
5ddbba7
improve kickOffValidationWork
axaysagathiya Dec 5, 2023
9dc985a
add underscore in description of test cases
axaysagathiya Dec 6, 2023
0d2d42f
implement ExecutorParams varying datatype slice
axaysagathiya Dec 9, 2023
a693b3b
correction
axaysagathiya Dec 11, 2023
ffa5cf1
unit test for validateAndMakeAvailable func
axaysagathiya Dec 13, 2023
b1c2f6c
test func to handle statement message (WIP)
axaysagathiya Dec 16, 2023
08529db
unit test for a func to handle statement message
axaysagathiya Dec 17, 2023
f69ad4e
lint
axaysagathiya Dec 17, 2023
7bfe209
Merge branch 'feat/parachain' into issue-3507
axaysagathiya Dec 17, 2023
b800f57
conflict resolve
axaysagathiya Dec 17, 2023
c99d8a2
lint
axaysagathiya Dec 17, 2023
0929708
improve TestImportStatement
axaysagathiya Jan 1, 2024
47d3282
improve TestPostImportStatement
axaysagathiya Jan 1, 2024
293c78c
improve TestHandleStatementMessage
axaysagathiya Jan 1, 2024
27685d5
address PR review (WIP)
axaysagathiya Jan 4, 2024
ee90c82
add license
axaysagathiya Jan 5, 2024
2cb343c
address PR review (WIP)
axaysagathiya Jan 5, 2024
09e3a14
address PR review (WIP)
axaysagathiya Jan 5, 2024
e8abb02
remove ProspectiveParachainsMode type
axaysagathiya Jan 5, 2024
af2ac15
unexport types
axaysagathiya Jan 12, 2024
55ff42e
Merge branch 'feat/parachain' into issue-3507
axaysagathiya Jan 12, 2024
ff2ebcd
clean up
axaysagathiya Jan 12, 2024
ba307cb
unexport types
axaysagathiya Jan 12, 2024
885c658
unexport types
axaysagathiya Jan 14, 2024
caa9aab
lint
axaysagathiya Jan 14, 2024
eb95341
add nil check
axaysagathiya Jan 15, 2024
64e60b5
chore(lib/babe/inherents): remove duplicate types (#3668)
axaysagathiya Jan 15, 2024
41658a5
some documentation and some moving around
kishansagathiya Jan 15, 2024
84168e9
reuse existing overseer messages and other moving around
kishansagathiya Jan 15, 2024
caf6514
Merge branch 'issue-3507' of github.com:ChainSafe/gossamer into issue…
kishansagathiya Jan 15, 2024
9a89327
few more changes
kishansagathiya Jan 16, 2024
f50b912
make license
kishansagathiya Jan 16, 2024
76c51da
improve overseer message types and error handling
axaysagathiya Jan 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions dot/parachain/availability-store/availability_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,10 @@ func uint32ToBytes(value uint32) []byte {

// Run runs the availability store subsystem
func (av *AvailabilityStoreSubsystem) Run(ctx context.Context, OverseerToSubsystem chan any,
SubsystemToOverseer chan any) error {
SubsystemToOverseer chan any) {

av.wg.Add(1)
go av.processMessages()

return nil
}

// Name returns the name of the availability store subsystem
Expand Down Expand Up @@ -361,7 +359,7 @@ func (av *AvailabilityStoreSubsystem) handleStoreChunk(msg StoreChunk) error {
}

func (av *AvailabilityStoreSubsystem) handleStoreAvailableData(msg StoreAvailableData) error {
err := av.availabilityStore.storeAvailableData(msg.CandidateHash, msg.AvailableData)
err := av.availabilityStore.storeAvailableData(msg.CandidateHash.Value, msg.AvailableData)
if err != nil {
msg.Sender <- err
return fmt.Errorf("store available data: %w", err)
Expand Down
8 changes: 5 additions & 3 deletions dot/parachain/availability-store/availability_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,12 @@ func TestAvailabilityStore_handleStoreAvailableData(t *testing.T) {
asSub := AvailabilityStoreSubsystem{
availabilityStore: *as,
}
msgSenderChan := make(chan any)
msgSenderChan := make(chan error)
msg := StoreAvailableData{
CandidateHash: common.Hash{0x01},
NValidators: 0,
CandidateHash: parachaintypes.CandidateHash{
Value: common.Hash{0x01},
},
NumValidators: 0,
AvailableData: AvailableData{},
ExpectedErasureRoot: common.Hash{},
Sender: msgSenderChan,
Expand Down
16 changes: 11 additions & 5 deletions dot/parachain/availability-store/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,19 @@ type StoreChunk struct {
Sender chan any
}

// StoreAvailableData store an `AvailableData` in the AV store
// StoreAvailableData computes and checks the erasure root of `AvailableData`
// before storing its chunks in the AV store.
type StoreAvailableData struct {
CandidateHash common.Hash
NValidators uint32
AvailableData AvailableData
// A hash of the candidate this `ASMStoreAvailableData` belongs to.
CandidateHash parachaintypes.CandidateHash
// The number of validators in the session.
NumValidators uint32
// The `AvailableData` itself.
AvailableData AvailableData
// Erasure root we expect to get after chunking.
ExpectedErasureRoot common.Hash
Sender chan any
// channel to send result to.
Sender chan error
}

// AvailableData is the data we keep available for each candidate included in the relay chain
Expand Down
Loading
Loading