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

Stop forcing the last reserved byte to 0 for compact shares #779

Closed
rootulp opened this issue Sep 23, 2022 · 2 comments · Fixed by #819
Closed

Stop forcing the last reserved byte to 0 for compact shares #779

rootulp opened this issue Sep 23, 2022 · 2 comments · Fixed by #819
Assignees
Labels
bug Something isn't working consensus breaking modifies block validity rules in a way that will break consensus unless all nodes update their rules

Comments

@rootulp
Copy link
Collaborator

rootulp commented Sep 23, 2022

Question

Why is reserved byte of last compact share forced to zero? This behavior seems undesirable if the last compact share contains a new transaction.

Context

Link

// here we force the last share reserved byte to be zero to avoid any
// confusion for light clients parsing these shares, as the rest of the
// data after transaction is padding. See
// https://github.com/celestiaorg/celestia-specs/blob/master/src/specs/data_structures.md#share
rawLastShare[appconsts.NamespaceSize+appconsts.ShareInfoBytes+i] = byte(0)

@rootulp rootulp added the discussion inherently unactionable issue for the sole purpose of discussion label Sep 23, 2022
@evan-forbes
Copy link
Member

I'm confused by this as well.

As such, the reserved bytes should use the well-defined zero value to indicate a termination of the transaction stream.

@adlerjohn ?

perhaps we should rethink this now that we are adding the length delimiter to compact shares (formerly contiguous shares)

@rootulp
Copy link
Collaborator Author

rootulp commented Sep 29, 2022

Based on synchronous discussion, it seems like the last transaction share shouldn't force the reserve byte to zero.

@rootulp rootulp added bug Something isn't working and removed discussion inherently unactionable issue for the sole purpose of discussion labels Sep 29, 2022
@evan-forbes evan-forbes added the consensus breaking modifies block validity rules in a way that will break consensus unless all nodes update their rules label Sep 29, 2022
@evan-forbes evan-forbes changed the title Why is reserved byte of last compact share forced to zero? Stop forcing the last reserved byte to 0 for compact shares Sep 29, 2022
@evan-forbes evan-forbes moved this to TODO in Celestia Node Sep 29, 2022
@evan-forbes evan-forbes moved this from TODO to In Progress in Celestia Node Sep 29, 2022
@evan-forbes evan-forbes moved this from In Progress to TODO in Celestia Node Sep 29, 2022
rootulp added a commit to rootulp/celestia-app that referenced this issue Sep 29, 2022
rootulp added a commit to rootulp/celestia-app that referenced this issue Sep 29, 2022
rootulp added a commit to rootulp/celestia-app that referenced this issue Sep 29, 2022
rootulp added a commit that referenced this issue Sep 30, 2022
Repository owner moved this from TODO to Done in Celestia Node Sep 30, 2022
rach-id pushed a commit to rach-id/celestia-app that referenced this issue Nov 16, 2022
cmwaters pushed a commit to celestiaorg/go-square that referenced this issue Dec 14, 2023
0xchainlover pushed a commit to celestia-org/celestia-app that referenced this issue Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working consensus breaking modifies block validity rules in a way that will break consensus unless all nodes update their rules
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants