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

Disable account balance verification on startup #10555

Open
bilyana-gospodinova opened this issue Mar 6, 2025 · 0 comments · May be fixed by #10588
Open

Disable account balance verification on startup #10555

bilyana-gospodinova opened this issue Mar 6, 2025 · 0 comments · May be fixed by #10588
Assignees
Labels
enhancement Type: New feature web3 Area: Web3 API
Milestone

Comments

@bilyana-gospodinova
Copy link
Contributor

bilyana-gospodinova commented Mar 6, 2025

Problem

On web3 container startup when the DB is not empty (as it will be on an environment that is not local) the following exception occurs on state initialization:

Error creating bean with name 'mirrorNodeState': Invocation of init method failed
...
Caused by: java.lang.IllegalStateException: Total balance of all accounts does not match the total float: actual: 0 vs expected: 5000000000000000000
2025-03-06 14:10:21     at com.hedera.node.app.service.token.impl.schemas.V0490TokenSchema.createGenesisSchema(V0490TokenSchema.java:194)
2025-03-06 14:10:21     at com.hedera.node.app.service.token.impl.schemas.V0490TokenSchema.migrate(V0490TokenSchema.java:116)
2025-03-06 14:10:21     at com.hedera.mirror.web3.state.components.SchemaRegistryImpl.migrate(SchemaRegistryImpl.java:127)
2025-03-06 14:10:21     at com.hedera.mirror.web3.state.components.ServiceMigratorImpl.lambda$doMigrations$0(ServiceMigratorImpl.java:69)
...

The reason for that is that on startup all of the account balances are summed up and the value is expected to be equal to 50,000,000,000 HBARs (comes from config). Currently the account size is not returned correctly and no actual sum is performed.

Solution

Disable the account balance verification since it is not applicable for the mirror node.

Alternatives

No response

@bilyana-gospodinova bilyana-gospodinova added the enhancement Type: New feature label Mar 6, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Mirror Node Mar 6, 2025
@bilyana-gospodinova bilyana-gospodinova added the web3 Area: Web3 API label Mar 6, 2025
@bilyana-gospodinova bilyana-gospodinova moved this from 📋 Backlog to 🏃‍♀ Sprint backlog in Mirror Node Mar 6, 2025
@kselveliev kselveliev self-assigned this Mar 6, 2025
@steven-sheehy steven-sheehy moved this from 🏃‍♀ Sprint backlog to 👷 In progress in Mirror Node Mar 7, 2025
@bilyana-gospodinova bilyana-gospodinova changed the title Implement AbstractReadableKVState#size() Disable account balance verification on startup Mar 10, 2025
@steven-sheehy steven-sheehy added this to the 0.126.0 milestone Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type: New feature web3 Area: Web3 API
Projects
Status: 👷 In progress
3 participants