Commit e88ea57
feat(weierstrass-curves): new crypto runtime (#201)
* feat(runtime): refactoring weierstrass curves: bls, bn254, and 256k1/r1
* feat(e2e): fixed the svm compatibility
* feat(runtime): remove redundant curve implementations, tests pass
* feat(runtime)!: refactoring SyscallWeierstrassPairingAssign
* fix(contracts/bn256): removed unused imports
* fix(evn-e2e): disabled wasmtime feature
* refactor: rename weierstrass into ecc (less misleading)
Signed-off-by: Dmitry Savonin <[email protected]>
* fix(runtime): clean up the ecc syshandlers
* fix(runtime): removed the commented snippets
* refactor(runtime): moved fp/fp2 ops away from ecc
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor(runtime): reimplemented ed25519 ops in the runtime
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor(runtime): move edwards, refactor ecrecover, implement u256 mul ops, remove bigmodexp, make keccak256 self-free
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor(runtime): add tower fields fp1/fp2 support
Signed-off-by: Dmitry Savonin <[email protected]>
* chore(runtime): fix warnings
Signed-off-by: Dmitry Savonin <[email protected]>
* chore(runtime): fix compilation
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor(runtime): move types into sdk, remove types crate, add new crypto crate for optimized crypto ops
Signed-off-by: Dmitry Savonin <[email protected]>
* fix(crypto): expose mods
Signed-off-by: Dmitry Savonin <[email protected]>
* chore(crypto): rename `MathAPI` into `CryptoAPI`
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor(sdk): return types crate back, refactor hashing func, refactor crypto builtins
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor(sdk): fix cycle dependency, missing features, warnings, replace hashing function with the ones from new crypto crate
Signed-off-by: Dmitry Savonin <[email protected]>
* fix(sdk): remove impossible test
Signed-off-by: Dmitry Savonin <[email protected]>
* fix(contracts): update ecrecover to make it work
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor: update hashing, add new tests, reimplement hashing functions for eth
Signed-off-by: Dmitry Savonin <[email protected]>
* fix(sha256): fix bug with incorrect endianess for sha256 compress/extend, enable new sha256 precompile
Signed-off-by: Dmitry Savonin <[email protected]>
* fix: adjust block fuel for wasm applications, move
Signed-off-by: Dmitry Savonin <[email protected]>
* fix(e2e): fix running router tests, tiny refactored artifacts
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor(runtime): new syscalls for unconstrained execution and for fd write, rename remaining host syscalls to the new naming format, add uint25 syscalls into native-api
Signed-off-by: Dmitry Savonin <[email protected]>
* feat(runtime): add rwasm-patches, Weierstrass add, double
* refactor(runtime): benches fix
Signed-off-by: Dmitry Savonin <[email protected]>
* refactor(runtime): a giant refactoring of all syscalls to make sure all params are aligned, remove all syscalls we can't support, reformat all constants
Signed-off-by: Dmitry Savonin <[email protected]>
* fix: incorrect number of params for tower fields
Signed-off-by: Dmitry Savonin <[email protected]>
* fix: encoding weierstrass point result, compatibility with evm bn256 tests
Signed-off-by: Dmitry Savonin <[email protected]>
* chore: contract/bls12381 -> revm_precompile + rwasm-patches
* fix: contracts/bn256 uses the runtime implementation for add
* fix(types): fix _ed25519_decompress and _ed25519_add signatures
* fix(contracts): add the validation for the bn254_add input data
---------
Signed-off-by: Dmitry Savonin <[email protected]>
Co-authored-by: Dmitry Savonin <[email protected]>1 parent 2d3517a commit e88ea57
File tree
228 files changed
+7952
-8156
lines changed- .config
- contracts
- bls12381
- bn256
- ecrecover
- eip2935
- secp256r1
- sha256
- universal-token
- crates
- build
- src
- generators
- contracts
- crypto
- src
- ecdsa
- evm
- genesis
- src
- revm/src
- runtime
- src
- syscall_handler
- bigint
- bls12381
- bn254
- ed25519
- edwards
- hashing
- host
- ristretto255
- secp256k1
- secp256r1
- tower
- uint256
- weierstrass
- utils
- sdk-derive/derive-core/src
- snapshots
- sdk
- src
- storage
- types
- svm-common
- src
- svm
- src
- fluentbase
- loaders/syscalls
- token_2022
- extension
- default_account_state
- transfer_fee
- testing/src
- types
- src
- rwasm_context
- universal-token
- e2e
- benches
- src
- evm-e2e
- examples
- keccak
- sha256
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
228 files changed
+7952
-8156
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
0 commit comments