-
Notifications
You must be signed in to change notification settings - Fork 248
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
near-sdk-sim calculates storage incorrectly #388
Comments
Hmm. It looks like it uses old protocol version for some reason. Let me investigate. |
@evgenykuzyakov Yeah I think we need to republish the nearcore crates. |
I think the issue is the |
* Expose `cur_block` and `genesis_config` from `RuntimeStandalone`. This allows to manipulate block time, e.g. set to a given timestamp. * Use `RuntimeConfig::from_protocol_version` that fixes storage costs issue. Fixes: #388 * Set root account balance to one billion tokens. ## Test plan: - Modify FT test to verify storage cost fix by limiting initial deposit to 5 NEAR. It is not enough with old storage cost (50kb) and enough with new storage cost (500kb) * make block time configurable to sim contract tests that depend on env::block_time * Update near-sdk-sim/src/runtime.rs Co-authored-by: Aleksey Kladov <[email protected]> * use block_prod_time name to make it matches nearcore * Expose cur_block. Fix storage cost * Fix initial supply * Modify FT test to verify storage cost fix * Rework RuntimeConfig from genesis Co-authored-by: Bo Yao <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
Publishing [3.2.0] now. It should have correct storage cost per byte. |
For example, I'm trying to deploy wrap near contract with 10 NEAR. It works on the testnet, but doesn't work in the simulator tests.
It looks like the simulator uses different storage per byte and fails with the following:
The text was updated successfully, but these errors were encountered: