-
Notifications
You must be signed in to change notification settings - Fork 39
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
Should we apply the same logic to all reserved system contracts addresses? #1590
Comments
yangby-cryptape
changed the title
[Discuss] Should we apply the same logic to all reserved system contracts addresses?
Should we apply the same logic to all reserved system contracts addresses?
Nov 24, 2023
yangby-cryptape
added
the
d:confirmation
Discussion required to confirm whether it's a bug
label
Nov 24, 2023
My Humble Opinion
axon/core/executor/src/system_contract/mod.rs Lines 42 to 47 in 6a574cd
Need confirmations before coding |
Flouse
removed
agenda
d:confirmation
Discussion required to confirm whether it's a bug
labels
Nov 27, 2023
6 tasks
I think this change is not implemented. Testcurl -X POST localhost:8000 \
--data '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0xffffffffffffffffffffffffffffffffffffff04", "0x0", "latest"], "id": 1}' \
--header 'Content-Type: application/json'
# Result
{"jsonrpc":"2.0","id":1,"result":"0x00000000000000000000000000000000000000000000000000000000000004d2"} Expected resultNot allow to call system contract address ref: #1561 (comment) |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
As the following code defined:
axon/core/executor/src/system_contract/mod.rs
Lines 42 to 47 in 6a574cd
All addresses between
0xffff..ff00
and0xffff..ffff
are system contracts.But only 3 addresses in them are used.
axon/core/executor/src/system_contract/metadata/mod.rs
Line 29 in 6a574cd
axon/core/executor/src/system_contract/ckb_light_client/mod.rs
Line 20 in 6a574cd
axon/core/executor/src/system_contract/image_cell/mod.rs
Line 20 in 6a574cd
When executing a system contract, only above 3 contracts that have been clearly defined are dispatched to the system contracts process.
axon/core/executor/src/lib.rs
Lines 152 to 153 in 6a574cd
axon/core/executor/src/system_contract/mod.rs
Lines 204 to 223 in 6a574cd
Other executions which are to the reserved addresses of system contracts are processed as normal executions.
As far as we know, a normal contract and a system contract are very different.
❓ So, my question is: once a reserved system contract is enabled in the future, how to treat the difference between now and then after that?
An example of current Axon:
0xffff..ff04
is an undeployed system contract address.eth_getStorageAt
and the proofs of its storage should be generated witheth_getProof
.axon_getSystemContractStorageAt
and the proofs of its storage should be generated withaxon_getSystemContractProof
.1Should we apply the same logic to those reserved system contracts now?
Let all system contracts, even reserved system contracts:
axon_getSystemContractStorageAt
and the proofs of its storage should be generated withaxon_getSystemContractProof
.Footnotes
https://github.com/axonweb3/axon/issues/1561#issuecomment-1814445346 ↩
The text was updated successfully, but these errors were encountered: