Slices without reflect#12
Conversation
This PR changes the assembly code to receive pointers to the first bytes of the slices instead of the slices themselves. This allows the Go binding to simply pass pointers to the first byte and be able to expose functions that take either `[][32]byte` or `[]byte`. The generic fallback does copy chunks and digests in the case of byte slice arguments.
|
https://github.com/ledgerwatch/erigon/actions/runs/4987214900/jobs/8928757394 - the hashes aren't matching up here with this pr. the data is in the tests directory (go embedded) i can try to test take_slices branch later if needed, it is sorta annoying to do because it gets rid of the original function (which we are using elsewhere in code) |
Does that test pass with gohashtree in any way? this PR passes unit tests here hashing, it's hard for me to check against Erigon's test setup, if you can give me a minimum reproducible test that would help. |
This PR changes the assembly code to receive pointers to the first bytes of the slices instead of the slices themselves. This allows the Go binding to simply pass pointers to the first byte and be able to expose functions that take either
[][32]byteor[]byte.The generic fallback does copy chunks and digests in the case of byte slice arguments.