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

Ethereum test failure #441

Closed
kayabaNerve opened this issue Nov 19, 2023 · 3 comments
Closed

Ethereum test failure #441

kayabaNerve opened this issue Nov 19, 2023 · 3 comments
Labels
bug Something isn't working ethereum An issue with the Ethereum integration

Comments

@kayabaNerve
Copy link
Member

I'm really unsure why this failed.

The tests passed in 30a77d8 and failed in 25c02c1.

The only Cargo.lock changes bumped ed25519-dalek, zeroize, and rustls in db49a63 (none should have impact here).

crypto and coins were not further edited. common only had serai-db edited.

---- test_ecrecover_hack stdout ----
thread 'test_ecrecover_hack' panicked at coins/ethereum/tests/contract.rs:123:48:
called `Result::unwrap()` on an `Err` value: Contract call reverted with data: 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001065637265636f766572206661696c656400000000000000000000000000000000

Location:
    /home/runner/work/serai/serai/coins/ethereum/src/contract.rs:21:6

That appears to be far too many zeroes to be valid, if that is the calldata. That'd suggest a bug re: zeroization, yet ethereum-serai doesn't pull in zeroize (at least, not directly).

The tests pass locally. I'll rerun them on the CI now.

@kayabaNerve kayabaNerve added bug Something isn't working ethereum An issue with the Ethereum integration labels Nov 19, 2023
@kayabaNerve
Copy link
Member Author

The CI consistently fails. It uses the nightly foundry which updated k256 in foundry-rs/foundry#6327. k256 changed their ecrecover functionality, as documented in RustCrypto/elliptic-curves#988, which borked revm. foundry uses revm. Not our fault.

@kayabaNerve
Copy link
Member Author

foundry-rs/foundry#6358 will close this.

@kayabaNerve
Copy link
Member Author

We got affected by this due to #116. It seems while foundry does not have stable versions to pin to, you can pin to nightly versions (I didn't realize you could pin to "nightly-x" instead of just "nightly") per foundry-rs/foundry-toolchain#35. Accordingly, we can resolve this (and #116) on our end.

kayabaNerve added a commit that referenced this issue Nov 19, 2023
davidjohnbell pushed a commit to econsta/serai that referenced this issue Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ethereum An issue with the Ethereum integration
Projects
None yet
Development

No branches or pull requests

1 participant