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

Add support for evmconnect #199

Merged
merged 6 commits into from
Aug 11, 2022
Merged

Add support for evmconnect #199

merged 6 commits into from
Aug 11, 2022

Conversation

nguyer
Copy link
Contributor

@nguyer nguyer commented Aug 10, 2022

This PR adds support for evmconnect and chosing between it and ethconnect (still the default) with the new -c, --blockchain-connector flag.

It also moves logging related items to a context which is passed throughout the CLI code, and it creates a new interface for blockchain connectors.

Right now a BlockchainProvider creates the blockchain connector instance, but I feel like it should probably be the other way around in the future. That's a refactor for another day, as it is quite a disruptive code change, with no tangible benefit to the end user (only code maintainability).

nguyer and others added 4 commits August 5, 2022 09:50
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
…ng startup

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
@peterbroadhurst
Copy link
Contributor

Just a note that this PR contains a fix for a timing issue, to do with the IPFS container being terminated during the docker-compose down that happens after installing the contract, at a point that the docker orchestration script of IPFS cannot recover from. The symptoms are provided below for search, as we believe this could happen in a V1.0 stack.

The fix was to add a healthcheck to the IPFS container, and then a service-healthy check on the firefly_core container, so that the initial docker-compose up does not complete until IPFS is fully started.

Changing user to ipfs
ipfs version 0.10.0
generating ED25519 keypair...done
peer identity: 12D3KooWKwJsB6rX8EJ95btpsMvs5Soq6DraPNbPn8xsdPwbve9V
initializing IPFS node at /data/ipfs
to get started, enter:

        ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme

Changing user to ipfs
ipfs version 0.10.0
Found IPFS fs-repo at /data/ipfs
Initializing daemon...
go-ipfs version: 0.10.0-64b532f
Repo version: 11
System version: amd64/linux
Golang version: go1.16.7
2022-08-08T03:55:13.585Z        ERROR   p2p-config      config/config.go:107    tried to create a libp2p node with no Private Network Protector but usage of Private Networks is forced by the enviroment
2022-08-08T03:55:13.624Z        ERROR   cmd/ipfs        ipfs/daemon.go:422      error from node construction: could not build arguments for function "github.com/ipfs/go-ipfs/core/node".PeerWith.func1 (/go-ipfs/core/node/peering.go:29): failed to build *peering.PeeringService: could not build arguments for function "github.com/ipfs/go-ipfs/core/node".Peering (/go-ipfs/core/node/peering.go:14): failed to build host.Host: received non-nil error from function "github.com/ipfs/go-ipfs/core/node/libp2p".Host (/go-ipfs/core/node/libp2p/host.go:40): privnet: private network was not configured but is enforced by the environment

Error: could not build arguments for function "github.com/ipfs/go-ipfs/core/node".PeerWith.func1 (/go-ipfs/core/node/peering.go:29): failed to build *peering.PeeringService: could not build arguments for function "github.com/ipfs/go-ipfs/core/node".Peering (/go-ipfs/core/node/peering.go:14): failed to build host.Host: received non-nil error from function "github.com/ipfs/go-ipfs/core/node/libp2p".Host (/go-ipfs/core/node/libp2p/host.go:40): privnet: private network was not configured but is enforced by the environment

Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

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

This is great. Like the change to passing the context included in this, and the neat way you've done the refactor around making the connector selectable.

@peterbroadhurst
Copy link
Contributor

I note the ERC-1155 support is currently failing with Error: Method '<constructor>': Requires 1 args (supplied=0)

nguyer added 2 commits August 11, 2022 13:40
…evmconnect

Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
@nguyer nguyer merged commit 9c92b95 into hyperledger:main Aug 11, 2022
@nguyer nguyer deleted the evmconnect branch August 11, 2022 18:34
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.

2 participants