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

cip-19!: breaking Shwap protocol improvements #128

Merged
merged 5 commits into from
Apr 17, 2024

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented Apr 16, 2024

Decouple IDs out of Containers

This is a protocol-breaking change for Shwap. Initially, containers kept the identifiers as a first field in them. However, we decided to decouple those.

The Bitswap protocol dictates the requirement to have IDs in containers and this enforces certain limitations and overhead for the core Shwap containers. However, we want to use the containers outside of the Bitswap composition context, and thus, we need to remove this requirement from the containers. Furthermore, we design Shwap in a protocol-agnostic way, and Bitswap enforcing limits on containers is inconsistent with that.

As Bitswap still requires coupling between data and identifiers, we introduce container adapters for the Bitswap composition to address that.

Rename Data container and ID

We rename Data -> RowNamespaceData and increase verbosity to improve clarity around the meaning of the type. Prefixing Row and Namespace narrows down the scope of the very general Data. Altogether, RowNamespaceData specifies that its data of a specific namespace in a specific row. This opens up space for future containers like NamespaceData which is data of a specific namespace, but over multiple rows.

@Wondertan Wondertan force-pushed the cip-19-decouple-ids branch from ea75462 to 6b22498 Compare April 17, 2024 13:33
@Wondertan Wondertan marked this pull request as ready for review April 17, 2024 13:34
Copy link
Member

@jcstein jcstein left a comment

Choose a reason for hiding this comment

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

Due to the breaking change (a significant change to the CIP), should this also revert the PR to Draft Review status? cc @rootulp @ebuchman @YazzyYaz

edit: this file has Review as status currently

@jcstein
Copy link
Member

jcstein commented Apr 17, 2024

Screenshot 2024-04-17 at 11 16 47 AM can you pull in latest changes from main @Wondertan? then we can edit it to Review

@Wondertan Wondertan force-pushed the cip-19-decouple-ids branch from 6b22498 to f277db4 Compare April 17, 2024 15:29
@Wondertan
Copy link
Member Author

@jcstein, rebased + changed to Review

@Wondertan Wondertan changed the title cip-19!: decouple IDs out of Containers cip-19!: protocol improvements Apr 17, 2024
@Wondertan Wondertan changed the title cip-19!: protocol improvements cip-19!: breaking Shwap protocol improvements Apr 17, 2024
cips/cip-19.md Outdated Show resolved Hide resolved
@rootulp rootulp requested a review from jcstein April 17, 2024 16:01
cips/cip-19.md Outdated Show resolved Hide resolved
@jcstein jcstein merged commit fa2f0bd into celestiaorg:main Apr 17, 2024
1 check passed
@Wondertan
Copy link
Member Author

Noooo

@Wondertan
Copy link
Member Author

I was just about to commit something

@Wondertan
Copy link
Member Author

OK, will do another PR

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.

3 participants