Skip to content
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

Merged
merged 33 commits into from
Aug 2, 2024

Conversation

dhrubabasu
Copy link
Contributor

@dhrubabasu dhrubabasu commented Jun 18, 2024

Why this should be merged

ACP-77 introduces a notion of a "Subnet manager" defined as a sourceChainID and sourceAddress pair. This PR adds tracking of this pair to the P-Chain state.

How this works

Adds support for storing and retrieving a chainID and addr for each Subnet

How this was tested

CI + added UTs

@dhrubabasu dhrubabasu added this to the v1.11.9 milestone Jun 18, 2024
@dhrubabasu dhrubabasu self-assigned this Jun 18, 2024
Signed-off-by: Dhruba Basu <7675102+dhrubabasu@users.noreply.github.com>
vms/platformvm/config/execution_config_test.go Outdated Show resolved Hide resolved
vms/platformvm/state/diff.go Outdated Show resolved Hide resolved
vms/platformvm/state/state.go Outdated Show resolved Hide resolved
vms/platformvm/state/state.go Show resolved Hide resolved
vms/platformvm/state/state.go Outdated Show resolved Hide resolved
vms/platformvm/state/state_test.go Show resolved Hide resolved
@dhrubabasu dhrubabasu changed the base branch from master to cleanup-execution-config-test June 21, 2024 15:53
Base automatically changed from cleanup-execution-config-test to master June 24, 2024 12:35
vms/platformvm/state/state.go Outdated Show resolved Hide resolved
vms/platformvm/state/state.go Outdated Show resolved Hide resolved
@StephenButtolph StephenButtolph modified the milestones: v1.11.9, v1.11.10 Jul 1, 2024
vms/platformvm/state/diff_test.go Show resolved Hide resolved
vms/platformvm/state/state.go Show resolved Hide resolved
@@ -21,6 +21,7 @@ var DefaultExecutionConfig = ExecutionConfig{
ChainDBCacheSize: 2048,
BlockIDCacheSize: 8192,
FxOwnerCacheSize: 4 * units.MiB,
SubnetManagerCacheSize: 2048,
Copy link
Contributor

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)

},
{
name: "cache",
setup: func(s State, subnetID ids.ID, chainID ids.ID, addr []byte) {
Copy link
Contributor

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.

@StephenButtolph StephenButtolph added this pull request to the merge queue Aug 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 1, 2024
@StephenButtolph StephenButtolph added this pull request to the merge queue Aug 2, 2024
Merged via the queue into master with commit 9574f76 Aug 2, 2024
20 checks passed
@StephenButtolph StephenButtolph deleted the store-warp-addressed-call-pair branch August 2, 2024 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants