-
Notifications
You must be signed in to change notification settings - Fork 859
Add failfast precompile to detect interop #2670
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: main
Are you sure you want to change the base?
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2670 +/- ##
==========================================
- Coverage 43.82% 43.81% -0.01%
==========================================
Files 1908 1910 +2
Lines 159073 159084 +11
==========================================
Hits 69708 69708
- Misses 82958 82972 +14
+ Partials 6407 6404 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
stevenlanders
left a comment
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.
lgtm, just one comment - might be better to be explicit about the individual precompiles here just for clarity
| var AllCustomPrecompilesFailFast = map[common.Address]vm.PrecompiledContract{} | ||
|
|
||
| func init() { | ||
| for addr := 0x1001; addr <= 0x100C; addr++ { |
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.
I'd suggest actually just having a hardcoded list of addresses just for clarity, because SOME precompiles may still be allowed:
common.HexToAddress(bank.BankAddress),
common.HexToAddress(wasmd.WasmdAddress),
common.HexToAddress(json.JSONAddress), // Maybe okay?
common.HexToAddress(addr.AddrAddress), // Maybe okay?
common.HexToAddress(staking.StakingAddress), // Maybe okay?
common.HexToAddress(gov.GovAddress), // Maybe okay?
common.HexToAddress(distribution.DistrAddress), // Maybe okay?
common.HexToAddress(oracle.OracleAddress),
common.HexToAddress(ibc.IBCAddress),
common.HexToAddress(pointerview.PointerViewAddress),
common.HexToAddress(pointer.PointerAddress),
common.HexToAddress(solo.SoloAddress),
common.HexToAddress(p256.P256VerifyAddress), // Maybe okay?
01463bd to
2edce7a
Compare
Describe your changes and provide context
Added a failfast precompile to be registered on the giga executor at v2's custom precompile range, so that custom precompile calls can be intercepted and fall back to v2 executor.
Testing performed to validate your change
to be tested when the executor is ready to wire up