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

Reusable components of subcommands to be leveraged for SDK testing #522

Closed
2 tasks
Tracked by #47
jeromy-cannon opened this issue Aug 30, 2024 · 2 comments · Fixed by #533
Closed
2 tasks
Tracked by #47

Reusable components of subcommands to be leveraged for SDK testing #522

jeromy-cannon opened this issue Aug 30, 2024 · 2 comments · Fixed by #533
Assignees
Labels
Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. P0 An issue impacting production environments or impacting multiple releases or multiple individuals. released

Comments

@jeromy-cannon
Copy link
Contributor

jeromy-cannon commented Aug 30, 2024

For some of the SDK testing of NodeCreateTransaction the SDK teams would like to use Solo. Our current solo node add does not allow for them to leverage and independent set of SDK calls to create the transaction. Here we would like to split the functionality up so that certain calls can be made to better enable the SDK teams to leverage Solo to help with their integration/e2e testing.

Example flow:

npm install -g @hashgraph/solo@0.?
export SOLO_CLUSTER_NAME=solo-e2e
export SOLO_NAMESPACE=solo-e2e
export SOLO_CLUSTER_SETUP_NAMESPACE=fullstack-setup
kind delete cluster -n "${SOLO_CLUSTER_NAME}"
kind create cluster -n "${SOLO_CLUSTER_NAME}"
solo init --namespace "${SOLO_NAMESPACE}" -i node1,node2,node3 -t v0.53.0 -s "${SOLO_CLUSTER_SETUP_NAMESPACE}"
solo node keys --gossip-keys --tls-keys --key-format pem
solo cluster setup
solo network deploy --pvcs true
solo node setup
solo node start
solo node add-prepare --out-dir ~/solo_out --gossip-keys true --tls-keys true --admin-key "...."
// SDK does node create transaction
solo node add-execute

example output files (where the new node alias is node4 (nodeID=3)):

  • hedera-node4.crt
  • hedera-node4.key
  • s-private-node4.pem
  • s-public-node4.pem
  • account-key-node4.key
  • account-key-0.0.6.key (this new nodes account number)
  • account-key-0.0.2.key (treasury account, can be used as council signature)
  • gossipEndpoints-node4.txt
  • grpcServiceEndpoints-node4.txt

Altered solo node add flow with notes:

-- `solo node add-prepare`
✔ Initialize
✔ Check that PVCs are enabled
✔ Identify existing network nodes
✔ Determine new node account number
✔ Generate Gossip key (and write to specified folder by user)
✔ Generate gRPC TLS key (and write to specified folder by user)
✔ Load signing key certificate (skip)
✔ Compute mTLS certificate hash (skip)
✔ Prepare gossip endpoints (and write to specified folder by user)
✔ Prepare grpc service endpoints (and write to specified folder by user)
✔ Load node admin key (skip) (DO NOT save the key)
✔ Prepare upgrade zip file for node upgrade process
✔ Check existing nodes staked amount
-- log files created and their path to stdout
-- log kubectl port forward examples
✔ Send node create transaction (skip)

-- `solo node add-execute`
✔ Send prepare upgrade transaction (skip)
✔ Download generated files from an existing node
✔ Send freeze upgrade transaction (skip) 
✔ Check network nodes are frozen
✔ Get node logs and configs
✔ Deploy new network node
✔ Kill nodes to pick up updated configMaps
✔ Check node pods are running
✔ Prepare staging directory
✔ Fetch platform software into all network nodes
✔ Download last state from an existing node
✔ Upload last saved state to new network node
✔ Setup new network node
✔ Start network nodes
✔ Check all nodes are ACTIVE
✔ Check all node proxies are ACTIVE
✔ Stake new node
✔ Trigger stake weight calculate
✔ Finalize
  • remove --node-id flag from node add, and calculate it based on config.txt next node id + 1
  • --admin-key flag is optional, and not stored. If not set, it will use GENESIS_KEY
@jeromy-cannon jeromy-cannon changed the title Reusable commands to be leveraged for SDK testing Reusable components of subcommands to be leveraged for SDK testing Aug 30, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Solo Aug 30, 2024
@jeromy-cannon
Copy link
Contributor Author

@nathanklick , @SimiHunjan

@jeromy-cannon jeromy-cannon added P0 An issue impacting production environments or impacting multiple releases or multiple individuals. Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. labels Aug 30, 2024
@jeromy-cannon jeromy-cannon moved this from 🆕 New to 🔖 Ready in Solo Aug 30, 2024
@Ivo-Yankov Ivo-Yankov moved this from 🔖 Ready to 🏗 In progress in Solo Sep 3, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Solo Sep 13, 2024
@swirlds-automation
Copy link
Contributor

🎉 This issue has been resolved in version 0.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. P0 An issue impacting production environments or impacting multiple releases or multiple individuals. released
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants