0xMiden / 0xMiden/node

Refactor account management in ntx-builder

未关闭
#2,486 2 条评论 0 个 reaction 已指派 1 人 已被 @SantiagoPittella 认领 在 GitHub 查看
network transactions
主要语言
Rust
星标
104
派生
138
平均合并
1 天 13 小时
30 天内合并 PR
56

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。