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 staking to nodes so that we can upgrade to v0.51.x #381

Closed
Tracked by #47
jeromy-cannon opened this issue Jun 13, 2024 · 2 comments · Fixed by #469
Closed
Tracked by #47

Add staking to nodes so that we can upgrade to v0.51.x #381

jeromy-cannon opened this issue Jun 13, 2024 · 2 comments · Fixed by #469
Assignees
Labels
Improvement Code changes driven by non business requirements P0 An issue impacting production environments or impacting multiple releases or multiple individuals. Regression Behavior that used to work in a released product or service that no longer works with a new release. released

Comments

@jeromy-cannon
Copy link
Contributor

jeromy-cannon commented Jun 13, 2024

Previously, in v0.49.0-alpha.2, we were able to do a solo node add successfully in our E2E tests.

With version 0.50.0 it fails (see -> link). Based on discussion in this Slack thread -> link, we need to use v0.51.0-alpha.4 (discussion link, tag link). We also need to stake some HBAR to each of the nodes.

Because weight of consensus per node uses amount staked, we should go ahead and stake following genesis, which would imply in solo node start after the consensus nodes are active.

Requires Nathan to publish: https://builds.hedera.com/node/software/v0.51/build-v0.51.x

Sample code to stake to nodes generated by ChatGPT - Hedera Hivemind, thus will need to be adapted into our codebase:

  // Create the transaction
  const transaction = await new AccountUpdateTransaction()
    .setAccountId(myAccountId)
    .setStakedNodeId(nodeId)
    .freezeWith(client);

  // Sign the transaction with the account's private key
  const signTx = await transaction.sign(myPrivateKey);

  // Submit the transaction to a Hedera network
  const txResponse = await signTx.execute(client);

  // Request the receipt of the transaction
  const receipt = await txResponse.getReceipt(client);

  // Get the transaction status
  const transactionStatus = receipt.status;
  console.log("The transaction consensus status is " + transactionStatus.toString());
@jeromy-cannon jeromy-cannon added P1 High priority issue. Required to be completed in the assigned milestone. P2 Required to be completed in the assigned milestone, but may or may not impact release schedule. Improvement Code changes driven by non business requirements Regression Behavior that used to work in a released product or service that no longer works with a new release. and removed P1 High priority issue. Required to be completed in the assigned milestone. labels Jun 13, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Solo Jun 13, 2024
@jeromy-cannon jeromy-cannon moved this from 🆕 New to 🔖 Ready in Solo Jun 13, 2024
@jeromy-cannon jeromy-cannon changed the title Add staking to nodes so that we can upgrade to v0.51.0-alpha.4+ Add staking to nodes so that we can upgrade to v0.51.x Jun 18, 2024
@jeromy-cannon jeromy-cannon added P0 An issue impacting production environments or impacting multiple releases or multiple individuals. and removed P2 Required to be completed in the assigned milestone, but may or may not impact release schedule. labels Jun 21, 2024
@jeromy-cannon
Copy link
Contributor Author

bumped priority to P0. We need this ready so that solo node add can be used in Dynamic Address Book testing.

@swirlds-automation
Copy link
Contributor

🎉 This issue has been resolved in version 0.28.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
Improvement Code changes driven by non business requirements P0 An issue impacting production environments or impacting multiple releases or multiple individuals. Regression Behavior that used to work in a released product or service that no longer works with a new release. released
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants