Skip to content

Commit 72a301a

Browse files
committed
chore: Remove Browser
Signed-off-by: Timo Brandstätter <[email protected]>
1 parent 29d212b commit 72a301a

File tree

15 files changed

+14
-715
lines changed

15 files changed

+14
-715
lines changed

hedera-node/hedera-app/src/main/java/com/hedera/node/app/ServicesMain.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
import com.swirlds.config.extensions.sources.SystemEnvironmentConfigSource;
5454
import com.swirlds.config.extensions.sources.SystemPropertiesConfigSource;
5555
import com.swirlds.metrics.api.Metrics;
56-
import com.swirlds.platform.Browser;
5756
import com.swirlds.platform.CommandLineArgs;
5857
import com.swirlds.platform.ParameterProvider;
5958
import com.swirlds.platform.builder.PlatformBuilder;
@@ -225,8 +224,7 @@ public StateLifecycleManager getStateLifecycleManager() {
225224
}
226225

227226
/**
228-
* Launches Services directly, without use of the "app browser" from {@link Browser}. The
229-
* approximate startup sequence is:
227+
* Launches Services: the approximate startup sequence is:
230228
* <ol>
231229
* <li>Scan the classpath for {@link RuntimeConstructable} classes,
232230
* registering their no-op constructors as the default factories for their

hedera-node/hedera-app/src/main/java/com/hedera/node/app/package-info.java

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,15 @@
22
/**
33
* Main package for the Hedera node application.
44
*
5-
* <p>The Hashgraph Platform today follows a "container-managed" model, where applications extend from
6-
* {@link com.swirlds.platform.system.SwirldMain} to define their main entry point, much like a Java Applet would extend
7-
* from {@code Applet}. An application also extends from {@link com.swirlds.state.merkle.VirtualMapState} to define its
8-
* Merkle tree for holding state. The platform then dynamically looks up and creates these objects. The platform is thus
9-
* in charge of lifecycle management.
5+
* <p>The Hashgraph Platform uses a "library" model, where the platform exposes
6+
* a {@link com.swirlds.platform.builder.PlatformBuilder}, and the application is responsible for
7+
* managing the lifecycle of the platform. The platform is a library that the application uses to
8+
* build a node. This makes testing much easier and the code easier to understand.
109
*
11-
* <p>In the future, the Hashgraph Platform will instead use a "library" model, where the platform exposes
12-
* a {@code PlatformBuilder}, and the application is responsible for managing the lifecycle of the platform. The
13-
* platform will then be a library that the application can use to build a node. This makes testing much easier and the
14-
* code easier to understand.
10+
* <p>The main entry point for the application is {@link com.hedera.node.app.ServicesMain#main(String...)},
11+
* which builds and starts the platform using {@link com.swirlds.platform.builder.PlatformBuilder}.
12+
* The {@link com.hedera.node.app.Hedera} singleton centralizes nearly all the setup and runtime logic
13+
* for the application.
1514
*
16-
* <p>The main entry point for the application today is {@link com.swirlds.platform.Browser}, which is
17-
* configured to find and load {@link com.hedera.node.app.ServicesMain} as the
18-
* {@link com.swirlds.platform.system.SwirldMain} of the application.
19-
*
20-
* <p><img src="startup-flow.png" alt="Startup Flow">
2115
*/
2216
package com.hedera.node.app;
Binary file not shown.

hedera-node/hedera-app/src/main/java/com/hedera/node/app/state/ConsensusStateEventHandlerImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public void onStateInitialized(
6161
hedera.onStateInitialized(state, platform, trigger);
6262
}
6363

64-
@Override
6564
public void onUpdateWeight(
6665
@NonNull final MerkleNodeState stateRoot,
6766
@NonNull final AddressBook configAddressBook,

platform-sdk/consensus-otter-tests/src/testFixtures/java/org/hiero/otter/fixtures/app/OtterApp.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ public void onStateInitialized(
265265
/**
266266
* {@inheritDoc}
267267
*/
268-
@Override
269-
public void onUpdateWeight(
268+
private void onUpdateWeight(
270269
@NonNull final VirtualMapState state,
271270
@NonNull final AddressBook configAddressBook,
272271
@NonNull final PlatformContext context) {

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/ApplicationDefinitionLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.hiero.consensus.model.roster.AddressBook;
2121

2222
/**
23-
* This class only contains one method that was extracted from the {@link Browser} class.
23+
* This class only contains one method that was extracted from the Browser class.
2424
*
2525
* @deprecated will be replaced by the {@link com.swirlds.config.api.Configuration} API in near future once the
2626
* config.txt has been migrated to the regular config API. If you need to use this class please try to do as less static

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/Browser.java

Lines changed: 0 additions & 396 deletions
This file was deleted.

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/cli/BrowseCommand.java

Lines changed: 0 additions & 80 deletions
This file was deleted.

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/cli/PcesRecoveryCommand.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/ConsensusStateEventHandler.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import com.hedera.hapi.node.base.SemanticVersion;
55
import com.hedera.hapi.platform.event.StateSignatureTransaction;
6-
import com.swirlds.common.context.PlatformContext;
76
import com.swirlds.platform.system.InitTrigger;
87
import com.swirlds.platform.system.Platform;
98
import com.swirlds.state.MerkleNodeState;
@@ -12,7 +11,6 @@
1211
import java.util.function.Consumer;
1312
import org.hiero.consensus.model.event.Event;
1413
import org.hiero.consensus.model.hashgraph.Round;
15-
import org.hiero.consensus.model.roster.AddressBook;
1614
import org.hiero.consensus.model.transaction.ScopedSystemTransaction;
1715

1816
/**
@@ -69,16 +67,6 @@ void onStateInitialized(
6967
@NonNull InitTrigger trigger,
7068
@Nullable SemanticVersion previousVersion);
7169

72-
/**
73-
* Called exclusively by platform test apps to update the weight of the address book. Should be removed
74-
* as these apps are refactored to stop using {@link com.swirlds.platform.Browser}.
75-
* @param state the working state of the network
76-
* @param configAddressBook the address book used to configure the network
77-
* @param context the current platform context
78-
*/
79-
@Deprecated(forRemoval = true)
80-
void onUpdateWeight(@NonNull T state, @NonNull AddressBook configAddressBook, @NonNull PlatformContext context);
81-
8270
/**
8371
* Called when event stream recovery finishes.
8472
*

0 commit comments

Comments
 (0)