0xMiden / 0xMiden/node

Refactor account management in ntx-builder

Aperta
#2,486 2 commenti 0 reazioni 1 assegnatario Rivendicata da @SantiagoPittella Vedi su GitHub
network transactions
Lingua principale
Rust
Stelle
104
Fork
138
Merge medio
1g 13h
PR unite (30g)
56

Descrizione

We measured the `ntx-builder` with a large account (1M storage map entries) and realized that the current approach with the full `Account` in-memory is not scalable.

We should try an alternative, treating the native accounts the same way the foreign-account path already does which is using the store as an oracle, and the ntx-builder holds only the header state in memory. It requires some changes to the database, but overall reduces the amount of code. In memory we would have a PartialAccount which isn't a problem long term. This approach also prevents the divergence that we had in the past of the in memory account not matching the node one, since the store is only updated by proven blocks and all the state is read from there.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.