Skip to content

Conversation

@ruijialin-avalabs
Copy link
Contributor

@ruijialin-avalabs ruijialin-avalabs commented Oct 16, 2024

This PR adds ConvertSubnetTx to pvm etna builder.

  • added ConvertSubnetTx to pvm codec at index 35

  • added serializable object ConvertSubnetTx and ConvertSubnetValidator

  • moved getMemoComplexity to pvm/txs/fee/complexity.ts and renamed it to getBytesComplexity.

  • added getSubnetValidatorsComplexity and convertSubnetTx to pvm/txs/fee/complexity.ts

  • added INTRINSIC_CONVERT_SUBNET_VALIDATOR_COMPLEXITIES and INTRINSIC_CONVERT_SUBNET_TX_COMPLEXITIES

  • added isConvertSubnetTx typeguard

  • add NODE_ID, BLS_SIGNATURE, and BLS_PUBLIC_KEY to getEnvVars. which gets the value from info.getNodeId for the network

  • added examples to createSubnetTx, createChainTx, convertSubnetTx
    -createSubnetTx and createChainTx have to be issued first before convertSubnetTx can be issued.

  • Successful txs in etna explorer for address P-custom1s4k9fch6uyhvv7necq070nzljgrqvazkpgles6:

    1. createSubnetTx
    2. createChainTx
    3. convertSubnetTx

@ruijialin-avalabs ruijialin-avalabs marked this pull request as draft October 16, 2024 13:44
@ruijialin-avalabs ruijialin-avalabs marked this pull request as ready for review October 16, 2024 15:24
@ruijialin-avalabs ruijialin-avalabs changed the title Convert subnet tx Implement ConvertSubnetTx Oct 16, 2024
Copy link
Member

@erictaylor erictaylor left a comment

Choose a reason for hiding this comment

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

Looking good.

Left some initial comments. Let's make sure we are adding test coverage.

@rictorlome
Copy link
Collaborator

Thank you! Also, could you please add the new builder function to the etna-examples folder? Feel free to add createSubnet too, so we can verify this. Also, please link to a successful tx in the etna explorer, to confirm the network accepts this tx. Thanks

Copy link
Member

@erictaylor erictaylor left a comment

Choose a reason for hiding this comment

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

Looks great. Couple small cleanup requests.

Copy link
Collaborator

@rictorlome rictorlome left a comment

Choose a reason for hiding this comment

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

Thank you. Can this be added to the burn checker as well?

@ruijialin-avalabs ruijialin-avalabs merged commit 0097d86 into master Oct 24, 2024
3 checks passed
@ruijialin-avalabs ruijialin-avalabs deleted the convertSubnetTx branch October 24, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants