-
Notifications
You must be signed in to change notification settings - Fork 624
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
fix: Add v53 to config store #6556
Conversation
When updating near#6397 to protocol v53 right before merging, I forgot to add the configuration JSON file to the config store. Test plan --------- Added a test to verify that cost indeed increases.
let tip = env.clients[0].chain.head().unwrap(); | ||
let signed_transaction = | ||
Transaction { nonce: 10, block_hash: tip.last_block_hash, ..tx.clone() }.sign(&signer); | ||
let tx_hash = signed_transaction.get_hash(); | ||
env.clients[0].process_tx(signed_transaction, false, false); | ||
for i in 0..epoch_length { | ||
env.produce_block(0, tip.height + i + 1); | ||
} | ||
env.clients[0].chain.get_final_transaction_result(&tx_hash).unwrap() |
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.
Perhaps wrap it in a closure so we can reuse it rather than duplicating the same code? This will make it obvious that we deploy the exact same contract.
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.
Yeah I like that. Done.
let old_protocol_version = 52; | ||
let new_protocol_version = 53; |
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.
Alternatively I would introduce a protocol feature like IncreaseDeploymentCost
and use its protocol version (- 1).
I think of a scenario when we can postpone this feature to the v54 due to emergency reasons. Then it will be natural to modify protocol version of feature in the version.rs
, but it can be easy to forget to fix two numbers in some test.
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.
You are right, I have now added this as an explicit protocol feature.
1) Add ProtocolFeature::IncreaseDeploymentCost 2) Move duplicated code into closure
Thank you! |
When updating #6397 to protocol v53 right before merging,
I forgot to add the configuration JSON file to the config store.
Test plan
Added a test to verify that cost indeed increases.