hiero-ledger / hiero-ledger/hiero-consensus-node

Bug: Apply stake boundary side effects in freeze period

Open
#20,271 0 comments 0 reactions 1 assignee Claimed by @mhess-swl View on GitHub
Bug
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

The v0.64 migration tests stumbled on a boundary condition where a network that enters a freeze state immediately after crossing the staking boundary cannot accept any events submitted that were created before the freeze round. This means that, when the latest consensus timestamp passes the freeze timestamp, the node isn't always able to execute the remaining transactions in-flight before performing the rest of the upgrade. The result is that the node staking update transactions aren't externalized as expected.

(Truncated) `hgcaa.log` from the migration test:
```
2025-07-17 23:58:42.772 INFO 85 PlatformStateUpdates - Freeze time will be 2025-07-18T00:00:00Z
2025-07-18 00:00:01.193 INFO 590 Hedera - HederaNode#4 is FREEZING
2025-07-18 00:00:28.292 INFO 63 WriteStateToDiskListener - StateWriteToDiskCompleteNotification Received : Freeze State Finished. consensusTimestamp: 2025-07-18T00:00:00.186655Z, roundNumber: 127218593, sequence: 371
2025-07-18 00:00:28.292 INFO 84 WriteStateToDiskListener - Externalizing freeze if upgrade is pending
2025-07-18 00:00:28.293 INFO 590 Hedera - HederaNode#4 is FREEZE_COMPLETE
2025-07-18 00:00:28.304 INFO 327 NettyGrpcServerManager - gRPC server stopped

// (Note: here begins the node restart)
2025-07-18 00:03:13.608 INFO 470 ServicesMain - The following nodes [4] are set to run locally
```

The resulting **404 Not Found** received from the mirror node when attempting to access the node stake updates:
```
20:06:38 2025-07-18T00:06:38.748Z INFO ForkJoinPool-1-worker-1 o.h.m.t.e.a.s.TokenFeature Executing step: I update the metadata for serial number indices 0 and 1
20:06:39 2025-07-18T00:06:39.145Z ERROR ForkJoinPool-1-worker-5 o.h.m.t.e.a.s.NetworkFeature Scenario failure:
20:06:39 I verify the network stake <- 404 Not Found: "{"_status":{"messages":[{"message":"Not found"}]}}"
20:06:39 org.springframework.web.client.HttpClientErrorException$NotFound: 404 Not Found: "{"_status":{"messages":[{"message":"Not found"}]}}"
20:06:39 at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:112)
20:06:39 at org.springframework.web.client.StatusHandler.lambda$defaultHandler$3(StatusHandler.java:86)
20:06:39 at org.springframework.web.client.StatusHandler.handle(StatusHandler.java:146)
20:06:39 at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.applyStatusHandlers(DefaultRestClient.java:831)
20:06:39 at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.lambda$readBody$4(DefaultRestClient.java:820)
20:06:39 at org.springframework.web.client.DefaultRestClient.readWithMessageConverters(DefaultRestClient.java:216)
20:06:39 at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.readBody(DefaultRestClient.java:819)
20:06:39 at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.lambda$body$0(DefaultRestClient.java:750)
20:06:39 at org.springframework.web.client.DefaultRestClient$DefaultRequestBodyUriSpec.exchangeInternal(DefaultRestClient.java:579)
20:06:39 at org.springframework.web.client.DefaultRestClient$DefaultRequestBodyUriSpec.exchange(DefaultRestClient.java:533)
20:06:39 at org.springframework.web.client.RestClient$RequestHeadersSpec.exchange(RestClient.java:680)
20:06:39 at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.executeAndExtract(DefaultRestClient.java:814)
20:06:39 at org.springframework.web.client.DefaultRestClient$DefaultResponseSpec.body(DefaultRestClient.java:750)
20:06:39 at org.hiero.mirror.test.e2e.acceptance.client.MirrorNodeClient.lambda$callRestEndpoint$1(MirrorNodeClient.java:406)
20:06:39 at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:357)
20:06:39 at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:230)
20:06:39 at org.hiero.mirror.test.e2e.acceptance.client.MirrorNodeClient.callRestEndpoint(MirrorNodeClient.java:405)
20:06:39 at org.hiero.mirror.test.e2e.acceptance.client.MirrorNodeClient.getNetworkStake(MirrorNodeClient.java:296)
20:06:39 at org.hiero.mirror.test.e2e.acceptance.steps.NetworkFeature.verifyNetworkStake(NetworkFeature.java:32)
20:06:39 at ✽.I verify the network stake(classpath:features/network/networkstake.feature:6)
20:06:39
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.