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

feat: enhance node add to work with staking and dynamic address book #469

Merged
merged 61 commits into from
Aug 14, 2024

Conversation

jeromy-cannon
Copy link
Contributor

@jeromy-cannon jeromy-cannon commented Aug 8, 2024

Description

This pull request changes the following:

  • application.properties: set staking.periodMins=1 to reduce node stake weight calculation to 1 minute instead of 24 hours
  • log4j2.xml: OnStartupTriggeringPolicy to reset log file but preserve it with a rollover file name
  • settings.txt: event.migrateEventHashing, false to prevent 0.52 to 0.53 migration logic, this is not needed since we are testing an upgrade from 0.53.x to 0.53.x
  • new solo node add flags to support new dynamic address book functionality

Related Issues

JeffreyDallas and others added 26 commits June 26, 2024 09:55
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
…211 are hardcoded in JS SDK that will not work when running locally or in a pipeline

Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
…solo into 00381-D-staking-nodes

Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>

# Conflicts:
#	add_node.sh
#	src/commands/node.mjs
#	test/test_util.js
#	version.mjs
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Lenin Mehedy <lenin.mehedy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
…pping when only one node

Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
@jeromy-cannon jeromy-cannon self-assigned this Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

E2E Mirror Node Tests Coverage Report

 1 files  ±0   1 suites  ±0   5m 9s ⏱️ +6s
12 tests +1  12 ✅ +1  0 💤 ±0  0 ❌ ±0 
13 runs  +2  13 ✅ +2  0 💤 ±0  0 ❌ ±0 

Results for commit fd366cd. ± Comparison against base commit ef0199f.

This pull request removes 4 and adds 5 tests. Note that renamed tests count towards both.
MirrorNodeCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should cleanup previous deployment ‑ MirrorNodeCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should cleanup previous deployment
MirrorNodeCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with network deploy ‑ MirrorNodeCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with network deploy
MirrorNodeCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with node setup command ‑ MirrorNodeCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with node setup command
MirrorNodeCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with node start command ‑ MirrorNodeCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with node start command
MirrorNodeCommand Account creation should succeed ‑ MirrorNodeCommand Account creation should succeed
MirrorNodeCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should cleanup previous deployment ‑ MirrorNodeCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should cleanup previous deployment
MirrorNodeCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with network deploy ‑ MirrorNodeCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with network deploy
MirrorNodeCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with node setup command ‑ MirrorNodeCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with node setup command
MirrorNodeCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with node start command ‑ MirrorNodeCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with node start command

♻️ This comment has been updated with latest results.

Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Copy link
Contributor

github-actions bot commented Aug 8, 2024

E2E Relay Tests Coverage Report

1 files  ±0  1 suites  ±0   3m 32s ⏱️ -6s
5 tests ±0  5 ✅ ±0  0 💤 ±0  0 ❌ ±0 
6 runs  ±0  6 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit fd366cd. ± Comparison against base commit ef0199f.

This pull request removes 4 and adds 4 tests. Note that renamed tests count towards both.
RelayCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should cleanup previous deployment ‑ RelayCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should cleanup previous deployment
RelayCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with network deploy ‑ RelayCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with network deploy
RelayCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with node setup command ‑ RelayCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with node setup command
RelayCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with node start command ‑ RelayCommand Bootstrap network for test [release v0.49.0-alpha.2, keyFormat: pem] should succeed with node start command
RelayCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should cleanup previous deployment ‑ RelayCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should cleanup previous deployment
RelayCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with network deploy ‑ RelayCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with network deploy
RelayCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with node setup command ‑ RelayCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with node setup command
RelayCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with node start command ‑ RelayCommand Bootstrap network for test [release v0.53.0-release-0.53.xff7c43d, keyFormat: pem] should succeed with node start command

♻️ This comment has been updated with latest results.

Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>

# Conflicts:
#	resources/templates/application.properties
#	src/core/helpers.mjs
Copy link
Contributor

github-actions bot commented Aug 13, 2024

Unit Test Results - Windows

  1 files  ±0   19 suites  ±0   1m 31s ⏱️ -3s
124 tests ±0  124 ✅ ±0  0 💤 ±0  0 ❌ ±0 
150 runs  ±0  150 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit fd366cd. ± Comparison against base commit ef0199f.

♻️ This comment has been updated with latest results.

Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Copy link

codacy-production bot commented Aug 14, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.30% (target: -1.00%) 85.51%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ef0199f) 3527 2868 81.32%
Head commit (fd366cd) 3688 (+161) 3010 (+142) 81.62% (+0.30%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#469) 428 366 85.51%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 84.63074% with 77 lines in your changes missing coverage. Please review.

Project coverage is 81.42%. Comparing base (ef0199f) to head (fd366cd).
Report is 15 commits behind head on main.

Files Patch % Lines
test/test_util.js 56.92% 26 Missing and 2 partials ⚠️
src/commands/node.mjs 91.51% 24 Missing ⚠️
test/e2e/e2e_node_util.js 87.77% 11 Missing ⚠️
src/core/helpers.mjs 75.86% 7 Missing ⚠️
src/commands/prompts.mjs 25.00% 6 Missing ⚠️
src/core/k8.mjs 75.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #469      +/-   ##
==========================================
- Coverage   82.02%   81.42%   -0.60%     
==========================================
  Files          35       35              
  Lines        4216     4414     +198     
  Branches      727      755      +28     
==========================================
+ Hits         3458     3594     +136     
- Misses        758      818      +60     
- Partials        0        2       +2     
Files Coverage Δ
src/commands/flags.mjs 95.16% <100.00%> (+0.33%) ⬆️
src/core/account_manager.mjs 77.25% <100.00%> (-2.13%) ⬇️
src/core/constants.mjs 94.44% <100.00%> (+0.32%) ⬆️
src/core/key_manager.mjs 90.05% <ø> (ø)
src/core/templates.mjs 77.77% <100.00%> (-5.34%) ⬇️
version.mjs 100.00% <100.00%> (ø)
src/core/k8.mjs 86.47% <75.00%> (-0.19%) ⬇️
src/commands/prompts.mjs 68.87% <25.00%> (-2.46%) ⬇️
src/core/helpers.mjs 92.06% <75.86%> (-3.56%) ⬇️
test/e2e/e2e_node_util.js 88.04% <87.77%> (-0.99%) ⬇️
... and 2 more

... and 1 file with indirect coverage changes

Impacted file tree graph

Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
@jeromy-cannon jeromy-cannon marked this pull request as ready for review August 14, 2024 15:35
@jeromy-cannon jeromy-cannon requested review from a team and leninmehedy as code owners August 14, 2024 15:35
@nathanklick nathanklick merged commit b452599 into main Aug 14, 2024
35 of 36 checks passed
@nathanklick nathanklick deleted the 00381-node-add branch August 14, 2024 15:40
swirlds-automation added a commit that referenced this pull request Aug 26, 2024
## [0.28.0](v0.27.0...v0.28.0) (2024-08-26)

### Features

* add freeze account ([#436](#436)) ([8fe5a41](8fe5a41))
* enhance node add to work with staking and dynamic address book ([#469](#469)) ([b452599](b452599))
* use k8s configMaps to mount files during solo network deploy  ([#345](#345)) ([af27f16](af27f16))

### Bug Fixes

* hugo jsdoc failure ([#498](#498)) ([ff07413](ff07413))
* reduce number of account used e2e init account test ([#477](#477)) ([51d7ade](51d7ade))
* Resolve various problems to enable tests from local-node and smart-contracts to run agains solo network ([#402](#402)) ([c99d881](c99d881))
* use path.join instead of forward slashes to support Windows ([#491](#491)) ([82a5053](82a5053))
@swirlds-automation
Copy link
Contributor

🎉 This PR is included 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add staking to nodes so that we can upgrade to v0.51.x
5 participants