near / stakewars-iii

Stake Wars: Episode 3 challenges and place to report issues
87 stars 177 forks source link

After deploying split contract validator can't get to proposals #114

Closed onsails closed 2 years ago

onsails commented 2 years ago

Few days ago my validator nodamatics.factory.shardnet.near had sucessfully got to proposals. When shardnet was (partially?) down I've deployed split contract. Now I'm trying to propose validator for the next era again and get weird errors.

Sometimes ping fails due to not enough stake (but others get to proposals list even with stake below seat price). Sometimes it succeeds but validator never gets to proposals list:

wb@stakewars:~/near-staking-pool-owner$ echo $NEAR_ENV
shardnet
wb@stakewars:~/near-staking-pool-owner$ near call nodamatics.factory.shardnet.near ping '{}' --accountId onsails.shardnet.near --gas=300000000000000
Scheduling a call: nodamatics.factory.shardnet.near.ping({})
Doing account.functionCall()
Retrying request to broadcast_tx_commit as it has timed out [
  'FQAAAG9uc2FpbHMuc2hhcmRuZXQubmVhcgB98FfAA9jUWvUfy/Kt64/gnC5xNgHYIKdbRmPM90kQz84qjd2OAQAAIAAAAG5vZGFtYXRpY3MuZmFjdG9yeS5zaGFyZG5ldC5uZWFyrD0fASWgG5LfstslbWFw4Vq17U9qroQ6UskgFZfJBI4BAAAAAgQAAABwaW5nAgAAAHt9AMBuMdkQAQAAAA
AAAAAAAAAAAAAAAAAAAINaWVbbVyDFzlzIBR4+0nJ7dffsT8DDWXQfD9F87zryivvaybp1aJ4YyIwm2/E4aJloX9NV8NZ2WV9yPZVcXg8='
]
Receipts: FWRFUSr6J64L1EP552XAFJKGPBhaLqXKaAEWYTminwim, 4j3zYEdZVpsEK12pubZdKoNRLZXTGuyADgWYLkemPQ3C, CqH2uZFqgxubJU6iJ8XMj7uHN4hxfv4WgA6Zw1jKW3Yc
        Log [nodamatics.factory.shardnet.near]: Epoch 79: Contract received total rewards of 4854244097837000000000 tokens. New total staked balance is 31498292189792072437208151. Total number of shares 314113378720329204
35372258
        Log [nodamatics.factory.shardnet.near]: Total rewards fee is 169429520791489498838 and burn is 1452253035355624275761 stake shares.
Receipt: 91hxuxtEmYxjGvD9ZrpPwDsEASZVLKeHfPTpn9XpVjMi
        Failure [nodamatics.factory.shardnet.near]: Error: {"index":0,"account_id":"nodamatics.factory.shardnet.near","minimum_stake":"150302785604275644600000000","stake":"31498292189792072437208151","kind":{"account_id"
:"nodamatics.factory.shardnet.near","minimum_stake":"150302785604275644600000000","stake":"31498292189792072437208151"}}
Transaction Id 8NHH7e7Dic2386cXBeS9ABQAL6zFL45dtJiF1fQ8cgh
To see the transaction in the transaction explorer, please open this url in your browser
https://explorer.shardnet.near.org/transactions/8NHH7e7Dic2386cXBeS9ABQAL6zFL45dtJiF1fQ8cgh
''
wb@stakewars:~/near-staking-pool-owner$ near call nodamatics.factory.shardnet.near ping '{}' --accountId onsails.shardnet.near --gas=300000000000000
Scheduling a call: nodamatics.factory.shardnet.near.ping({})
Doing account.functionCall()
Transaction Id BWPWdeE6qAZMCCREaiVusu1kV6T9Nb2xyTSyN1p6G4kw
To see the transaction in the transaction explorer, please open this url in your browser
https://explorer.shardnet.near.org/transactions/BWPWdeE6qAZMCCREaiVusu1kV6T9Nb2xyTSyN1p6G4kw
''
wb@stakewars:~/near-staking-pool-owner$
wb@stakewars:~/near-staking-pool-owner$ near call nodamatics.factory.shardnet.near ping '{}' --accountId onsails.shardnet.near --gas=300000000000000
Scheduling a call: nodamatics.factory.shardnet.near.ping({})
Doing account.functionCall()
Transaction Id 6iYySKxZvkPuKUj6q15Aog3xSPWAk4WavuUqe5EU5XC7
To see the transaction in the transaction explorer, please open this url in your browser
https://explorer.shardnet.near.org/transactions/6iYySKxZvkPuKUj6q15Aog3xSPWAk4WavuUqe5EU5XC7
''
wb@stakewars:~/near-staking-pool-owner$ near proposals | grep nodamatics
wb@stakewars:~/near-staking-pool-owner$ 
onsails commented 2 years ago

Just set up brand new validator matics.factory.shardnet.near, facing same problem. Will try to set up a new validator from different owner account.

onsails commented 2 years ago

Exatly same problem from another new account with brand new validator. For some reason create_staking_pool and deposit_and_stake complain stake being blow seat price.

wb@stakewars:~/nearcore$ near generate-key nodamatics-ng2.factory.shardnet.near
Key pair with ed25519:8QPHfqNPv5uJ83MhsAFypy24hRf3XqCab8P8bxaTYqoE public key for an account "nodamatics-ng2.factory.shardnet.near"
wb@stakewars:~/nearcore$ cp ~/.near-credentials/shardnet/nodamatics-ng2.factory.shardnet.near.json ~/.near/validator_key.json
wb@stakewars:~/nearcore$ vim ~/.near/validator_key.json
wb@stakewars:~/nearcore$ near call factory.shardnet.near create_staking_pool '{"staking_pool_id": "nodamatics-ng2", "owner_id": "onsails2.shardnet.near", "stake_public_key": "ed25519:8QPHfqNPv5uJ83MhsAFypy24hRf3XqCab8P8bxaTYqoE", "reward_fee_fraction": {"numerator": 5, "denominator": 100}, "code_hash":"DD428g9eqLL8fWUxv8QSpVFzyHi1Qd16P8ephYCTmMSZ"}' --accountId="onsails2.shardnet.near" --amount=30 --gas=300000000000000
Scheduling a call: factory.shardnet.near.create_staking_pool({"staking_pool_id": "nodamatics-ng2", "owner_id": "onsails2.shardnet.near", "stake_public_key": "ed25519:8QPHfqNPv5uJ83MhsAFypy24hRf3XqCab8P8bxaTYqoE", "reward_fee_fraction": {"numerator": 5, "denominator": 100}, "code_hash":"DD428g9eqLL8fWUxv8QSpVFzyHi1Qd16P8ephYCTmMSZ"}) with attached 30 NEAR
Doing account.functionCall()
Retrying request to broadcast_tx_commit as it has timed out [
  'FgAAAG9uc2FpbHMyLnNoYXJkbmV0Lm5lYXIATEDfgSafBIBMB9O3DNuz7KS4qfel9bH3y1+PyTNRhz/BYIp6IwIAABUAAABmYWN0b3J5LnNoYXJkbmV0Lm5lYXKegNsm1luEbvUe9DeCZKvTIsKYx+kD0ElA36sdMJXk/QEAAAACEwAAAGNyZWF0ZV9zdGFraW5nX3Bvb2wFAQAAeyJzdGFraW5nX3Bvb2xfaWQiOiJub2RhbWF0aWNzLW5nMiIsIm93bmVyX2lkIjoib25zYWlsczIuc2hhcmRuZXQubmVhciIsInN0YWtlX3B1YmxpY19rZXkiOiJlZDI1NTE5OjhRUEhmcU5QdjV1SjgzTWhzQUZ5cHkyNGhSZjNYcUNhYjhQOGJ4YVRZcW9FIiwicmV3YXJkX2ZlZV9mcmFjdGlvbiI6eyJudW1lcmF0b3IiOjUsImRlbm9taW5hdG9yIjoxMDB9LCJjb2RlX2hhc2giOiJERDQyOGc5ZXFMTDhmV1V4djhRU3BWRnp5SGkxUWQxNlA4ZXBoWUNUbU1TWiJ9AMBuMdkQAQAAAADe2AM8Qr/QGAAAAAAAANnlQwOAy/Upak3IJ24EGLQ+xSuCedy4sTi/4wUyaWI/FZPtKgBVfK+QQPjxK4LFjscB9vXjG/w5MwHvERvwWQo='
]
Receipt: 8pEeuiX7HYYvRpGxwBVZHcyEYRcMBtjLbjY9RNNuB4sX
        Failure [factory.shardnet.near]: Error: {"index":0,"account_id":"nodamatics-ng2.factory.shardnet.near","minimum_stake":"220911698895635235511575541","stake":"29999999999999000000000000","kind":{"account_id":"nodamatics-ng2.factory.shardnet.near","minimum_stake":"220911698895635235511575541","stake":"29999999999999000000000000"}}
Receipts: 77KXXJT5FADc9xtN5HQqg8aM3qzkBLKfVAZD5cBLKk1k, AJ9MvZvE26h8167rXhW86LxXRB4E7XRrzqa3W9crcKFy
        Log [factory.shardnet.near]: The staking pool @nodamatics-ng2.factory.shardnet.near was successfully created. Whitelisting...
Transaction Id HwLTagRrojHeZMzXfqs68ukWJv2wdXwfZVF1CUkJbSiM
To see the transaction in the transaction explorer, please open this url in your browser
https://explorer.shardnet.near.org/transactions/HwLTagRrojHeZMzXfqs68ukWJv2wdXwfZVF1CUkJbSiM
''
wb@stakewars:~/nearcore$ near call nodamatics-ng2.factory.shardnet.near ping '{}' --accountId onsails2.shardnet.near --gas=300000000000000
Scheduling a call: nodamatics-ng2.factory.shardnet.near.ping({})
Doing account.functionCall()
Transaction Id 9eG6iW8weh8g17AZwT5D6V7a1TmoMf983GeUjfBRNo1v
To see the transaction in the transaction explorer, please open this url in your browser
https://explorer.shardnet.near.org/transactions/9eG6iW8weh8g17AZwT5D6V7a1TmoMf983GeUjfBRNo1v
''
wb@stakewars:~/nearcore$ near call nodamatics-ng2.factory.shardnet.near deposit_and_stake --amount 1 --accountId onsails2.shardnet.near --gas=300000000000000
Scheduling a call: nodamatics-ng2.factory.shardnet.near.deposit_and_stake() with attached 1 NEAR
Doing account.functionCall()
Receipts: 9itTrdwx9VQMmB5J7jZhrBz1jUU9kcnT6qGeVu7q4zjx, 6vLq3aDTFNimjvBP6oojpc8khiwBVdXozobw5dh4yY9p, 7WrZ1Nd9jn9nUH4U7RdLQxs1irdw3UEBvsJhSQGVe4Yc
        Log [nodamatics-ng2.factory.shardnet.near]: @onsails2.shardnet.near deposited 1000000000000000000000000. New unstaked balance is 1000000000000000000000000
        Log [nodamatics-ng2.factory.shardnet.near]: @onsails2.shardnet.near staking 1000000000000000000000000. Received 1000000000000000000000000 new staking shares. Total 0 unstaked balance and 2000000000000000000000000 staking shares
        Log [nodamatics-ng2.factory.shardnet.near]: Contract total staked balance is 31999999999999000000000000. Total number of shares 31999999999999000000000000
Receipt: 2JGacxJn3zJb3oQUpXV8jirKng3nbW2tvcF1v89Ewz2n
        Failure [nodamatics-ng2.factory.shardnet.near]: Error: {"index":0,"account_id":"nodamatics-ng2.factory.shardnet.near","minimum_stake":"220911698895635235511575541","stake":"31999999999999000000000000","kind":{"account_id":"nodamatics-ng2.factory.shardnet.near","minimum_stake":"220911698895635235511575541","stake":"31999999999999000000000000"}}
Transaction Id HKWhGG3fdzzYxYu6Avsrdi7AP2dqrJ4UHdXtgpPKKaWJ
To see the transaction in the transaction explorer, please open this url in your browser
https://explorer.shardnet.near.org/transactions/HKWhGG3fdzzYxYu6Avsrdi7AP2dqrJ4UHdXtgpPKKaWJ
''
wb@stakewars:~/nearcore$ near call nodamatics-ng2.factory.shardnet.near ping '{}' --accountId onsails2.shardnet.near --gas=300000000000000
Scheduling a call: nodamatics-ng2.factory.shardnet.near.ping({})
Doing account.functionCall()
Transaction Id 26PBy8FjprfgNVULn82Uu8FLk8nQoh4vSKAA92w9Gd9k
To see the transaction in the transaction explorer, please open this url in your browser
https://explorer.shardnet.near.org/transactions/26PBy8FjprfgNVULn82Uu8FLk8nQoh4vSKAA92w9Gd9k
''
wb@stakewars:~/nearcore$ near proposals | grep nodamatics-ng2
wb@stakewars:~/nearcore$
onsails commented 2 years ago

Fixed the problem by staking ~250 near more. There is a minimum stake to get into proposals list.