-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Dont call precompiled programs #19930
Dont call precompiled programs #19930
Conversation
5b8c882
to
a8c405b
Compare
a8c405b
to
c172deb
Compare
c172deb
to
e03aea2
Compare
e03aea2
to
64b2b9d
Compare
Codecov Report
@@ Coverage Diff @@
## master #19930 +/- ##
========================================
Coverage 82.7% 82.8%
========================================
Files 487 485 -2
Lines 135326 134906 -420
========================================
- Hits 112036 111765 -271
+ Misses 23290 23141 -149 |
Hey @ryoqun Can you take a detailed look at the capitalization and bank hash-related changes to make sure I didn't mess anything up? Thanks! |
to be sure, this pr is compatible with mainnet-beta/testnet/devnet? |
programs/bpf/c/src/invoke/invoke.c
Outdated
@@ -588,6 +591,16 @@ extern uint64_t entrypoint(const uint8_t *input) { | |||
*accounts[ARGUMENT_INDEX].lamports += 1; | |||
break; | |||
} | |||
case TEST_CALL_PRECOMPILE: { | |||
sol_log("Test calling builtin from cpi"); |
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.
nit: builtin
=> precompiled program
like the rust counterpart?
I stumbled on devnet check (testnet, mainnet-beta isn't done still): it seems master got incompatible?
fyi, the same argument managed to catch up to the cluster with |
I believe @jeffwashington is looking into this as well. |
I'm bisecting now. mnb and master with hack |
So probably unrelated to this pr, aka, not blocking the commit of this pr? |
good work. code looks ok after all comments are addressed. thanks for working nicely according to my review comments. the remaining task before merging would be the rather very tedious live cluster manual testing (seems to be blocked by incompatible master..). |
@jeffwashington Can you ping me when you get to the bottom of master's incompatibility? |
if this pr won't be backported soon, I think it's ok to merge this pr, forgoing the live-cluster compatibility stamp. as far as I reviewed, this should be okay... ;) |
09b9de1
to
1f8ff23
Compare
1f8ff23
to
f592f0d
Compare
f592f0d
to
84ee410
Compare
This reverts commit b578765.
@@ -223,6 +223,12 @@ pub mod do_support_realloc { | |||
solana_sdk::declare_id!("75m6ysz33AfLA5DDEzWM1obBrnPQRSsdVQ2nRmc8Vuu1"); | |||
} | |||
|
|||
// Note: when this feature is cleaned up, also remove the secp256k1 program from | |||
// the list of builtins and remove its files from /programs |
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.
cross ref: #27100 (comment) at #27100
#### Problem The precompiles behave more like programs than instructions, as was decided with the new secp256r1 precompile in solana-labs#3152, but the ed25519 precompile was split as `ed25519-instructions`. #### Summary of changes Rename the crate from `solana-ed25519-instructions` to `solana-ed25519-program`, which is a previous crate that used to be used until solana-labs#19930.
* sdk: Rename ed25519-instructions -> ed25519-program #### Problem The precompiles behave more like programs than instructions, as was decided with the new secp256r1 precompile in #3152, but the ed25519 precompile was split as `ed25519-instructions`. #### Summary of changes Rename the crate from `solana-ed25519-instructions` to `solana-ed25519-program`, which is a previous crate that used to be used until solana-labs#19930. * Run cargo fmt
Problem
Should not be able to call a precompiled program directly
Summary of Changes
Ok
for all precompiled programsFixes #19843