Skip to content
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

Skip EVM nonce check until Changi Intermediate fork #2093

Merged
merged 3 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/masternodes/mn_checks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3905,9 +3905,12 @@ class CCustomTxApplyVisitor : public CCustomTxVisitor {
CrossBoundaryResult result;
const auto hashAndGas = evm_try_prevalidate_raw_tx(result, HexStr(obj.evmTx), true);

if (!result.ok) {
LogPrintf("[evm_try_prevalidate_raw_tx] failed, reason : %s\n", result.reason);
return Res::Err("evm tx failed to validate %s", result.reason);
// Completely remove this fork guard on mainnet upgrade to restore nonce check from EVM activation
if (height >= static_cast<uint32_t>(consensus.ChangiIntermediateHeight)) {
if (!result.ok) {
LogPrintf("[evm_try_prevalidate_raw_tx] failed, reason : %s\n", result.reason);
return Res::Err("evm tx failed to validate %s", result.reason);
}
}

evm_try_queue_tx(result, evmContext, HexStr(obj.evmTx), tx.GetHash().ToArrayReversed());
Expand Down
2 changes: 1 addition & 1 deletion test/functional/feature_evm_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
self.extra_args = [
['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=51', '-eunosheight=80', '-fortcanningheight=82', '-fortcanninghillheight=84', '-fortcanningroadheight=86', '-fortcanningcrunchheight=88', '-fortcanningspringheight=90', '-fortcanninggreatworldheight=94', '-fortcanningepilogueheight=96', '-grandcentralheight=101', '-nextnetworkupgradeheight=105', '-subsidytest=1', '-txindex=1'],
['-dummypos=0', '-txnotokens=0', '-amkheight=50', '-bayfrontheight=51', '-eunosheight=80', '-fortcanningheight=82', '-fortcanninghillheight=84', '-fortcanningroadheight=86', '-fortcanningcrunchheight=88', '-fortcanningspringheight=90', '-fortcanninggreatworldheight=94', '-fortcanningepilogueheight=96', '-grandcentralheight=101', '-nextnetworkupgradeheight=105', '-changiintermediateheight=105', '-subsidytest=1', '-txindex=1'],
]

def setup(self):
Expand Down