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.
ACP-30 proposes integrating Avalanche Warp Messaging into Avalanche's C-Chain and Subnet-EVM, making cross-subnet communication a standard feature of these EVM environments.
This article translates, summarizes, and expands on the specification below.
Other articles cover a range of EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.
Overview
ACP-30 aims to integrate Avalanche Warp Messaging (AWM) into the C-Chain and Subnet-EVM to enable cross-subnet communication in Avalanche's EVM environments. This allows EVM-compatible chains to exchange messages seamlessly, significantly improving interoperability within the Avalanche ecosystem.
Motivation
One of Avalanche's distinguishing features is the ability to create independent blockchains through what are known as Subnets. Each Subnet operates according to its own rules while remaining part of the broader Avalanche network. The validator sets for these Subnets are registered on Avalanche's P-Chain. The P-Chain serves as Avalanche's coordination chain, maintaining a central record of which validators validate which Subnets across the network.
AWM offers the following benefits.
-
More efficient cross-subnet communication Each Subnet can read the validator sets of other Subnets through the P-Chain. When verifying AWM messages, Subnets therefore do not need to exchange validator information directly.
-
Lightweight, on-demand communication The P-Chain allows any Subnet to communicate with other Subnets as needed. This lightweight protocol enables trusted cross-subnet communication without complex setup in advance or continuous information sharing.
-
A standard implementation ACP-30 introduces AWM to the C-Chain and Subnet-EVM, providing the first standardized means of cross-subnet communication on Avalanche. EVM developers can use it to build more flexible and capable decentralized applications (DApps) within the Avalanche network.
Specification
Precompile basics
- WarpPrecompile address:
0x0200000000000000000000000000000000000005
This is one of the built-in contracts provided by the EVM and can be called at this address.
Interface
WarpPrecompile implements the following interface.
pragma solidity ^0.8.0;
struct WarpMessage {
bytes32 sourceChainID;
address originSenderAddress;
bytes payload;
}
struct WarpBlockHash {
bytes32 sourceChainID;
bytes32 blockHash;
}
interface IWarpMessenger {
event SendWarpMessage(address indexed sender, bytes32 indexed messageID, bytes message);
function sendWarpMessage(bytes calldata payload) external returns (bytes32 messageID);
function getVerifiedWarpMessage(uint32 index) external view returns (WarpMessage calldata message, bool valid);
function getVerifiedWarpBlockHash(uint32 index) external view returns (WarpBlockHash calldata warpBlockHash, bool valid);
function getBlockchainID() external view returns (bytes32 blockchainID);
}What each component does
| Component | Description |
|---|---|
WarpMessage |
A verified Warp message containing the source chain ID, sender address, and payload. |
WarpBlockHash |
A verified block hash containing the chain ID and hash value. |
sendWarpMessage |
Requests that a Warp message be sent. A log is emitted so validators can identify the message to sign. |
getVerifiedWarpMessage |
Retrieves a pre-verified message by index. |
getVerifiedWarpBlockHash |
Retrieves a pre-verified block hash by index. |
getBlockchainID |
Returns the blockchain ID of the current chain, which is distinct from the Ethereum chain ID. |
WarpPredicate and pre-verification
Warp messages are pre-verified using the EIP-2930 access list before transaction execution. Pre-verification records a bitset in the block indicating which messages are valid. The bitset can be reused during EVM execution or when verifying historical blocks.
For more on EIP-2930, see the following article.
[EIP-2930] Introducing a Transaction Type with an Access List
Procedure
- Read the Warp data in the access list from its byte representation and reconstruct each field with the appropriate type, including the source chain ID, sender address, message body, and signatures.
- Extract the components of the signed Warp message from the reconstructed data and validate their format, including required fields and field sizes.
- Verify the signatures according to the Avalanche Warp Messaging specification. Specifically, check whether the aggregate BLS signature meets the required weight threshold against the weighted validator set of the source Subnet (67% [67/100] by default on the C-Chain, configurable on Subnet-EVM). Record the verification result in a per-transaction result bitset so it can be referenced during subsequent EVM execution.
Indexing rules within the access list
The EIP-2930 access list is an array of access entries, each consisting of an address and an array of storage keys.
Warp counts only entries whose address is the WarpPrecompile address (0x0200...0005), assigning indices in order of appearance starting at zero.
Entries for other addresses are not counted.
Access list order and Warp message indices
| Access list position | Example address | Example storageKeys | Counted? | Warp message index |
|---|---|---|---|---|
| 0 | 0x0200000000000000000000000000000000000005 (Warp) |
[kA, kB] |
Yes | 0 |
| 1 | 0x1111111111111111111111111111111111111111 (arbitrary) |
[x1] |
No | — |
| 2 | 0x0200000000000000000000000000000000000005 (Warp) |
[kC] |
Yes | 1 |
| 3 | 0x2222222222222222222222222222222222222222 (arbitrary) |
[] |
No | — |
| 4 | 0x0200000000000000000000000000000000000005 (Warp) |
[kD, kE] |
Yes | 2 |
In this example, entries for the WarpPrecompile address receive indices 0, 1, 2, and so on in order of appearance.
When a contract calls getVerifiedWarpMessage(1), it references the verified message corresponding to index 1 in the table (the second Warp entry in the access list).
Entries for other addresses (such as 0x1111… and 0x2222…) are excluded from the index calculation.
Implementation calling conventions
- The first four bytes of calldata are read as the function selector, and the corresponding function is called.
- Input and output encoding follows the Solidity ABI specification.
The reference implementation is available at the following links.
- sendWarpMessage: contract.go#L226
- getVerifiedWarpMessage: contract.go#L187
- getVerifiedWarpBlockHash: contract.go#L145
- getBlockchainID: contract.go#L96
Gas costs
WarpPrecompile charges gas for both pre-verification and execution.
Verification costs
| Item | Gas |
|---|---|
| Per signature verification | 20,000 |
| Per message byte | 100 |
| Per signer | 500 |
The design is calibrated to maintain performance comparable to existing EVM precompiles.
Execution costs
| Function | Gas | Notes |
|---|---|---|
sendWarpMessage(payload) |
41,500 + 8 × payload size in bytes | Includes log emission, BLS signature presentation, and message storage |
getBlockchainID() |
2 | Simply returns a value from memory |
getVerifiedWarpMessage / getVerifiedWarpBlockHash |
2 + 100 × message size in bytes | Includes the cost of unpacking into a struct |
Compatibility
Enabling Avalanche Warp Messaging (AWM) does not change the behavior of existing EVM opcodes or other precompiles (built-in contracts). It is an additive proposal that enables WarpPrecompile. Existing contracts remain unaffected unless they explicitly call WarpPrecompile. In addition to activation on Avalanche's C-Chain, activation can be scheduled on any Subnet VM that supports sending and verifying the specified payload format.
Security
AWM verification requires the source Subnet's validator set (the validators and their weights at the relevant time) at a specific P-Chain block height. The Snowman++ block extension (extension metadata attached to the block by ProposerVM) specifies which block height to reference. PlatformVM maintains the current P-Chain state. By applying reversediff-layers (a sequence of state differences that reconstruct earlier states from the current state), it can reconstruct the validator set at any historical point.
Re-verifying an AWM message that references an older block height requires applying ReverseDiffLayers sequentially from the latest P-Chain state back to the target block height. As Subnets and the P-Chain produce more blocks, more differences must be applied, and verification becomes more expensive over time.
The EVM addresses this problem using the result bitset encoded in the block. Because AWM messages were already verified and accepted by the network when that block was produced, historical verification can determine validity simply by reading the bitset. This makes historical verification more efficient without recomputing historical P-Chain state.
Process
- During block production Verify the AWM signature (including the quorum check) against the source Subnet's ValidatorSet at the specified P-Chain block height, and write the result into the block as a result bitset.
- Future historical verification (the straightforward approach) To verify an old AWM message again, reconstruct the ValidatorSet by applying ReverseDiffLayers sequentially from the latest P-Chain state back to the target block height. The computational cost grows as more blocks are produced.
- The actual optimization Read the result bitset embedded in the historical block to determine validity. Because the message was already verified and accepted, there is no need to reconstruct historical P-Chain state.
Conceptual diagram
The original diagram retains its Japanese labels.
sequenceDiagram participant Proposer as ブロック提案ノード participant PlatformVM as PlatformVM(P-Chain) participant EVM as EVM(実行) participant Block as ブロック(結果ビットセット) Proposer->>PlatformVM: 指定P-ChainのBlockHeightのValidatorSetを取得 Proposer->>Proposer: AWMの署名検証(クォーラム判定) Proposer-->>Block: トランザクションごとの結果ビットセットを書き込む Note over Block: 検証結果がブロックに保持される EVM->>Block: 過去ブロックの結果ビットセットを参照 EVM-->>EVM: AWMの有効/無効を即時判定(P-Chain過去ステートの再計算なし)
Open questions
The issue
AWM verification retrieves the ValidatorSet (the list of validators and their weights) at the referenced P-Chain block height to verify the signature. However, the actual cost of retrieving the ValidatorSet (reading the required information from PlatformVM) increases as the referenced block height gets older. More ReverseDiffLayers (a sequence of differences used to roll the latest state back to a historical state) must be applied, increasing computation and I/O. The implementation described in the original article does not include this lookup cost in gas accounting. The question is how to account for this highly node-dependent lookup cost in EVM gas.
| Issue | Description |
|---|---|
| Current gas accounting | The ValidatorSet lookup is not included in gas accounting (excluded from the implementation). |
| Why costs vary | Older referenced block heights require more ReverseDiffLayers, increasing computation and I/O. Actual costs also depend on each validator's local state and cache. |
| Problem | Variable, node-dependent costs are difficult to express as a uniform gas estimate. Overestimation or underestimation can lead to verification delays or inequitable fees. |
| Direction | Parallelize verification to make its impact on block verification latency negligible, and base gas accounting primarily on the amount of AWM data added to a transaction (bandwidth). |
| Term | Description |
|---|---|
| ValidatorSet | The list of validators and their weights at a given block height. |
| ReverseDiffLayers | A sequence of reverse state differences used to reconstruct historical state from the latest state. |
Work in progress
The changes under development described in the original article aim to run P-Chain ValidatorSet lookups and AWM signature verification in parallel so the impact on block verification latency is barely noticeable. This helps reduce the effect of slower lookups at older block heights on overall verification latency.
Conceptual diagram of parallel verification
The original diagram retains its Japanese labels.
flowchart TD
A[Tx受領: AWM含む] --> B{各Txの検証フェーズ}
B -->|並列| C[ValidatorSet参照処理<br/>PlatformVM, Block Height]
B -->|並列| D[AWM署名データの復元/前処理]
C --> E[しきい値判定用の鍵と重みを取得]
D --> F[BLS集約署名の検証準備]
E --> G[署名検証(クォーラム判定)]
F --> G
G --> H[結果ビットセットに反映]
H --> I[ブロックに結果をエンコード]
This pipeline overlaps lookup operations with verification preparation to make the additional waiting time nearly imperceptible. The results are stored in the block as a result bitset, allowing future historical verification to avoid recomputation by reading the bitset.
Implications for gas design
If parallelization makes the latency impact small enough, gas can be designed around the following factors.
- The additional data (in bytes) introduced by including AWM in the transaction
- The base cost of signature verification (BLS aggregate signature verification, plus a charge based on the signer count)
This approach avoids reflecting node-specific variation in historical block-height lookups in gas fees, making gas pricing more predictable and equitable.
Conclusion
This article covered ACP-30, the proposal to integrate Avalanche Warp Messaging into the C-Chain and Subnet-EVM and provide cross-subnet communication as a standard EVM feature.
If you have questions, feel free to contact me via Twitter DMs.
I also publish on the following platforms.


