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

docs: update the blob module specs part 1 #1906

Merged
merged 20 commits into from
Jun 19, 2023

Conversation

evan-forbes
Copy link
Member

Overview

mostly a minor update to the blob module specs, but this PR also adds some validity rules for BlobTxs/PFBs

part of #650

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@evan-forbes evan-forbes added specs directly relevant to the specs x/blob item is directly relevant to the blob module labels Jun 12, 2023
@evan-forbes evan-forbes requested a review from rootulp as a code owner June 12, 2023 03:03
@evan-forbes evan-forbes self-assigned this Jun 12, 2023
@evan-forbes evan-forbes requested a review from cmwaters as a code owner June 12, 2023 03:03
@MSevey MSevey requested a review from a team June 12, 2023 03:03
@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2023

Codecov Report

Merging #1906 (ab80f8d) into main (c8f5c33) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1906   +/-   ##
=======================================
  Coverage   21.25%   21.25%           
=======================================
  Files         121      121           
  Lines       13679    13679           
=======================================
  Hits         2907     2907           
  Misses      10484    10484           
  Partials      288      288           

@evan-forbes
Copy link
Member Author

the markdown lint will continue to fail until we merge #1905

cmwaters
cmwaters previously approved these changes Jun 12, 2023
x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Show resolved Hide resolved
staheri14
staheri14 previously approved these changes Jun 12, 2023
Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

Great PR with great details and information! 👍
I have included my comments below. However, please feel free to address them either in this PR or in subsequent PRs as you deem appropriate.

x/blob/README.md Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Show resolved Hide resolved
x/blob/README.md Outdated
1. `NamespaceId []byte`: the namespace this blob should be published to.
1. `Data []byte`: the data to be published.
1. `ShareVersion uint32`: the version of the share format used to encode this blob into a share.
1. `ShareVersion uint32`: the version of the share format used to encode
this blob into a share.
1. A single `sdk.Tx` which is composed of:
Copy link
Contributor

@staheri14 staheri14 Jun 12, 2023

Choose a reason for hiding this comment

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

I think it would be beneficial to mention that the sdk.Tx represents the encoded version of one or multiple MsgPayForBlobs, and then introduce Signer , NamespaceIds, and ShareCommitment as the components of MsgPayForBlobs (basically what is already in the specs after the is composed of:)

Copy link
Member Author

Choose a reason for hiding this comment

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

added a link to the sdk ADR that discusses the structure of sdk.Tx, but perhaps we can talk about this more elsewhere? I'm quite sure what to do yet.

x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Show resolved Hide resolved
x/blob/README.md Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
rootulp
rootulp previously approved these changes Jun 13, 2023
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

[optional] there's another param in the blob module for GovMaxSquareSize

x/blob/README.md Show resolved Hide resolved
@evan-forbes
Copy link
Member Author

evan-forbes commented Jun 15, 2023

apologies for the delay on incorporating all the great feedback here! I need to debug a few more things in node for the testnet hardfork and then I'll get to this 🙂

x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
@evan-forbes evan-forbes dismissed stale reviews from rootulp and staheri14 via 5b69d04 June 19, 2023 03:40
Co-authored-by: Sanaz Taheri <[email protected]>
Co-authored-by: Rootul P <[email protected]>
@MSevey MSevey requested a review from a team June 19, 2023 03:40
staheri14
staheri14 previously approved these changes Jun 19, 2023
Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the comment, it looks good to me!

x/blob/README.md Show resolved Hide resolved
In order for a proposal block to be considered valid, each `BlobTx`, and thus
each PFB, to be included in a block must follow a set of validity rules.

1. Signatures: All blob transactions must have valid signatures. This is
Copy link
Contributor

Choose a reason for hiding this comment

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

[Question for my own understanding] When the term "proposal block" is used in the context of "In order for a proposal block to be considered valid," does it refer to a block proposed during the consensus (and yet to be voted and committed) or one that has received the majority vote (hence committed)? I'm curious about when signatures and nonces are verified – during the voting phase or at the time of block execution (which I think corresponds to the processProposal). If signature verification is required during the voting process, then we would need to track the state changes resulting from proposals (but not committed blocks) in order to do so.

Copy link
Member Author

Choose a reason for hiding this comment

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

does it refer to a block proposed during the consensus (and yet to be voted and committed) or one that has received the majority vote (hence committed)?

both! we call ProcessProposal on proposals beofore voting, and while consensus nodes sync the chain

signatures, and therefore their nonces, are verified before the block is actually applied to the state in both cases. State can then be tracked rather easily since we already have the state from the previous block, which is all that is needed.

x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

Only one blocking comment

x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Outdated Show resolved Hide resolved
x/blob/README.md Outdated
Comment on lines 96 to 98
in this message. See
[ADR014](../../docs/architecture/adr-014-versioned-namespaces.md) for more
details on how this effects the share encoding and when it is updated.
Copy link
Collaborator

Choose a reason for hiding this comment

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

[optional] ADR-014 doesn't describe share versions, it describe namespace versions.

ADR-007 introduces a share version: https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-007-universal-share-prefix.md

Copy link
Member Author

Choose a reason for hiding this comment

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

my bad thanks for catching 920760c

Co-authored-by: Sanaz Taheri <[email protected]>
Co-authored-by: Rootul P <[email protected]>
@MSevey MSevey requested a review from a team June 19, 2023 19:10
@evan-forbes evan-forbes enabled auto-merge (squash) June 19, 2023 19:32
@evan-forbes evan-forbes requested review from rootulp and staheri14 June 19, 2023 19:32
Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

🚀

@evan-forbes evan-forbes merged commit ab71231 into main Jun 19, 2023
@evan-forbes evan-forbes deleted the evan/update-blob-module-specs-part-1 branch June 19, 2023 21:22
evan-forbes added a commit that referenced this pull request Jul 3, 2023
* docs: minor update to the blob module

* docs: add validity rules

* docs: update event field

* docs: Apply suggestions from code review

Co-authored-by: Sanaz Taheri <[email protected]>
Co-authored-by: Rootul P <[email protected]>

* docs: minor update

* docs: fill out fields of PFB in new format and link to ADR014 for share verison

* docs: elaborate on size consistency

* docs: link to reserved namespaces

* docs: clarify and add link

* docs: share commitments

* docs: typo and link to reserved name space

* docs: add link to sharesize

* docs: add more info for shares commitments

* docs: review feedback

Co-authored-by: Sanaz Taheri <[email protected]>
Co-authored-by: Rootul P <[email protected]>

* docs: use adr 007

* docs: add link

---------

Co-authored-by: Sanaz Taheri <[email protected]>
Co-authored-by: Rootul P <[email protected]>
evan-forbes added a commit that referenced this pull request Jul 3, 2023
* docs: minor update to the blob module

* docs: add validity rules

* docs: update event field

* docs: Apply suggestions from code review

Co-authored-by: Sanaz Taheri <[email protected]>
Co-authored-by: Rootul P <[email protected]>

* docs: minor update

* docs: fill out fields of PFB in new format and link to ADR014 for share verison

* docs: elaborate on size consistency

* docs: link to reserved namespaces

* docs: clarify and add link

* docs: share commitments

* docs: typo and link to reserved name space

* docs: add link to sharesize

* docs: add more info for shares commitments

* docs: review feedback

Co-authored-by: Sanaz Taheri <[email protected]>
Co-authored-by: Rootul P <[email protected]>

* docs: use adr 007

* docs: add link

---------

Co-authored-by: Sanaz Taheri <[email protected]>
Co-authored-by: Rootul P <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specs directly relevant to the specs x/blob item is directly relevant to the blob module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants