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

Fix deposits on the testnet #205

Closed
2 of 4 tasks
troggy opened this issue Jan 15, 2020 · 5 comments
Closed
2 of 4 tasks

Fix deposits on the testnet #205

troggy opened this issue Jan 15, 2020 · 5 comments

Comments

@troggy
Copy link
Member

troggy commented Jan 15, 2020

Problem:
Since deposit 156, no deposits are not created on a testnet.

Reason:
Deposit 157 was a NFT token with value of "0", which wasn't processed by the node due to the deposit output validation error:

Dec 20 15:59:53 ip-172-31-31-90 leap-node[26799]: unhandledRejection Error: Output value is < 1
Dec 20 15:59:53 ip-172-31-31-90 leap-node[26799]:     at new Output (/usr/local/share/.config/yarn/global/node_modules/leap-core/dist/output.js:66:13)
Dec 20 15:59:53 ip-172-31-31-90 leap-node[26799]:     at Function.deposit (/usr/local/share/.config/yarn/global/node_modules/leap-core/dist/transaction.js:571:61)
Dec 20 15:59:53 ip-172-31-31-90 leap-node[26799]:     at Object.NewDeposit (/usr/local/share/.config/yarn/global/node_modules/leap-node/src/eventsRelay.js:63:23)

Since then all the deposits are rejected with

2020-01-13T13:54:30.380Z leap-node:error Deposit ID skipping ahead. want 157, found 158
Jan 13 13:55:33 ip-172-31-40-151 leap-node[25849]: 2020-01-13T13:55:33.411Z leap-node:error Deposit ID skipping ahead. want 157, found 159

Resolution:

  • fix leap-core to allow zero values for NFTs and NSTs. Fixed in allow NFTs with 0 id leap-core#169
  • verify the fix on a readonly node (5.4.1 with patch fix applied)
  • release leap-node 6.0.0 with fixed leap-core (only that fix on top of 5.4.1, nothing else from master)
  • upgrade testnet nodes to use leap-node 6.0.0. Will require coordinated update for both validators
@johannbarbie
Copy link
Member

just out of interest, why 5.4 and not 5.5?

@troggy
Copy link
Member Author

troggy commented Jan 15, 2020

because it is just a bug fix?

@troggy
Copy link
Member Author

troggy commented Jan 15, 2020

I'm not sure how to apply semver rule here. Technically, 5.4.1 and patched version will process 0 NFTs differently and won't be compatible with each other on that matter, so this probably means the version should be 6.0.0 :)

@johannbarbie great point on the version

@johannbarbie
Copy link
Member

a small bug for consensus, a big leap for semver 🤣

@troggy
Copy link
Member Author

troggy commented Feb 17, 2020

fix released in leap-node@6.0.0 and is now live on testnet

@troggy troggy closed this as completed Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants