-
Notifications
You must be signed in to change notification settings - Fork 44
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: add connext vector support #1938
Conversation
0f79a94
to
44a7ab5
Compare
ea659e0
to
6c9a12a
Compare
6c9a12a
to
eb40068
Compare
eb40068
to
2644404
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I have one more architectural question: who pays for the gas of the withdrawals from channels?
lib/connextclient/ConnextClient.ts
Outdated
const blockHeight = await this.getHeight(); | ||
const timelock = expiry - blockHeight; | ||
// The timelock can be up to 10 blocks less than the agreed upon value | ||
const TIMELOCK_BUFFER = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's arbitrary. Can you recommend a better value?
amount: amount.toLocaleString('fullwide', { useGrouping: false }), | ||
assetId: this.tokenAddresses.get(currency), | ||
recipient: destination, | ||
fee: '120', // TODO: estimate fee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be done with a call to the eth provider: eth_gasPrice
What is the default value when it is not set here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will address this in a separate PR. Static "120" works for simnet.
76c3a11
to
67da614
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked closely through the changes to the test code yet but I can give that a review as well after tests are passing or if we're having trouble getting tests to pass.
ce1bac6
to
b2fce21
Compare
The user, it's deducted from the channel balance. |
b2fce21
to
914f281
Compare
914f281
to
d850f7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me. What is the plan for re-enabling the simulation tests that have been commented out? And would it make sense to comment out the connext related instability tests rather than simply deleting them, if we plan to re-enable them in the near future?
We definitely want to get simulation tests going for v2 as well, but not in this PR. I'll create follow up issues from xud-docker/xud side once the current PRs are ready to merge.
I did remove/disable v1 connext simtests in a separate PR (#2008) so that if we get around to enable v2 we can easily see the history of what was deleted (instead of going through git history). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to having this all work! Thanks.
ExchangeUnion/xud-docker#770