revive: Precompiles should return dummy code when queried#9001
revive: Precompiles should return dummy code when queried#9001
Conversation
|
Why would This cast code 0x0000000000000000000000000000000000010000 return something different than the 0x1 - 0x9 precompiles Are there example of precompiles on ethereum that returns something else than 0x |
Because we access those pre-compiles via a Solidity interface. As opposed via YUL assembly as we do for 0x1-0x9 pre-compiles. And Solidity does emit checks if a contract exists via
Not on main net. Because those are all accessed via assembly circumventing Solidity. |
|
/cmd prdoc --audience runtime_dev |
|
added tests paritytech/evm-test-suite#100 |
|
Test suite seems to fail due to this bug: paritytech/revive#344 But there is no released version with the fix, yet. @xermicus |
|
I'll try to cut a release with the fix right now. |
* master: (91 commits) Add extra information to the harmless error logs during validate_transaction (#9047) `sp-tracing`: Remove `test-utils` feature (#9063) add try-state check for staking roles -- staker cannot be nominator a… (#9034) net/discovery: File persistence for `AddrCache` (#8839) dispute-coordinator: handle race with offchain disabling (#9050) Align parameters for `EventEmitter::emit_sent_event` (#9057) Fetch parent block `api_version` (#9059) [XCM Precompile] Rename functions and improve docs in the Solidity interface (#9023) Cleanup and improvements for `ControlledValidatorIndices` (#8896) reenable 0001-parachains-pvf (#9046) Add optional auto-rebag within on-idle (#8684) Fix flaxy 0003-block-building-warp-sync test - one more approach (#8974) [Staking] [AHM] Fixes insufficient slashing of nominators (and some other small issues). (#8937) chore: Bump bounded-collections dep (#9004) XCMP and DMP improvements (#8860) EPMB/unsigned: fixed multi-page winner computation (#8987) Always send full parent header, not only hash, part of collation response (#8939) revive: Precompiles should return dummy code when queried (#9001) Fix confusing log messages in network protocol behaviour (#8819) Fix pallet_migrations benchmark when FailedMigrationHandler emits events (#8694) ...
Fixes paritytech/contract-issues#111 This fixes both the RPC and the opcodes `EXTCODESIZE` and `EXTCODEHASH`. Also removed the disabled host function `is_contract`. Contracts do use `EXTCODESIZE` to determine if something is a contract exclusively. Need to add some differential tests to our test suite to make sure that the RPC matches geth behaviour: On kitchensink: ```shell # primitive precompiles should not return error but 0x $ cast code 0x0000000000000000000000000000000000000001 0x # this is the erc pre-compile $ cast code 0x0000000000000000000000000000000000010000 0x60006000fd ``` --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes paritytech/contract-issues#111
This fixes both the RPC and the opcodes
EXTCODESIZEandEXTCODEHASH.Also removed the disabled host function
is_contract. Contracts do useEXTCODESIZEto determine if something is a contract exclusively.Need to add some differential tests to our test suite to make sure that the RPC matches geth behaviour:
On kitchensink: