Closed yangby-cryptape closed 9 months ago
The exec method in executor do special operations for system contracts.
exec
https://github.com/axonweb3/axon/blob/264a67673334cdbf7e1021e5af71f21c95553fea/core/executor/src/lib.rs#L152-L153
But call method doesn't.
call
https://github.com/axonweb3/axon/blob/264a67673334cdbf7e1021e5af71f21c95553fea/core/executor/src/lib.rs#L65
When call system contracts —— for example, call eth_estimateGas —— it may lead to unexpected results.
eth_estimateGas
Also, unexpected results may be occurred when replay system contracts (ref: #1234 tried).
Do same operations for both exec and call.
Or, just reject system contracts directly in the call method.
I found that #1597 will resolve this issue.
p.s. This comment is created via GitHub CLI.
Description
Current status
The
exec
method in executor do special operations for system contracts.https://github.com/axonweb3/axon/blob/264a67673334cdbf7e1021e5af71f21c95553fea/core/executor/src/lib.rs#L152-L153
But
call
method doesn't.https://github.com/axonweb3/axon/blob/264a67673334cdbf7e1021e5af71f21c95553fea/core/executor/src/lib.rs#L65
Issues introduced by the above Design
When
call
system contracts —— for example, calleth_estimateGas
—— it may lead to unexpected results.Also, unexpected results may be occurred when replay system contracts (ref: #1234 tried).
Proposals
Do same operations for both
exec
andcall
.Or, just reject system contracts directly in the
call
method.