Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines ACP-151, which proposes changing the P-Chain BlockHeight passed by ProposerVM to the inner VM from the parent block's BlockHeight to the BlockHeight associated with the block currently being built, reducing waiting time in ICM aggregate signature verification by using a more up-to-date validator set.

This article translates, summarizes, and supplements the material linked below.

I have also covered other EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

ACP-151 changes the P-Chain BlockHeight reference passed from ProposerVM, the component supplying additional context during block construction, to the inner VM such as an EVM.

Instead of using the reference associated with the parent block, it uses the reference associated with the block currently being built.

The inner VM uses this P-Chain BlockHeight to verify aggregate signatures in Avalanche Interchain Messages (ICM). An aggregate signature combines multiple signatures into one.

Using the current block's reference makes it possible to identify the relevant participating validators more promptly and remove unnecessary waiting periods.

What Is the Inner VM?

The inner VM is the virtual machine beneath ProposerVM that actually processes transactions and verifies messages.

In Avalanche, ProposerVM wraps an application VM such as an EVM.

  • ProposerVM Handles block construction and coordination, supplying additional information such as BlockHeight to the inner VM.
  • Inner VM (such as EVM) Executes transactions and verifies ICM message signatures.

The following table summarizes the change in verification context.

Aspect Before the proposal After the proposal
P-Chain BlockHeight passed to the inner VM Parent block's height reference Current block's height reference
Reference for ICM aggregate signature verification Previous block's context Current block's context
Expected effect Delayed identification of participating validators and waiting periods More timely identification of validators and reduced waiting
  • P-Chain Avalanche's Platform Chain, which manages validator sets and staking.
  • ProposerVM A wrapper that passes necessary context to the inner VM during block construction.
  • Inner VM A VM such as the EVM responsible for executing transactions and verifying messages.
  • ICM (Avalanche Interchain Messages) A mechanism for exchanging messages between chains.
  • Aggregate signature A single signature combining multiple signatures. The aggregation scheme itself is outside the scope of this article.

Before: Using the Parent Block's BlockHeight

sequenceDiagram
    autonumber
    participant ProposerVM
    participant InnerVM
    participant P-Chain
    ProposerVM->>InnerVM: 親ブロックのBlockHeightを渡す
    InnerVM->>P-Chain: ICM集約署名の検証(親BlockHeight基準)
    note over InnerVM: 参加すべきバリデータ集合の反映に待機が発生

After: Using the BlockHeight of the Block Being Built

sequenceDiagram
    autonumber
    participant ProposerVM
    participant InnerVM
    participant P-Chain
    ProposerVM->>InnerVM: 構築中ブロックのBlockHeightを渡す
    InnerVM->>P-Chain: ICM集約署名の検証(現在のBlockHeight基準)
    note over InnerVM: 参加判定の鮮度が上がり、不要な待機を削減

Motivation

Previously, ProposerVM passed the parent block's P-Chain BlockHeight reference to the inner VM, which used that value to verify ICM messages in the block currently being built.

Using the parent block's reference is necessary to validate the block proposer and reach consensus on the current block. However, ICM message verification within the block does not necessarily require the same reference.

Switching to the current block's reference allows operations that modify validator sets through ICM, including operations of the kind described in ACP-77, to be verified sooner and more reliably.

See the following article for ACP-77.

[ACP-77] Moving Validator Management to L1s

Under the previous mechanism, at least two new P-Chain blocks must be produced after a relevant state change before the change is reflected in ICM aggregate signature verification.

This introduces waiting time before the applicable validator set can be evaluated and affects how promptly the verification context reflects changes.

Using the current block's BlockHeight reference reduces this delay and removes unnecessary waiting. The goal is to distinguish the context necessary for consensus (the parent block's reference) from the context necessary for ICM message verification (the current block's reference). This allows operations such as validator-set changes through ICM to be incorporated more promptly and reliably.

Specification

The Role of BlockContext and PChainHeight

AvalancheGo provides a block_context mechanism that includes a field named PChainHeight.

ProposerVM passes this field to the inner VM, such as an EVM, for use during block construction. In particular, the inner VM uses it as a reference for retrieving the validator set required to verify ICM aggregate signatures.

Avalanche identifies the validators eligible to sign using the canonical validator set at a particular P-Chain BlockHeight.

PChainHeight provides the reference for retrieving that set.

Previous Behavior

In the previous implementation, ProposerVM passed the P-Chain height associated with the parent block as PChainHeight to the inner VM.

Instead of the current block's reference, validator-set retrieval therefore used the parent block's reference.

This behavior is appropriate for proposer validation and for checking the information required by consensus. However, the parent block's reference is not necessarily required for ICM message verification.

Proposed Change

The proposal changes the PChainHeight supplied to the inner VM to the reference associated with the block currently being built.

  • Before PChainHeight = parent block's P-Chain BlockHeight reference.
  • After PChainHeight = current block's P-Chain BlockHeight reference.

This allows the inner VM to use a more up-to-date canonical validator set, enabling faster and more timely ICM aggregate signature verification.

Compatibility

Introducing this change requires an upgrade because all validators must use the same P-Chain BlockHeight and corresponding validator set when determining whether an ICM message is valid.

If only some nodes adopt the new mechanism while others continue using the parent block's reference, they may evaluate different validator sets and disagree on validity.

Nodes must therefore continue using the parent block's reference until the upgrade is activated.

Reference Implementation

The AvalancheGo implementation of ACP-151 is available in the following pull request.

It modifies how ProposerVM sets PChainHeight in block_context, passing the current block's reference to the inner VM. This makes a more up-to-date validator set available during ICM verification.

Security

ProposerVM must continue using the parent block's BlockHeight reference to validate the block proposer. This is a security requirement and must not change.

Using the parent block's information for proposer validation helps reject invalid proposals and maintain consensus safety.

The same constraint does not apply to ICM message validity verification under the proposal. Using the current block's reference reflects the relevant validator set more promptly.

The proposal therefore separates these responsibilities to improve the efficiency and timeliness of verification without changing the security requirements for proposer validation.

Conclusion

ACP-151 changes the P-Chain BlockHeight supplied by ProposerVM to the inner VM from the parent block's reference to that of the current block. Its objective is to reduce waiting periods in ICM aggregate signature verification while retaining the existing proposer validation requirements.

If you have questions, feel free to contact me on Twitter.

Twitter @cardene777

I also publish articles on the following platforms.

https://chaldene.net/