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

Upgrade go perun to 0.8.0 #230

Merged

Conversation

manoranjith
Copy link
Contributor

@manoranjith manoranjith commented Dec 6, 2021

Description

Upgrade go-perun to the latest version. This also upgrades the version of go-ethereum to v1.10.12.

Apart from a few minor changes, the major changes are

  1. Deprecation of Register method on Channel. This logic for closing a channel has been updated accordingly.
  2. Use of external watching component.
Category

Implementation Task

Relevant issue

Closes #232.

Testing

All existing tests should continue to pass.

Checklist

  • Name is added to the NOTICE file, if it is not present already.
  • Changes are rebased onto the target branch.

@project-bot project-bot bot added this to Task in Progress in perun Dec 6, 2021
@project-bot project-bot bot moved this from Task in Progress to PR Review Requested in perun Dec 7, 2021
danielksan81
danielksan81 previously approved these changes Dec 22, 2021
Copy link
Contributor

@danielksan81 danielksan81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Re-org resistant transactions for ethereum backend was released in
  go-perun v0.8.0.

- The number of blocks to wait before considering a transaction to be
  final has to be passed as an additional parameter to
  NewContractBackend function.

Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Previously, a channel has to be registered by explicitly calling
  Register, before it can be settled.

- Now, settle implicitly registers the channel and the Register has
  been deprecated.

- So, usage of Register is removed and usage of Settle is updated.

- Also, update the mock tests in channel_test to test for the updated
  logic.

Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- In v0.8.0, watching component was externalized from the client.

- Now, it should be separately initiaized and passed on when
  initializing the client.

Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
- Previously, the notification was sent after the Close call returned.
  So, using an unbuffered channel and receiving the notification after
  the Close call had returned worked.

- Now, the notification is sent as a part of the Close call. So, the
  test goes into a deadlock state where, Close call is blocked, waiting
  for the notification to be read and test waits for the Close call to
  return, only after which the notification will be read.

- Fix, is to use a buffered channel for receiving notifications. So,
  that Close call can return and the test can read the notification.

Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
Copy link
Contributor

@danielksan81 danielksan81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@manoranjith manoranjith merged commit 4fff973 into hyperledger-labs:develop Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
perun
PR Review Requested
Development

Successfully merging this pull request may close these issues.

None yet

2 participants