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

ACP-77: Add ConversionID to state #3481

Merged
merged 14 commits into from
Oct 20, 2024

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

Factored out of #3388.

How this works

Adds the ConversionID to the ChainID and Address pair stored on disk after converting a subnet to an L1.

How this was tested

  • Updated unit tests

@StephenButtolph StephenButtolph added this to the v1.11.13 milestone Oct 19, 2024
@StephenButtolph StephenButtolph self-assigned this Oct 19, 2024
vms/platformvm/client.go Outdated Show resolved Hide resolved
vms/platformvm/state/state.go Outdated Show resolved Hide resolved
// Set the new Subnet manager in the database
e.State.SetSubnetManager(tx.Subnet, tx.ChainID, tx.Address)
// Track the subnet conversion in the database
// TODO: Populate the conversionID
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to not calculate the conversion ID here now? Seems somewhat trivial since all the data to calculate is available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SubnetConversionTx changes are in #3397. So those are already pulled out into a separate PR.

vms/platformvm/state/diff.go Outdated Show resolved Hide resolved
vms/platformvm/state/state_test.go Outdated Show resolved Hide resolved
vms/platformvm/state/diff_test.go Outdated Show resolved Hide resolved
vms/platformvm/state/state.go Show resolved Hide resolved
@@ -1226,8 +1229,10 @@ platform.getSubnet({
a permissioned subnet. If the Subnet is a PoS Subnet, then `threshold` will be `0` and `controlKeys`
will be empty.
- changes can not be made into the subnet until `locktime` is in the past.
- `subnetTransformationTxID` is the ID of the transaction that changed the subnet into a elastic one,
for when this change was performed.
- `subnetTransformationTxID` is the ID of the transaction that changed the subnet into an elastic one, if it exists.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `subnetTransformationTxID` is the ID of the transaction that changed the subnet into an elastic one, if it exists.
- `subnetTransformationTxID` is the ID of the transaction that changed the subnet into an L1, if it exists.

Copy link
Contributor

@meaghanfitzgerald meaghanfitzgerald Oct 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

realized this is probably only referencing the tx hash of TransformSubnetTx can this field not be removed from the response since it has been deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to remove this as part of this PR.

@StephenButtolph StephenButtolph added this pull request to the merge queue Oct 20, 2024
Merged via the queue into master with commit dcb2f70 Oct 20, 2024
23 checks passed
@StephenButtolph StephenButtolph deleted the implement-acp-77-add-conversion-id branch October 20, 2024 19:51
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.

4 participants