Skip to content

Commit

Permalink
Merge branch 'semantic-release-workflow-update' of github.com:hashgra…
Browse files Browse the repository at this point in the history
…ph/hedera-services into semantic-release-workflow-update
  • Loading branch information
andrewb1269hg committed Dec 21, 2024
2 parents c432403 + 73ab431 commit d0aee00
Show file tree
Hide file tree
Showing 138 changed files with 1,460 additions and 740 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/config/node-release.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
release:
branching:
execution:
time: "18:00:00"
time: "20:00:00"
schedule:
- on: "2024-12-13"
- on: "2024-12-20"
name: release/0.58
initial-tag:
create: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-zxc-build-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ jobs:
fi
- name: Upload Manifests
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ (steps.gcp.outcome == 'success' || steps.jfrog.outcome == 'success') && !cancelled() && always() }}
with:
name: Production Image Manifests
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/node-zxc-compile-application-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload Unit Test Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-unit-tests && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: Unit Test Report
Expand All @@ -241,7 +241,7 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload Unit Test (Timing Sensitive) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-timing-sensitive-tests && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: Unit Test Report (Timing Sensitive)
Expand All @@ -263,7 +263,7 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload Unit Test (Time Consuming) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-time-consuming-tests && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: Unit Test Report (Time Consuming)
Expand All @@ -285,7 +285,7 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload Hammer Test Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hammer-tests && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: Hammer Test Report
Expand All @@ -311,15 +311,15 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload HAPI Test (Misc) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-misc && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: HAPI Test (Misc) Reports
path: "**/test-clients/build/test-results/**/TEST-*.xml"
retention-days: 7

- name: Upload HAPI Test (Misc) Network Logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-misc && inputs.enable-network-log-capture && steps.gradle-hapi-misc.conclusion == 'failure' && !cancelled() }}
with:
name: HAPI Test (Misc) Network Logs
Expand All @@ -345,15 +345,15 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload HAPI Test (Crypto) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-crypto && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: HAPI Test (Crypto) Report
path: "**/test-clients/build/test-results/testSubprocess/TEST-*.xml"
retention-days: 7

- name: Upload HAPI Test (crypto) Network Logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-crypto && inputs.enable-network-log-capture && steps.gradle-hapi-crypto.conclusion == 'failure' && !cancelled() }}
with:
name: HAPI Test (Crypto) Network Logs
Expand All @@ -379,15 +379,15 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload HAPI Test (Token) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-token && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: HAPI Test (Token) Report
path: "**/test-clients/build/test-results/testSubprocess/TEST-*.xml"
retention-days: 7

- name: Upload HAPI Test (Token) Network Logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-token && inputs.enable-network-log-capture && steps.gradle-hapi-token.conclusion == 'failure' && !cancelled() }}
with:
name: HAPI Test (Token) Network Logs
Expand All @@ -413,15 +413,15 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload HAPI Test (Smart Contract) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-smart-contract && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: HAPI Test (Smart Contract) Report
path: "**/test-clients/build/test-results/testSubprocess/TEST-*.xml"
retention-days: 7

- name: Upload HAPI Test (Smart Contract) Network Logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-smart-contract && inputs.enable-network-log-capture && steps.gradle-hapi-smart-contract.conclusion == 'failure' && !cancelled() }}
with:
name: HAPI Test (Smart Contract) Network Logs
Expand All @@ -447,15 +447,15 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload HAPI Test (Time Consuming) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-time-consuming && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: HAPI Test (Time Consuming) Report
path: "**/test-clients/build/test-results/testSubprocess/TEST-*.xml"
retention-days: 7

- name: Upload HAPI Test (Time Consuming) Network Logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-time-consuming && inputs.enable-network-log-capture && steps.gradle-hapi-time-consuming.conclusion == 'failure' && !cancelled() }}
with:
name: HAPI Test (Time Consuming) Network Logs
Expand All @@ -481,15 +481,15 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload HAPI Test (Restart) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-restart && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
name: HAPI Test (Restart) Report
path: "**/test-clients/build/test-results/testSubprocess/TEST-*.xml"
retention-days: 7

- name: Upload HAPI Test (Restart) Network Logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-restart && inputs.enable-network-log-capture && steps.gradle-hapi-restart.conclusion == 'failure' && !cancelled() }}
with:
name: HAPI Test (Restart) Network Logs
Expand All @@ -516,15 +516,15 @@ jobs:
comment_mode: errors # only comment if we could not find or parse the JUnit XML files

- name: Upload HAPI Test (Node Death Reconnect) Report Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-nd-reconnect && steps.gradle-build.conclusion == 'failure' && !cancelled() }}
with:
name: HAPI Test (Node Death Reconnect) Report
path: "**/test-clients/build/test-results/testSubprocess/TEST-*.xml"
retention-days: 7

- name: Upload HAPI Test (Node Death Reconnect) Network Logs
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-hapi-tests-nd-reconnect && inputs.enable-network-log-capture && steps.gradle-hapi-nd-reconnect.conclusion == 'failure' && !cancelled() }}
with:
name: HAPI Test (Node Death Reconnect) Network Logs
Expand All @@ -547,7 +547,7 @@ jobs:
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Java -r gradle/aggregation/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml

- name: Upload Test Reports
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ inputs.enable-unit-tests && !cancelled() }}
with:
name: Test Reports
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zxc-verify-docker-build-determinism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ jobs:
fi
- name: Publish Manifests
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ steps.regen-manifest.conclusion == 'success' && failure() && !cancelled() }}
with:
name: Docker Manifests [${{ join(matrix.os, ', ') }}]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zxc-verify-gradle-build-determinism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
fi
- name: Publish Manifests
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
if: ${{ steps.regen-manifest.conclusion == 'success' && failure() && !cancelled() }}
with:
name: Gradle Manifests [${{ join(matrix.os, ', ') }}]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zxcron-extended-test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ jobs:
done
- name: Upload log as artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
path: run.log

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zxf-collect-workflow-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- name: Upload log as artifact
id: upload-log
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
path: workflow-run.log

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Hedera Hashgraph, LLC
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -133,7 +133,6 @@
import com.swirlds.platform.listeners.ReconnectCompleteListener;
import com.swirlds.platform.listeners.ReconnectCompleteNotification;
import com.swirlds.platform.listeners.StateWriteToDiskCompleteListener;
import com.swirlds.platform.state.MerkleRoot;
import com.swirlds.platform.state.PlatformMerkleStateRoot;
import com.swirlds.platform.state.service.PlatformStateService;
import com.swirlds.platform.state.service.ReadablePlatformStateStore;
Expand Down Expand Up @@ -505,7 +504,7 @@ public SoftwareVersion getSoftwareVersion() {
*/
@Override
@NonNull
public MerkleRoot newMerkleStateRoot() {
public PlatformMerkleStateRoot newMerkleStateRoot() {
return stateRootSupplier.get();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
// SPDX-License-Identifier: Apache-2.0
/*
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.hedera.node.app;

import static com.swirlds.common.io.utility.FileUtils.getAbsolutePath;
Expand Down Expand Up @@ -60,7 +75,6 @@
import com.swirlds.platform.crypto.CryptoStatic;
import com.swirlds.platform.roster.RosterHistory;
import com.swirlds.platform.roster.RosterUtils;
import com.swirlds.platform.state.MerkleRoot;
import com.swirlds.platform.state.PlatformMerkleStateRoot;
import com.swirlds.platform.state.address.AddressBookInitializer;
import com.swirlds.platform.state.service.ReadableRosterStore;
Expand Down Expand Up @@ -130,7 +144,7 @@ public void init(@NonNull final Platform platform, @NonNull final NodeId nodeId)
* {@inheritDoc}
*/
@Override
public @NonNull MerkleRoot newMerkleStateRoot() {
public @NonNull PlatformMerkleStateRoot newMerkleStateRoot() {
return hederaOrThrow().newMerkleStateRoot();
}

Expand Down Expand Up @@ -254,7 +268,7 @@ public static void main(final String... args) throws Exception {
version,
() -> {
isGenesis.set(true);
final var genesisState = (PlatformMerkleStateRoot) hedera.newMerkleStateRoot();
final var genesisState = hedera.newMerkleStateRoot();
final var genesisNetwork = DiskStartupNetworks.fromLegacyAddressBook(diskAddressBook);
hedera.initializeStatesApi(
genesisState,
Expand All @@ -271,17 +285,12 @@ public static void main(final String... args) throws Exception {
final var initialState = reservedState.state();
if (!isGenesis.get()) {
hedera.initializeStatesApi(
(PlatformMerkleStateRoot) initialState.get().getState().getSwirldState(),
metrics,
InitTrigger.RESTART,
null,
platformConfig,
diskAddressBook);
initialState.get().getState(), metrics, InitTrigger.RESTART, null, platformConfig, diskAddressBook);
}
hedera.setInitialStateHash(reservedState.hash());

// --- Now build the platform and start it ---
final var stateRoot = (PlatformMerkleStateRoot) initialState.get().getState();
final var stateRoot = initialState.get().getState();
final RosterHistory rosterHistory;
if (hedera.isRosterLifecycleEnabled()) {
final var rosterStore = new ReadableStoreFactory(stateRoot).getStore(ReadableRosterStore.class);
Expand Down Expand Up @@ -461,7 +470,7 @@ private static HashedReservedSignedState loadInitialState(
@NonNull final Configuration configuration,
@NonNull final RecycleBin recycleBin,
@NonNull final SoftwareVersion softwareVersion,
@NonNull final Supplier<MerkleRoot> stateRootSupplier,
@NonNull final Supplier<PlatformMerkleStateRoot> stateRootSupplier,
@NonNull final String mainClassName,
@NonNull final String swirldName,
@NonNull final NodeId selfId) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023-2024 Hedera Hashgraph, LLC
* Copyright (C) 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -326,7 +326,7 @@ private PlatformMerkleStateRoot createMerkleHederaState(Schema schemaV1) {
final SignedState randomState =
new RandomSignedStateGenerator().setRound(1).build();

final var originalTree = (PlatformMerkleStateRoot) randomState.getState();
final var originalTree = randomState.getState();
final var originalRegistry =
new MerkleSchemaRegistry(registry, FIRST_SERVICE, DEFAULT_CONFIG, new SchemaApplications());
originalRegistry.register(schemaV1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -334,6 +335,17 @@ public String getValue(@NonNull String s) throws NoSuchElementException {
};
}

@Override
public boolean isListProperty(@NonNull final String propertyName) throws NoSuchElementException {
return false;
}

@NonNull
@Override
public List<String> getListValue(@NonNull final String propertyName) throws NoSuchElementException {
return List.of();
}

public int port() {
return port;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public boolean exists(@NonNull final String s) {
return wrappedConfig.exists(s);
}

@Override
public boolean isListValue(@NonNull final String propertyName) {
return wrappedConfig.isListValue(propertyName);
}

@Override
public String getValue(@NonNull final String s) throws NoSuchElementException {
return wrappedConfig.getValue(s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import com.hedera.hapi.node.base.AccountID;
import com.swirlds.config.api.converter.ConfigConverter;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.util.stream.Stream;

/**
Expand All @@ -26,7 +27,7 @@
public class AccountIDConverter implements ConfigConverter<AccountID> {

@Override
public AccountID convert(final String value) throws IllegalArgumentException, NullPointerException {
public AccountID convert(@NonNull final String value) throws IllegalArgumentException, NullPointerException {
if (value == null) {
throw new NullPointerException("null can not be converted");
}
Expand Down
Loading

0 comments on commit d0aee00

Please sign in to comment.