Open rodion-lim-partior opened 2 weeks ago
@peterbroadhurst, I addressed your review comments and refactored the code. Also left a high level overview in the description of this PR, hope this helps to give a clearer picture on the changes that are being proposed. Thank you for taking the time to look through the large PR and the feedback provided.
A few lint errors to fix as well:
Error: internal/blockchain/ethereum/quorum/private_transaction_manager.go:157:31: Error return value is not checked (errcheck)
CopyTesseraEntrypointToVolume(ctx, outputDirectory, volumeName)
^
Error: internal/blockchain/ethereum/quorum/quorum.go:103:30: Error return value is not checked (errcheck)
CopyQuorumEntrypointToVolume(ctx, outputDirectory, volumeName)
^
Error: internal/blockchain/ethereum/quorum/private_transaction_manager.go:76:43: unslice: could simplify pubKeyBytes[:] to pubKeyBytes (gocritic)
return privateKeyData.Data.Bytes, string(pubKeyBytes[:]), path, nil
^
Error: internal/blockchain/ethereum/quorum/quorum.go:28:121: ST1003: func parameter chainId should be chainID (stylecheck)
func CreateQuorumEntrypoint(ctx context.Context, outputDirectory, volumeName, memberIndex, consensus, stackName string, chainId int, tesseraEnabled bool) error {
^
make: *** [Makefile:32: lint] Error 1
@EnriqueL8, addressed your comments and refactored most of the code accordingly. Will add additional tests for my bits in the next commit. Also raised two more issues on the remaining bits of the PR.
Thanks, will give it another pass
@EnriqueL8, added more tests to increase the coverage. Had to do some refactoring on the non quorum packages to allow for that.
This PR is raised to add Quorum and Tessera support for
firefly-cli
. We would like to ease the creation of a development environment for networks using the combination of Blockchain and Private Manager mentioned, and in future, build capabilities in Firefly stack such as extending the blockchain connector to cater for additional functionalities exposed by the combination.This section describes some of the functionalities implemented from both an external and internal command line perspective:
External ff command line perspective Unsupported combinations / algorithms will be explicitly disabled on the command line flags.
Supported Consensus Mechanism (only when Quorum is selected)
Unsupported Consensus Mechanism (only when Quorum is selected)
Supported Client Combinations
Unsupported Client Combinations
Internal ff command line perspective
/storeraw
endpoint, or require to perform health checks on the/upcheck
endpointbootnodes
or a static list of quorum connection identifiers. We have implemented all Quorum nodes to use the first member's node as a bootstrap node to discover each otherResolves https://github.com/hyperledger/firefly-cli/issues/309