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): implement a func to get attested candidate from statement table #3939

Conversation

axaysagathiya
Copy link
Contributor

@axaysagathiya axaysagathiya commented May 6, 2024

Description

  • The statement table stores statements about candidates(parachain blocks) issued by authorities(parachain validators)
  • to call methods of statement table, we have an interface with a few methods, Which I am implementing one by one.
  • to know more about the statement table, read the description of issue feat(dot/parachain/backing): Implement Statement Table #3471
    • also, you can see it has a bunch of sub-issues, and this PR addresses one of them.

This PR implements a method for getting an attested candidate from the statement table for the candidate hash.

Changes

  • Added extra argument to interface method to get an attested candidate
  • Implemented the same method of an interface
  • There is no need for scale encoding/decoding to attestedCandidate, so I removed scale tags from the same struct.
  • wrote unit tests for the same

Rust implementation: https://github.com/paritytech/polkadot-sdk/blob/7ca0d65f19497ac1c3c7ad6315f1a0acb2ca32f8/polkadot/statement-table/src/generic.rs#L318-L334

Issues

#3471

Primary Reviewer

@kishansagathiya @edwardmack

dot/parachain/backing/statement_table.go Outdated Show resolved Hide resolved
dot/parachain/backing/statement_table.go Outdated Show resolved Hide resolved
Copy link
Member

@edwardmack edwardmack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work.

dot/parachain/backing/statement_table.go Show resolved Hide resolved
edwardmack and others added 3 commits May 21, 2024 11:20
…f github.com:ChainSafe/gossamer into axay/feat/backing/statement-table/attested-candidate
@axaysagathiya axaysagathiya self-assigned this May 22, 2024
@axaysagathiya axaysagathiya merged commit a956d59 into feat/parachain May 22, 2024
21 checks passed
@axaysagathiya axaysagathiya deleted the axay/feat/backing/statement-table/attested-candidate branch May 22, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants