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

DagCBOR encoding and decoding for Tickets #190

Merged
merged 9 commits into from
Jan 23, 2020
Merged

DagCBOR encoding and decoding for Tickets #190

merged 9 commits into from
Jan 23, 2020

Conversation

ec2
Copy link
Member

@ec2 ec2 commented Jan 22, 2020

Summary of changes
Changes introduced in this pull request:

  • Introduce encoding and decoding of Tickets and related structs.
  • Basic tests with vectors from Lotus

Reference issue to close (if applicable)

Closes

Other information and links

@ec2 ec2 changed the title DagCBO DagCBOR encoding and decoding for Tickets Jan 22, 2020
blockchain/blocks/src/ticket.rs Outdated Show resolved Hide resolved
blockchain/blocks/src/ticket.rs Outdated Show resolved Hide resolved
blockchain/blocks/src/ticket.rs Outdated Show resolved Hide resolved
blockchain/blocks/src/ticket.rs Outdated Show resolved Hide resolved
crypto/src/vrf.rs Outdated Show resolved Hide resolved
Comment on lines 68 to 75
pub struct CborEPostTicket(
#[serde(with = "serde_bytes")] Vec<u8>, // partial
u64, // sector_id
u64, // challenge_index
);

#[derive(Serialize, Deserialize)]
pub struct CborEPostProof(
Copy link
Contributor

Choose a reason for hiding this comment

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

make these private, only used in this file for serialization

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@ec2 ec2 self-assigned this Jan 22, 2020
@ec2 ec2 merged commit f1eb515 into master Jan 23, 2020
@ec2 ec2 deleted the ec2/ticket-encoding branch January 23, 2020 15:48
@ec2 ec2 restored the ec2/ticket-encoding branch January 23, 2020 15:50
@ec2 ec2 deleted the ec2/ticket-encoding branch January 23, 2020 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants