sui
sui copied to clipboard
Move expensive_check_sui_conservation to node init
Description
As titled. @lxfind this should help to retrieve type layout in a safer way (second commit here). Please let us know if you see any issue with that
Test Plan
Existing tests
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration
Release notes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
(The change to introduce the new Session API is otherwise good though)
I assume we cannot just create a new VM on-the-fly for the conservation check?
By the way, the primary conservation check is in fact called during reconfiguration. The one at genesis is just to initialize it. We will need to deal with both if we need to make changes.
By the way, the primary conservation check is in fact called during reconfiguration. The one at genesis is just to initialize it. We will need to deal with both if we need to make changes.
correct and the one in reconfiguration is in authority so with "easy" access to the VM.
The call while creating the AuthorityStore
is the "complicated" one
made a change to create perpetual tables outside the AuthorityStore
, let's see if it seems reasonable.
Thanks!
I assume we cannot just create a new VM on-the-fly for the conservation check?
We can do this, but then it may involve doing a lot of extra work to load the relevant packages into the VM during the conservation check that we would otherwise avoid by using the same VM.
I assume we cannot just create a new VM on-the-fly for the conservation check?
We can do this, but then it may involve doing a lot of extra work to load the relevant packages into the VM during the conservation check that we would otherwise avoid by using the same VM.
right, as @amnn said we thought it was a bit too much and it was nice to use the same VM as what is created for the authority state. It also played a role that the solution we are implementing is a "temporary" solution until we review the layout story entirely
We can do this, but then it may involve doing a lot of extra work to load the relevant packages into the VM during the conservation check that we would otherwise avoid by using the same VM.
It uses an internal module cache so it might not be too bad
It does, but it will entirely replicate that inside the VM, multiple times over.
Looks reasonable change to me. Now that we have empty_table outside there, I wonder if it could be used to simplify other things (not sure, but worth a quick check)
let's chat tomorrow about it as I keep going with the implementation of the overall change. We will also take a look at what else could be simplified
ok this is ready so let's try to get a review and make sure everything is good
made suggested changes unless otherwise commented