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

AMT fails to serialise as CBOR #64

Open
iand opened this issue Mar 24, 2022 · 2 comments
Open

AMT fails to serialise as CBOR #64

iand opened this issue Mar 24, 2022 · 2 comments

Comments

@iand
Copy link
Contributor

iand commented Mar 24, 2022

When bitwidth is 14 or 15 CBOR marshalliing fails with error Slice value in field t.Values was too long

Only noticeable in benchmarks:

WIDTH 14
BenchmarkAMTInsertBulk-8      	      72	  16396264 ns/op	         1.000 gets/op	         1.000 puts/op	 2631620 B/op	   80052 allocs/op
BenchmarkAMTLoadAndInsert-8   	--- FAIL: BenchmarkAMTLoadAndInsert-8
    amt_test.go:692: Slice value in field t.Values was too long
BenchmarkNodesForHeight-8     	1000000000	         0.2395 ns/op	       0 B/op	       0 allocs/op
FAIL
WIDTH 15
BenchmarkAMTInsertBulk-8      	      74	  16356505 ns/op	         1.000 gets/op	         1.000 puts/op	 2895588 B/op	   80051 allocs/op
BenchmarkAMTLoadAndInsert-8   	--- FAIL: BenchmarkAMTLoadAndInsert-8
    amt_test.go:692: Slice value in field t.Values was too long
@Stebalien
Copy link
Member

We probably want the maximum to be, like, 10.

@Stebalien
Copy link
Member

With 14, we're allowing 2^14 entries.

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

No branches or pull requests

2 participants