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

Update Perun demos to go-perun 0.10.6 #17

Merged
merged 16 commits into from
Aug 20, 2024
Merged

Conversation

iljabvh
Copy link
Contributor

@iljabvh iljabvh commented Mar 16, 2023

No description provided.

@iljabvh iljabvh linked an issue Mar 16, 2023 that may be closed by this pull request
6 tasks
@iljabvh iljabvh self-assigned this Mar 16, 2023
@iljabvh iljabvh requested a review from janbormet March 16, 2023 10:19
@iljabvh iljabvh assigned iljabvh and unassigned iljabvh Mar 16, 2023
…lity to go-perun 0.10.6

* client: Modify go-perun methods
* workflow: Set ganache to latest

Signed-off-by: Ilja von Hoessle <ilja@perun.network>
@iljabvh iljabvh changed the title Payment channel demo is now compatible with go-perun 0.10.6 Update Perun demos to go-perun 0.10.6 Sep 4, 2023
run: |
docker run --rm --name ganache --detach --publish 8545:8545 ${{ env.gananache-image }} --account $KEY_DEPLOYER,$BALANCE --account $KEY_ALICE,$BALANCE --account $KEY_BOB,$BALANCE --blockTime=5
docker run --rm --name ganache --detach --publish 8545:8545 trufflesuite/ganache:latest --account $KEY_DEPLOYER,$BALANCE --account $KEY_ALICE,$BALANCE --account $KEY_BOB,$BALANCE --blockTime=5 --gasPrice=0
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably want to continue using ${{ env.gananache-image }} as defined above?

Why are you using --gasPrice=0 here?

Cheers!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi,
the goal of this PR is to update each demo to go-perun v0.10.6 one after another without breaking any non-updated. Ideally, the versions of the other tools/repositories should be bumped as well. In this case, the payment-channel demo did not work with v6.12.2, as defined in env, so I have changed it to latest. If I would have defined trufflesuite/ganache:latest to be in env, used by every Ethereum demo in this repository, it might have broken the other Ethereum demos in the CI, which we want to avoid.

Concerning the --gasPrice=0 setting, I simply follow the README of that demo. Whether or not this is reasonable, is out of scope of this PR.

Best regards

Copy link
Contributor

Choose a reason for hiding this comment

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

Concerning the --gasPrice=0 setting, I simply follow the README of that demo. Whether or not this is reasonable, is out of scope of this PR.

I see, might have been an oversight in the review then. I would usually suggest to run without setting gas price to 0, especially in the CI, as it tests for a more realistic setting.

Btw: Tutorial also does not set gas price, which is probably review more carefully.
https://labs.hyperledger.org/perun-doc/go-perun/payment_tutorial/test.html
If you want to be consistent, I suggest you rather change the README.

Regarding the first point: I typically recommend to use a fixed version in the CI, because you will get stable behavior over time. I understand that you want to use different ganache versions (what was the reason again for why the new version doesn't work with the old ganache?), you could still create a variable for the new version as before.

Anyways, not my responsibility anymore :D
Just saw this and thought I added a few comments on this open source review... All the best!

iljabvh and others added 5 commits December 8, 2023 15:06
…lity to go-perun 0.10.6

* client: Modify go-perun methods
* workflow: Set ganache to latest

Signed-off-by: Ilja von Hoessle <ilja@perun.network>
Signed-off-by: Minh Huy Tran <huy.tranminh2804@gmail.com>
Signed-off-by: Minh Huy Tran <huy.tranminh2804@gmail.com>
…an up

Signed-off-by: Minh Huy Tran <huy.tranminh2804@gmail.com>
@@ -61,7 +61,7 @@ func deployContracts(nodeURL string, chainID uint64, privateKey string) (adj, ah
panic(err)
}

const gasLimit = 2200000 // Must be sufficient for deploying TicTacToe.sol.
const gasLimit = 2200000 // Must be sufficient for deploying TicTacToeApp.sol.
Copy link
Contributor

Choose a reason for hiding this comment

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

this is needed because previous gasLimit is not sufficient to deploy app.

Copy link
Contributor

Choose a reason for hiding this comment

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

Update the outdated bindings generation script to the newest version of solc and abigen.

Copy link
Contributor

Choose a reason for hiding this comment

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

App need to be upated to solidity 0.8.0 to match the template used by the perun-eth-backend and perun-eth-contracts

Signed-off-by: Minh Huy Tran <huy.tranminh2804@gmail.com>
Signed-off-by: Minh Huy Tran <huy.tranminh2804@gmail.com>
Signed-off-by: Minh Huy Tran <huy.tranminh2804@gmail.com>
… update

Signed-off-by: Minh Huy Tran <huy.tranminh2804@gmail.com>
…acts still need update

Signed-off-by: Minh Huy Tran <huy.tranminh2804@gmail.com>
Signed-off-by: Minh Huy Tran <huy@perun.network>
@NhoxxKienn
Copy link
Contributor

NhoxxKienn commented Apr 18, 2024

WARNING: Payment Channel Dot example depends on perun-polkadot-backend and perun-polkadot-node. The following changes must be made before continuing:

  1. perun-polkadot-pallet PR
  2. Perun-polkadot-node PR (only after pallet was merged and dependency was updated)
  3. Perun-polkadot-backend PR (Only after Node was merged)
  4. Container registry for perun-polkadot-node (Needed to run Payment-Channel-DOT CI)

Afterward, the dependency in payment-channel-dot/go.mod must be passed to a stable version, and also the ci.yml for the payment-channel-dot case.

Note: It is also recommended to update the README.md for payment-channel-dot to use the new polkadot-node registry to avoid cloning and building the repo.

Signed-off-by: Minh Huy Tran <huy@perun.network>
NhoxxKienn and others added 2 commits April 29, 2024 10:44
Signed-off-by: Minh Huy Tran <huy@perun.network>
@iljabvh iljabvh requested review from NhoxxKienn and removed request for janbormet August 20, 2024 11:29
@NhoxxKienn
Copy link
Contributor

LGTM

@NhoxxKienn NhoxxKienn merged commit ddae35d into master Aug 20, 2024
1 check passed
Copy link
Contributor

@NhoxxKienn NhoxxKienn left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

☂️ Several example demos are not yet compatible with go-perun 0.10.6
3 participants