Load config from MPT on node starts and update on block finalization
- Dominant language
- Go
- Stars
- 121
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
To avoid loading config from MPT every time when need to access the config info. Such as the code is called each time when selecting blobbers for blobber challenge generation and get config REST handler.
https://github.com/0chain/0chain/blob/f858985cdc34c5ba14378afbe43fc26998c3149e/code/go/0chain.net/smartcontract/storagesc/handler.go#L669-L683
Contributor guide
Research direction
The issue points to handler.go lines 669-683 where config is loaded from MPT. Start by examining the storage smart contract's config loading logic in that file and related packages. Understand how MPT (Merkle Patricia Trie) is accessed and where config is used (e.g., blobber selection). The goal is to cache config on node start and update it on block finalization, so look for initialization and finalization hooks in the codebase. Check linked PRs #2069, #2083, #2090 for prior attempts and context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, blockchain
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100