-
Notifications
You must be signed in to change notification settings - Fork 662
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
[vms/platformvm] Add tracking of a Subnet manager #3126
Conversation
Signed-off-by: Dhruba Basu <7675102+dhrubabasu@users.noreply.github.com>
@@ -21,6 +21,7 @@ var DefaultExecutionConfig = ExecutionConfig{ | |||
ChainDBCacheSize: 2048, | |||
BlockIDCacheSize: 8192, | |||
FxOwnerCacheSize: 4 * units.MiB, | |||
SubnetManagerCacheSize: 2048, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty confusing. All of the bytes caches use units.MiB
to be clear that it is representing bytes. All of the other values are denominating the number of entries.
This entry is interpreted as bytes - but is set as if it is in the number of entries.
I think we should either be specifying 2 * units.KiB
or we should be setting this to a different value (if the assumption was that this is denominated in entries rather than bytes)
vms/platformvm/state/state_test.go
Outdated
}, | ||
{ | ||
name: "cache", | ||
setup: func(s State, subnetID ids.ID, chainID ids.ID, addr []byte) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this pass in the *testing.T
or the *require.Assertions
? Right now this function is executed by the inner test but uses the outer testing struct.
Why this should be merged
ACP-77 introduces a notion of a "Subnet manager" defined as a
sourceChainID
andsourceAddress
pair. This PR adds tracking of this pair to the P-Chain state.How this works
Adds support for storing and retrieving a
chainID
andaddr
for each SubnetHow this was tested
CI + added UTs