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: enable Blockstreams and uploader #1109

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/custom-network-config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ hedera.profiles.active=TEST
# TODO: this is a workaround until prepareUpgrade freeze will recalculate the weight prior to writing the config.txt
staking.periodMins=1
nodes.updateAccountIdAllowed=true
blockStream.streamMode=RECORDS
blockStream.streamMode=BOTH
2 changes: 1 addition & 1 deletion examples/solo-gke-test/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ hedera.profiles.active=TEST
# TODO: this is a workaround until prepareUpgrade freeze will recalculate the weight prior to writing the config.txt
staking.periodMins=1
nodes.updateAccountIdAllowed=true
blockStream.streamMode=RECORDS
blockStream.streamMode=BOTH

# Override the throttle definitions to be used during genesis.
# This override is required because release <= 0.58.x use a different default path.
Expand Down
3 changes: 1 addition & 2 deletions resources/templates/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ hedera.profiles.active=TEST
# TODO: this is a workaround until prepareUpgrade freeze will recalculate the weight prior to writing the config.txt
staking.periodMins=1
nodes.updateAccountIdAllowed=true
# TODO: remove once we have the uploader enabled, required for current p0 deadline
blockStream.streamMode=RECORDS
blockStream.streamMode=BOTH
instamenta marked this conversation as resolved.
Show resolved Hide resolved
# TODO: uncomment this when we are ready to use genesis-network.json
#addressBook.useRosterLifecycle=true
9 changes: 9 additions & 0 deletions src/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ export const HEDERA_NODE_INTERNAL_GOSSIP_PORT = process.env.SOLO_NODE_INTERNAL_G
export const HEDERA_NODE_EXTERNAL_GOSSIP_PORT = process.env.SOLO_NODE_EXTERNAL_GOSSIP_PORT || '50111';
export const HEDERA_NODE_DEFAULT_STAKE_AMOUNT = +process.env.SOLO_NODE_DEFAULT_STAKE_AMOUNT || 500;

export const HEDERA_NODE_SIDECARS = [
'recordStreamUploader',
'eventStreamUploader',
'backupUploader',
'accountBalanceUploader',
'otelCollector',
'blockstreamUploader',
];

// --------------- Charts related constants ----------------------------------------------------------------------------
export const SOLO_SETUP_NAMESPACE = 'solo-setup';
export const SOLO_TESTING_CHART_URL = 'oci://ghcr.io/hashgraph/solo-charts';
Expand Down
10 changes: 1 addition & 9 deletions src/core/profile_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ import {inject, injectable} from 'tsyringe-neo';
import {patchInject} from './container_helper.js';
import {HEDERA_PLATFORM_VERSION} from '../../version.js';

const consensusSidecars = [
'recordStreamUploader',
'eventStreamUploader',
'backupUploader',
'accountBalanceUploader',
'otelCollector',
];

@injectable()
export class ProfileManager {
private readonly logger: SoloLogger;
Expand Down Expand Up @@ -275,7 +267,7 @@ export class ProfileManager {
this._setChartItems('defaults.root', profile.consensus.root, yamlRoot);

// set sidecar resources
for (const sidecar of consensusSidecars) {
for (const sidecar of constants.HEDERA_NODE_SIDECARS) {
this._setChartItems(`defaults.sidecars.${sidecar}`, profile.consensus[sidecar], yamlRoot);
}
}
Expand Down
8 changes: 8 additions & 0 deletions test/data/test-profiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ test:
limits:
cpu: 150m
memory: 250Mi
blockstreamUploader:
resources:
requests:
cpu: 0
memory: 0
limits:
cpu: 150m
memory: 250Mi
eventStreamUploader:
resources:
requests:
Expand Down
8 changes: 1 addition & 7 deletions test/unit/core/profile_manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,7 @@ describe('ProfileManager', () => {
expect(valuesYaml.defaults.root.resources.limits.memory).not.to.be.null;

// check all sidecars have resources
for (const component of [
'recordStreamUploader',
'eventStreamUploader',
'backupUploader',
'accountBalanceUploader',
'otelCollector',
]) {
for (const component of constants.HEDERA_NODE_SIDECARS) {
expect(valuesYaml.defaults.sidecars[component].resources.limits.cpu).not.to.be.null;
expect(valuesYaml.defaults.sidecars[component].resources.limits.memory).not.to.be.null;
}
Expand Down
Loading