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

Replace codegen with bindnode and add plain IPLD schema #39

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

masih
Copy link
Member

@masih masih commented Jun 8, 2022

Define the HAMT schema in a dedicated ipldsch file and replace the
codegen types with go structs using IPLD bindnode.

Note the IPLD dependency is updated to the current head of main branch
to take advantage of the latest unreleased bindnode fixes.

@masih masih requested review from rvagg and willscott June 8, 2022 21:31
@masih masih force-pushed the masih/rm-codegen-4-bindnode branch from 79518ad to b333ff6 Compare June 8, 2022 21:45
Copy link
Member

@willscott willscott left a comment

Choose a reason for hiding this comment

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

Much cleaner!

builder.go Outdated Show resolved Hide resolved
filecoin_test.go Outdated Show resolved Hide resolved
@@ -63,11 +69,11 @@ func (n *Node) _bucketSize() int {
// gets coalesced to -1.
// We also prevent overflows and underflows, as we convert int64 to int.
const maxBucketSize = 1 << 20 // 1MiB
Copy link
Member

Choose a reason for hiding this comment

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

oh, here's a max, but oh boy it's big! we might have to revisit that later, and I don't see an equivalent here for bitWidth which could have worse effects.

Copy link
Member Author

Choose a reason for hiding this comment

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

Captured #40

filecoin_test.go Outdated Show resolved Hide resolved
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

neato

Define the HAMT schema in a dedicated ipldsch file and replace the
codegen types with go structs using IPLD bindnode.

Note the IPLD dependency is updated to the current head of main branch
to take advantage of the latest unreleased bindnode fixes.
@masih masih force-pushed the masih/rm-codegen-4-bindnode branch from fa3d91a to f1a2395 Compare June 9, 2022 12:41
@masih masih merged commit be79cbd into master Jun 9, 2022
@masih masih deleted the masih/rm-codegen-4-bindnode branch June 9, 2022 12:47
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