A Step Towards Subnet Sovereignty + Improved DevX #68
Replies: 10 comments 20 replies
-
I like the rationale and overall support the idea! One question I have: will the proposed implementation of Subnet Staking Request be dependent on Warp relays? And if so, what could the consequences be for introducing a dependency external to the network, for such a critical operation? |
Beta Was this translation helpful? Give feedback.
-
This is huge. It enables a LOT of use cases around staking and removes friction points of P-Chain staking (especially import/export). I have a few questions:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for proposing this! Can you clarify this part?
A subnet validator will have to run the P-Chain. Running the P-Chain means you can know whether the rest of the P-Chain validators accepted or rejected your proposed change. Why is a light client necessary here? |
Beta Was this translation helpful? Give feedback.
-
Interesting idea! So it seems that, in this model, subnet validators will still sync the p-chain but get more customization on how their validator set is created and managed. How would this model pair with ACP-13, if implemented as proposed, to ensure the subnet validators make the 500 AVAX lock to become a Subnet only validator? Also, how would the P-Chain be assured the validator information for a particular Subnet is current? I am wondering if giving Subnets more freedom from the rules set by the P-Chain introduces a risk that the Subnet validators fail to update the P-Chain with the current validator set and stake weight and how that would impact AWM. |
Beta Was this translation helpful? Give feedback.
-
This indeed goes hand-in-hand with ACP-13 and, in principle, I'm excited to see what this will mean for the subnet ecosystem. As I see it the goal is to make the P-chain more of a communication authentication hub than a chain for managing stake and validator sets. This moves closer to ideas in Cosmos but instead of having a direct chain-2-chain light clients to verify validator set changes here it is chosen to have a dedicated registry in the form of the P-chain. Is this view in any correct? Furthermore it would be helpful for the discussion (these changes will need validator support!) to clarify the role of AVAX after these changes. To have in writing a mental model would be immensely valuable. Questions that naturally come to mind:
Again, I'm all in for the proliferation of both permissioned and (specially) permissionless subnets and this is a welcome proposal. These questions are to instigate the discussion and clarify areas validators might have doubts. |
Beta Was this translation helpful? Give feedback.
-
In the case that a sovereign subnet wants to continue to use Avalanche consensus, how does the subnet communicate its validator set to the engine? |
Beta Was this translation helpful? Give feedback.
-
Just had an idea how to mitigate the risk of transferring the subnet ownership to a non-existing address (for example by a typo in the contract address or a mistake in calculating the P-Chain address from blockchain ID and contract address): When a Subnet transfers the validator set management to a smart contract the change only takes effect after an initial message to claim the validator management from that contract has been received. If an error has been made, the Subnet can just an issue a new transaction transferring the validator set management to the correct address. The claim message is only accepted from the latest address. |
Beta Was this translation helpful? Give feedback.
-
Really love these ideas and this is a great discussion. Would love to see a solution like this that would allow a more decentralized and automatic management of the validator set for subnets implemented. |
Beta Was this translation helpful? Give feedback.
-
The proposal for subnets to independently manage their validator sets could significantly enhance the Avalanche ecosystem. How will this contribute to decentralization, and what are the potential impacts on security? Additionally, the concept of Subnet Accounts seems promising for improving DevX by offering more intuitive and accessible tools. I believe these innovations could have a positive effect on both the network's performance and user experience. |
Beta Was this translation helpful? Give feedback.
-
Re Subnet Orchestrated Validator Sets: I think it might be interesting both: 1. Subnets managing validator set; 2. P-chain managing staking/delegation; The advantage of latter is to enable restaking while former gives more soverignity. Also, important to note that we do validator set reconfigurations at epoch intervals, at end of a day. So, this is not time critical generally. I think this needs a mechanism to ensure that updates to validator set happens correctly. What if a malicious actor would not want to update the validator set - needs more research here. But overall, I am looking forward to it. |
Beta Was this translation helpful? Give feedback.
-
A Step Towards Subnet Sovereignty + Improved DevX
There's a clear need for Avalanche Subnets to maintain greater fault isolation, customizability, and sovereignty from the Avalanche Primary Network in order for the Avalanche Ecosystem thrive.
In my view, the three biggest drawbacks of managing all validator sets on the P-Chain are:
The alternative is simple. Subnets orchestrate their own validator set and notify the P-Chain of the updates. Validator sets gain full independence and keep the P-Chain up to date for cross-chain communication.
To achieve this, I’d propose that Subnets use a native staking module to manage their own validator set, and generate a Subnet Warp Signature to send the update to the P-Chain. The P-Chain can then verify the Subnet’s Warp Signature and execute the validator set update. To ensure staking integrators can handle everything in one place (one subnet), Subnets can additionally implement a standardized “Subnet Staking Request” executed via Warp.
Subnet Accounts
Subnet Accounts will be defined as an account owned by a Subnet itself (Subnet as a sovereign, group identity). Just like any other account, a Subnet account will be able to hold and own funds on any Subnet (addressed by their SubnetID) and sign transactions using Warp signatures.
Similarly to ACP-30, to implement Subnet Accounts, VMs will implement a trigger (send) and a handler (receive and execute). The key difference is that Subnet Accounts will sign transactions on behalf of the Subnet itself, so it will require a different access control mechanism than user initiated transactions (the trigger).
The handler VM will need to verify the Subnet Account Transaction signature and define what functionality is available to Subnet Accounts. This could be as simple as making Subnet Account Signatures a drop-in replacement or alternative to whatever signature schemes the VM uses, or separating out the functionality available to Subnet Accounts.
Subnet Orchestrated Validator Sets
Subnet Accounts will be used to implement a VM-native staking module. For example, the Subnet-EVM could use a precompile to implement Proof-of-Stake using its own native token. After a staking update is accepted, the staking module triggers a Subnet Account Transaction to notify the P-Chain of the validator set change.
Optionally, if there’s a desire to keep the Subnet validator set exactly up-to-date with the P-Chain, the Subnet can wait for a P-Chain lightclient to provide an acceptance proof before the Subnet's validator set actually updates.
Any other VM can implement its own staking module with custom staking logic if desired as long as the updates fit the specification for Subnet Account Transactions that can be executed on the P-Chain.
The simplest version of that interface and the fastest path would add a Subnet Account auth type to the P-Chain in addition to the existing secp256k1 feature extension. This would make Subnet Account signatures a drop-in alternative to secp256k1 signatures, allowing Subnets to sign any transaction type on the P-Chain.
In this model, the flow for creating a self-orchestrating Subnet would be:
Note: this can also provide ERC-20 staking out of the box since the Subnet VM can implement a staking module that uses its own native token as the staking token. Subnets can then bridge their native token back and forth to the C-Chain via Warp.
This significantly reduces the scope of the P-Chain to the minimum required functionality for cross-chain communication.
Standardized Subnet Staking Request
One drawback of switching to Subnet orchestrated validator sets is that it creates multiple integration points for staking providers. Instead of managing liquidity, transaction fees, and staking rewards in one place (the P-Chain), staking providers would need to integrate each Subnet independently.
To reduce the friction for staking providers, a standardized cross-chain “Subnet Staking Request” can replace the single integration point.
For any two Subnets A and B that implement a standardized interface for "Subnet Staking Requests," the flow would be:
This approach would also provide a huge unlock for liquid staking providers that want to use smart contracts to administer staking for both the Primary Network and Subnets.
Future Work
Acknowledgements
Huge thanks to @luigidemeo1, @patrick-ogrady, @StephenButtolph, @dhrubabasu, @richardpringle, @joshua-kim, @michaelkaplan13, @ceyonur, @darioush, and @sm86 for their feedback on these ideas!
Beta Was this translation helpful? Give feedback.
All reactions