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

Regression in neard testnet behavior #4569

Closed
frol opened this issue Jul 26, 2021 · 3 comments · Fixed by #4709
Closed

Regression in neard testnet behavior #4569

frol opened this issue Jul 26, 2021 · 3 comments · Fixed by #4709
Assignees
Labels
A-genesis Area: issues that are related to genesis A-testing Area: Unit testing / integration testing C-bug Category: This is a bug T-public-interfaces Team: issues relevant to the public interfaces team

Comments

@frol
Copy link
Collaborator

frol commented Jul 26, 2021

Describe the bug

There is a regression in the default behavior of testnet neard subcommand between 1.19.2 and 1.20.0, which caused nayduck tests to fail: #4464 (comment). Initializing a new cluster of localnet nodes for testing now has the following values:

   "num_block_producer_seats_per_shard": [
-    4
+    1,
+    1,
+    1,
+    1
   ],
   "avg_hidden_validator_seats_per_shard": [
+    0,
+    0,
+    0,
     0
   ],

Full genesis.json diffs:

--- /tmp/near-1.19.2/node0/genesis.json	2021-07-26 15:35:35.583899833 +0200
+++ /tmp/near-1.20.0/node0/genesis.json	2021-07-26 15:35:45.384005185 +0200
@@ -1,13 +1,19 @@
 {
-  "protocol_version": 45,
-  "genesis_time": "2021-07-26T13:35:35.595752612Z",
-  "chain_id": "test-chain-44x3g",
+  "protocol_version": 46,
+  "genesis_time": "2021-07-26T13:35:45.392565119Z",
+  "chain_id": "test-chain-kBWkp",
   "genesis_height": 0,
   "num_block_producer_seats": 4,
   "num_block_producer_seats_per_shard": [
-    4
+    1,
+    1,
+    1,
+    1
   ],
   "avg_hidden_validator_seats_per_shard": [
+    0,
+    0,
+    0,
     0
   ],
   "dynamic_resharding": false,
@@ -154,6 +160,9 @@
         "keccak256_byte": 21471105,
         "keccak512_base": 5811388236,
         "keccak512_byte": 36649701,
+        "ripemd160_base": 853675086,
+        "ripemd160_block": 680107584,
+        "ecrecover_base": 3365369625000,
         "log_base": 3543313050,
         "log_byte": 13198791,
         "storage_write_base": 64196736000,
@@ -203,6 +212,7 @@
         "max_arguments_length": 4194304,
         "max_length_returned_data": 4194304,
         "max_contract_size": 4194304,
+        "max_transaction_size": 4194304,
         "max_length_storage_key": 4194304,
         "max_length_storage_value": 4194304,
         "max_promises_per_function_call_action": 1024,
@@ -258,7 +268,8 @@
           "amount": "950000000000000000000000000000000",
           "locked": "50000000000000000000000000000000",
           "code_hash": "11111111111111111111111111111111",
-          "storage_usage": 0
+          "storage_usage": 0,
+          "version": "V1"
         }
       }
     },
@@ -279,7 +290,8 @@
           "amount": "950000000000000000000000000000000",
           "locked": "50000000000000000000000000000000",
           "code_hash": "11111111111111111111111111111111",
-          "storage_usage": 0
+          "storage_usage": 0,
+          "version": "V1"
         }
       }
     },
@@ -300,7 +312,8 @@
           "amount": "950000000000000000000000000000000",
           "locked": "50000000000000000000000000000000",
           "code_hash": "11111111111111111111111111111111",
-          "storage_usage": 0
+          "storage_usage": 0,
+          "version": "V1"
         }
       }
     },
@@ -321,7 +334,8 @@
           "amount": "950000000000000000000000000000000",
           "locked": "50000000000000000000000000000000",
           "code_hash": "11111111111111111111111111111111",
-          "storage_usage": 0
+          "storage_usage": 0,
+          "version": "V1"
         }
       }
     },
@@ -342,7 +356,8 @@
           "amount": "1000000000000000000000000000000000",
           "locked": "0",
           "code_hash": "11111111111111111111111111111111",
-          "storage_usage": 0
+          "storage_usage": 0,
+          "version": "V1"
         }
       }
     },

To Reproduce

./near-1.19.2 --home /tmp/near-1.19.2 testnet
./near-1.20.0 --home /tmp/near-1.20.0 testnet

Expected behavior

I am not sure if that is expected, and what exactly the cause for that.

Version (please complete the following information):

  • nearcore commit/branch: 1.19.x vs 1.20.x
  • localnet
@frol frol added C-bug Category: This is a bug A-testing Area: Unit testing / integration testing A-genesis Area: issues that are related to genesis labels Jul 26, 2021
@bowenwang1996 bowenwang1996 added the T-node Team: issues relevant to the node experience team label Jul 26, 2021
@bowenwang1996 bowenwang1996 removed their assignment Jul 26, 2021
@bowenwang1996
Copy link
Collaborator

This looks like an unexpected change in the testnet command of neard

@frol
Copy link
Collaborator Author

frol commented Aug 4, 2021

@miraclx Can you, please, identify what introduced the change to num_block_producer_seats_per_shard and avg_hidden_validator_seats_per_shard values? If that is trivial to fix, feel free to submit a PR.

@bowenwang1996 bowenwang1996 added T-public-interfaces Team: issues relevant to the public interfaces team and removed T-node Team: issues relevant to the node experience team labels Aug 17, 2021
@mzhangmzz mzhangmzz assigned mzhangmzz and unassigned miraclx Aug 18, 2021
@mzhangmzz
Copy link
Contributor

near-bulldozer bot pushed a commit that referenced this issue Aug 18, 2021
fixes #4464 
fixes #4569

Test plan: verify the genesis config generated is the same as 1.19.2

``` 
$ nearcore-1 git:(ebc1e0a) diff /Users/minzhang/.near-1.19.2/test0/genesis.json /Users/minzhang/.near-now/test0/genesis.json
2,4c2,4
<   "protocol_version": 45,
<   "genesis_time": "2021-08-18T15:45:26.235826Z",
<   "chain_id": "test-chain-WLJhS",
---
>   "protocol_version": 47,
>   "genesis_time": "2021-08-18T15:40:31.252129Z",
>   "chain_id": "test-chain-b25OT",
156a157,159
>         "ripemd160_base": 853675086,
>         "ripemd160_block": 680107584,
>         "ecrecover_base": 3365369625000,
205a209
>         "max_transaction_size": 4194304,
242a247
>   "simple_nightshade_shard_config": null,
251c256,257
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
272c278,279
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
293c300,301
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"```
mzhangmzz added a commit that referenced this issue Aug 20, 2021
fixes #4464 
fixes #4569

Test plan: verify the genesis config generated is the same as 1.19.2

``` 
$ nearcore-1 git:(ebc1e0a) diff /Users/minzhang/.near-1.19.2/test0/genesis.json /Users/minzhang/.near-now/test0/genesis.json
2,4c2,4
<   "protocol_version": 45,
<   "genesis_time": "2021-08-18T15:45:26.235826Z",
<   "chain_id": "test-chain-WLJhS",
---
>   "protocol_version": 47,
>   "genesis_time": "2021-08-18T15:40:31.252129Z",
>   "chain_id": "test-chain-b25OT",
156a157,159
>         "ripemd160_base": 853675086,
>         "ripemd160_block": 680107584,
>         "ecrecover_base": 3365369625000,
205a209
>         "max_transaction_size": 4194304,
242a247
>   "simple_nightshade_shard_config": null,
251c256,257
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
272c278,279
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
293c300,301
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"```
mzhangmzz added a commit that referenced this issue Aug 20, 2021
fixes #4464 
fixes #4569

Test plan: verify the genesis config generated is the same as 1.19.2

``` 
$ nearcore-1 git:(ebc1e0a) diff /Users/minzhang/.near-1.19.2/test0/genesis.json /Users/minzhang/.near-now/test0/genesis.json
2,4c2,4
<   "protocol_version": 45,
<   "genesis_time": "2021-08-18T15:45:26.235826Z",
<   "chain_id": "test-chain-WLJhS",
---
>   "protocol_version": 47,
>   "genesis_time": "2021-08-18T15:40:31.252129Z",
>   "chain_id": "test-chain-b25OT",
156a157,159
>         "ripemd160_base": 853675086,
>         "ripemd160_block": 680107584,
>         "ecrecover_base": 3365369625000,
205a209
>         "max_transaction_size": 4194304,
242a247
>   "simple_nightshade_shard_config": null,
251c256,257
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
272c278,279
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
293c300,301
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"```
mzhangmzz added a commit that referenced this issue Aug 20, 2021
fixes #4464 
fixes #4569

Test plan: verify the genesis config generated is the same as 1.19.2

``` 
$ nearcore-1 git:(ebc1e0a) diff /Users/minzhang/.near-1.19.2/test0/genesis.json /Users/minzhang/.near-now/test0/genesis.json
2,4c2,4
<   "protocol_version": 45,
<   "genesis_time": "2021-08-18T15:45:26.235826Z",
<   "chain_id": "test-chain-WLJhS",
---
>   "protocol_version": 47,
>   "genesis_time": "2021-08-18T15:40:31.252129Z",
>   "chain_id": "test-chain-b25OT",
156a157,159
>         "ripemd160_base": 853675086,
>         "ripemd160_block": 680107584,
>         "ecrecover_base": 3365369625000,
205a209
>         "max_transaction_size": 4194304,
242a247
>   "simple_nightshade_shard_config": null,
251c256,257
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
272c278,279
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
293c300,301
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"```
mzhangmzz added a commit that referenced this issue Sep 7, 2021
fixes #4464 
fixes #4569

Test plan: verify the genesis config generated is the same as 1.19.2

``` 
$ nearcore-1 git:(ebc1e0a) diff /Users/minzhang/.near-1.19.2/test0/genesis.json /Users/minzhang/.near-now/test0/genesis.json
2,4c2,4
<   "protocol_version": 45,
<   "genesis_time": "2021-08-18T15:45:26.235826Z",
<   "chain_id": "test-chain-WLJhS",
---
>   "protocol_version": 47,
>   "genesis_time": "2021-08-18T15:40:31.252129Z",
>   "chain_id": "test-chain-b25OT",
156a157,159
>         "ripemd160_base": 853675086,
>         "ripemd160_block": 680107584,
>         "ecrecover_base": 3365369625000,
205a209
>         "max_transaction_size": 4194304,
242a247
>   "simple_nightshade_shard_config": null,
251c256,257
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
272c278,279
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"
293c300,301
<           "storage_usage": 0
---
>           "storage_usage": 0,
>           "version": "V1"```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-genesis Area: issues that are related to genesis A-testing Area: Unit testing / integration testing C-bug Category: This is a bug T-public-interfaces Team: issues relevant to the public interfaces team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants