-
Notifications
You must be signed in to change notification settings - Fork 622
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
feat: stabilize LowerRegularOpCost2 #5365
feat: stabilize LowerRegularOpCost2 #5365
Conversation
3e5e09d
to
699f59f
Compare
631a613
to
3302578
Compare
Don't seem able to do a nayduck run:
Given that this is just a cost change, it's quite unlikely that nayduck uncovers some further problems. |
3302578
to
0af654c
Compare
0af654c
to
bbb0546
Compare
Let's merge it to unblock #5361, but I would appreciate another look at the changes, to make sure I didn't mess up protocol version upgrade. cc @Longarithm |
@mina86 please take a look |
Scheduling works:
But there does seem to be an issue with login flow. Looking. |
Should work now. |
Feature to stabilize
Lower wasm opcode cost from 2_207_874 to 822_756. See ae9241c for details, but the main contributor here is that we use intrinsics-based gas counter implementation, which preserves semantics, but makes things faster.
Testing and QA
The overall approach is to make gas counting faster, while preserving the semantics exactly, so we need only to verify that behavior stays the same. New gas counter implementation passes all our tests, and was fuzzed against the old implementation. Additionally, during the implementation we introduced a suite of new unit-tests to cover previously uncovered gas counter behavior. We haven't yet run the history replay tool, that's on todo list at the moment. The magnitude of improvement seems reasonable, and matches our back-of-the-envelope calculations (comparing with gas conting completely disabled). Additionally, we still have 3x safety multiplier for the wasm cost.
It's important to note that what this PR stabilizes is only the cost reduction. The change to the implementation of gas counter is enabled unconditionally, and is where the most risk lies.
Premortem
Suppose that we stabilized this feature, and things did go wrong. What could be the issue?
Checklist
./scripts/nayduck.py -t nightly/nightly.txt
, docs): http://nayduck.near.org/Unreleased
section.