Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Go] [Rust] update language bindings to return value API (#417)
* refactor(Rust): start refactoring to idiomatic Rust API) * refactor(Go): start refactoring to idiomatic Go API * refactor(C): ptrdiff_t -> size_t * [Go] make Go API more statically typed, out param -> return value API * add helper function returning required size for EVM modexp, C API * [Go] update all BLS sig tests for new API * [Go] fix copy paste typo in EVM FP2 to G2 * [Go] update Go EVM precompiles test for new API NOTE: currently not all tests pass, due to the unmarshaling bug. We will rebase once a final decision for the solution has been made. * [rust] change Rust BLS signature API to return values, add missing Adds a couple of overlooked API functions, - validation (sec, pub, sig) - serialization of seckeys - deserialize unchecked * [rust] update tests for BLS signatures with new API * [Go] add overlooked valid return value for unchecked deserialization * [rust] update EVM precompiles API to return values * [rust] regenerate Rust bindings w/ modexp result alloc helper * [rust] fix up tests for EVM precompiles * [rust] add missing inline, add must_use, fix sha256 API isize -> usize * [go] explicitly return `nil` in EvmSha256 for non error case * [go] remove TODO comment * [rust] fix naming of EVM precompiles test cases * [rust] simplify EVM precompiles tests using IntoIterator trait * add `eth_evm` prefix to EVM modexp result size helper * [rust] update BLS sig API for ptrdiff_t -> csize_t change * [rust] remove some warnings from BLS sig rust test * [rust] fix wrong size for FP2 to G2 * [rust] remove unused imports in EVM precompiles (and test) * [rust] fix name of EVM precompiles test fn * [rust] minor clean up, also assert expected error given if fail --------- Co-authored-by: Mamy Ratsimbazafy <mamy_github@numforge.co>
- Loading branch information