-
Notifications
You must be signed in to change notification settings - Fork 1
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
Data model for lightweight mode on MvStorage #3
Comments
SharedheaderById: Map[HeaderId, Value] // Probably best to only keep n headers?
// Most of dApps will only need the last 10
// headers to be used as reduction context.
headerIdsByHeight: Map[Height, Set[HeaderId]] UnspentboxById: Map[BoxId, Value]
boxIdsByContract: Map[ContractHex, Set[BoxId]]
boxIdsByContractTemplate: Map[TemplateHex, Set[BoxId]] // Constant segregated contract template
boxIdsByCreationHeight: Map[Height, Set[BoxId]
boxIdsByR4: Map[RegisterHex, Set[BoxId]] // Non-empty R4 register
boxIdsByR5: Map[RegisterHex, Set[BoxId]] // Non-empty R5 register
boxIdsByR6: Map[RegisterHex, Set[BoxId]] // Non-empty R6 register
boxIdsByR7: Map[RegisterHex, Set[BoxId]] // Non-empty R7 register
boxIdsByR8: Map[RegisterHex, Set[BoxId]] // Non-empty R8 register
boxIdsByR9: Map[RegisterHex, Set[BoxId]] // Non-empty R9 register
boxIdsByTokenId: Map[TokenId, Set[BoxId]]
boxIdsByTransactionId: Map[TransactionId, Set[BoxId]] SpentSpent boxes needs all Unspent maps plus the following: mintingBoxIdsByTokenId: Map[TokenId, Set[BoxId]] // EIP-4 only considers one minting box
// per token, but protocol allows multiple
// boxes in the same minting transaction,
// so best to follow the protocol.
|
Copy/pasting some rest-endpoints from @arobsn
|
I keep uexplorer on Scala3, I'm currently spiking this on multiple tech stacks, started with There are 2 choices in the scala ecosystem when it comes to SQL : |
Schema for embedded database
Finding out if any box related data have been spent or not in query time puts huge pressure on DB
=> let's do that at indexing time so that queries are real-time !
Shared
Unspent/NonEmpty
Spent
There can be many of these indexes, please provide your suggestions and use-cases!
Facts to consider :
addresses
so that dApps developers can customize the explorer for their needs
Eventually the Http API will allow for retrieving anything that can be put together from these persistent Maps.
The text was updated successfully, but these errors were encountered: