Skip to content

Commit e88ea57

Browse files
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

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

.config/zepter.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version:
2+
format: 1
3+
# Minimum zepter version that is expected to work. This is just for printing a nice error
4+
# message when someone tries to use an older version.
5+
binary: 0.13.2
6+
7+
# The examples in the following comments assume crate `A` to have a dependency on crate `B`.
8+
workflows:
9+
check:
10+
- [
11+
"lint",
12+
# Check that `A` activates the features of `B`.
13+
"propagate-feature",
14+
# These are the features to check:
15+
"--features=std,serde",
16+
# Do not try to add a new section into `[features]` of `A` only because `B` exposes that feature. There are edge-cases where this is still needed, but we can add them manually.
17+
"--left-side-feature-missing=ignore",
18+
# Ignore the case that `A` is outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
19+
"--left-side-outside-workspace=ignore",
20+
"--show-path",
21+
"--quiet",
22+
]
23+
default:
24+
# Running `zepter` with no subcommand will check & fix.
25+
- [ $check.0, "--fix" ]
26+
27+
# Will be displayed when any workflow fails:
28+
help:
29+
text: |
30+
Fluentbase uses the Zepter CLI to detect abnormalities in Cargo features, e.g. missing propagation.
31+
32+
It looks like one more checks failed; please check the console output.
33+
34+
You can try to automatically address them by installing zepter (`cargo install zepter --locked`) and simply running `zepter` in the workspace root.
35+
links:
36+
- "https://github.com/ggwpez/zepter"

0 commit comments

Comments
 (0)