-
Notifications
You must be signed in to change notification settings - Fork 994
revive: console precompiles #9552
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
base: anp-dirty-node
Are you sure you want to change the base?
Conversation
fd4a36b
to
deafd00
Compare
74850c9
to
70f6c50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a complete console.log precompile for the Substrate revive EVM contracts framework, providing full compatibility with Foundry's console.sol library for debugging and development purposes.
Key changes:
- Implements all 387 console.log function signatures from Foundry's forge-std library
- Adds address allocation at 0x0B (decimal 11) with comprehensive property-based testing
- Enables seamless debugging workflows with multi-channel output (Substrate logs, stdout, RPC debug buffer)
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
substrate/frame/revive/src/precompiles/builtin/console/property_tests.rs | Comprehensive property-based tests verifying robustness and INPUT=OUTPUT invariant |
substrate/frame/revive/src/precompiles/builtin/console/mod.rs | Core console precompile implementation with 387 function signatures |
substrate/frame/revive/src/precompiles/builtin/console/README.md | Documentation covering address allocation, usage, and architecture context |
substrate/frame/revive/src/precompiles/builtin.rs | Integration of console module into builtin precompiles |
substrate/frame/revive/src/precompiles.rs | Added Clone and PartialEq derives to Error enum |
substrate/frame/revive/src/benchmarking.rs | Console-specific benchmarks for performance validation |
substrate/frame/revive/Cargo.toml | Added proptest dependency for property-based testing |
prdoc/pr_9552.prdoc | PR documentation describing features and usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
substrate/frame/revive/src/precompiles/builtin/console/property_tests.rs
Outdated
Show resolved
Hide resolved
substrate/frame/revive/src/precompiles/builtin/console/property_tests.rs
Outdated
Show resolved
Hide resolved
substrate/frame/revive/src/precompiles/builtin/console/property_tests.rs
Outdated
Show resolved
Hide resolved
substrate/frame/revive/src/precompiles/builtin/console/property_tests.rs
Outdated
Show resolved
Hide resolved
All GitHub workflows were cancelled due to failure one of the required jobs. |
Description
Closes: paritytech/hardhat-polkadot#178
Integration
Goes into the hardhat dev node.
Review Notes
Adds
console
precompiles that support the exact same 300+ methods console.sol in foundry does. Adds property based tests to test all variants ensuring all permutations to not crash and log the expected value..