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

[EVM] Fix the CryptoZombies test #3611

Closed
artob opened this issue Nov 13, 2020 · 3 comments
Closed

[EVM] Fix the CryptoZombies test #3611

artob opened this issue Nov 13, 2020 · 3 comments
Assignees
Labels
A-EVM Area: Native EVM implementation and support A-testing Area: Unit testing / integration testing C-bug Category: This is a bug

Comments

@artob
Copy link
Contributor

artob commented Nov 13, 2020

I am currently investigating the failing CryptoZombies test noted in #3257:

cargo test --package nearcore --test test_cases_runtime test::test_evm_deploy_call_runtime --features protocol_feature_evm,nightly_protocol_features -- --exact

Originally posted by @evgenykuzyakov in #3257 (comment)

Screen Shot 2020-11-13 at 17 30 35

@artob artob added C-bug Category: This is a bug A-testing Area: Unit testing / integration testing A-EVM Area: Native EVM implementation and support labels Nov 13, 2020
@artob artob self-assigned this Nov 13, 2020
@artob
Copy link
Contributor Author

artob commented Nov 13, 2020

The source code for runtime/near-evm-runner/tests/build/zombieAttack.bin is not documented in the commit history (imported in cc4ec1f), but appears to be the contract from CryptoZombies Lesson 5: ERC721 & Crypto-Collectibles.

The proximate cause for the test failure is the call to the contract's getZombiesByOwner() function (in zombiehelper.sol) returning empty output, which then bails out here:

let res = cryptozombies::functions::get_zombies_by_owner::decode_output(&bytes).unwrap();

https://github.com/openethereum/ethabi/blob/9c86167fa1f5704d6d90f48cf420d5f594174ac0/ethabi/src/decoder.rs#L41

I am in the process of digging deeper towards the root cause...

@artob
Copy link
Contributor Author

artob commented Nov 16, 2020

The source code for runtime/near-evm-runner/tests/build/zombieAttack.bin appears to be test/contracts/ZombieAttack.sol in near-web3-provider. Thanks, @mikedotexe!

artob added a commit that referenced this issue Nov 17, 2020
The regression was due to an invalid zombieAttack.bin imported
in e350e29 (#3299). Hereby reverted to the original from cc4ec1f.

This also removes an annoying build warning introduced in 8a45140.
artob added a commit that referenced this issue Nov 17, 2020
The regression was due to an invalid zombieAttack.bin imported
in e350e29 (#3299). Hereby reverted to the original from cc4ec1f.

This also removes an annoying build warning introduced in 8a45140.
evgenykuzyakov pushed a commit that referenced this issue Nov 17, 2020
This fixes #3611. The regression was due to an invalid `zombieAttack.bin` imported in e350e29 (#3299). Hereby reverted to the original from cc4ec1f.

Additionally, this also removes an annoying build warning inadvertently introduced in 8a45140 (#3595).
@artob
Copy link
Contributor Author

artob commented Nov 18, 2020

The regression was due to an invalid zombieAttack.bin imported in e350e29 (#3299). Reverted to the original from cc4ec1f in #3624.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-EVM Area: Native EVM implementation and support A-testing Area: Unit testing / integration testing C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant