hiero-ledger / hiero-ledger/hiero-consensus-node
Additional Validations to `StateValidator` tool
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 407
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
We can add more validations in StateValidator tool like validating the links of tokenRelationships for the fungible and non-fungible tokens owned by an Account
Each Account has headTokenId and headNftId fields. When this token relation for the account and tokenId is looked up in TokenRelation virtual map , this will have the prev and next pointers pointing to the next token that that account is related to.
We need to validate the tokenRelations link is not broken for each account.
The same applies for NFTs, if we look up the Nft with the account headNftId the prev and next pointers should not be broken.
Each account tracks the number of NFTs owned with number_owned_nfts field .
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the StateValidator tool and the referenced account.proto, token_relation.proto, and nft.proto definitions. Trace account headTokenId and headNftId through the token relationship and NFT links, then validate that prev/next pointers are intact and that number_owned_nfts matches the owned NFTs; add or run the relevant validator tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100