Polygon Protocol Governance Call (PPGC) #19

An Overview of PPGC #19

Moving forward, Blockworks Research will be providing Polygon and its community with monthly overviews on the PPGC calls.

On May 4, 2024, Polygon developers met for the Polygon Protocol Governance Call (PPGC) #19 to discuss and finalize inclusions for the upcoming hard fork. The main focus was on PIP 22, PIP 36, PIP 30, and increasing the minimum gas price.

With the inclusion list finalized, Polygon will target shipping these changes at the end of May or early June depending on testnet deployment timelines. The next PPGC meeting is tentatively scheduled for May 30 but may shift a week or two to align with the rollout.

PIP 22 (EIP 3074)

Manav Darji from the Bor client team provided an update on their progress in implementing EIP 3074 style account abstraction. The Bor team has a PR open that implements the AUTH and AUTH_CALL opcodes. Over the past two weeks, they have been adding more tests and accommodating changes to match the latest spec of EIP 3074. Bor is currently testing their implementation internally on a devnet. There are patches for Solidity and Foundry available to test these new opcodes. The next step is to do as much adversarial testing as possible before deploying to Polygon’s testnet.

Harry Rook, Polygon Governance PM, noted recent discussions about potentially including EIP 5003 in the fork after Pectra on Ethereum to mitigate some concerns with EIP 3074. This will likely be a topic in the next PPGC meeting.

Note: EIP 3074 introduces AUTH (sets a context variable authorized based on an ECDSA signature) and AUTHCALL (sends a call as the authorized account). Through EIP 3074, control of the externally owned account (EOA) is delegated to a smart contract.

PIP 36 (Replay Failed State Syncs)

Dhairya Sethi, the author of PIP 36, explained that the purpose is to add the ability to replay failed state syncs until the full migration to the LXLY bridge is complete. It also patches a bug in the Matic token contract related to the gas cost increase of SLOAD in Ethereum’s Berlin hard fork which broke contracts using TRANSFER to send ETH to contracts with code in the RECEIVE or FALLBACK functions.

PIP 36 aims to fix failed state syncs in two ways:

  1. Replace TRANSFER with CALL in the Matic token contract to provide sufficient gas and prevent failed deposits when the receiver is a contract with code. This requires a hard fork since the contract is not upgradeable.

  2. Add the ability to replay failed state syncs, both past and future. For past failed state syncs between the Shanghai fork and, a Merkle tree will be constructed of the failed state IDs so users can prove and replay their failed state sync. For future failed state syncs, the contract will store the receiver and calldata so it can be replayed externally. Security considerations are taken to prevent reentrancy and ensure immutability of the replayed transaction.

The failed state syncs that occurred from block 38,457,210 (around Nov 30, 2023) up to the fork will be replayable.

PIP 30 (Increase Max Code Size Limit)

David Silverman explained PIP 30 which proposes increasing the max code size and max initcode size by 33% to allow deploying more complex contracts. The current limits were set arbitrarily in the Spurious Dragon hard fork and developers are now frequently hitting these limits. Analysis shows this increase would not negatively impact the ZK migration plans. The intent is to slowly raise this limit, potentially moving to even higher values later in conjunction with the rollup coordination group.

Minimum Gas Price Increase

Marcelo Ardizzone presented a new PIP to increase the default minimum gas price to 30 gwei to reduce spam transactions. Currently this is just a node client setting, not a network level parameter. Having different minimum gas prices across validators leads to transactions getting stuck if they are priced for a validator with a lower minimum.

The PIP enforces the 30 gwei minimum at the network level in three ways:

  1. Sets the default minimum gas price for validators to 30 gwei

  2. Sets the default gas price limit for accepting txs into the transaction pool to 30 gwei

  3. Sets the threshold below which the gas price oracle ignores transactions to 30 gwei

This is implemented via code changes in the Bor and Erigon clients. Validators can still set custom gas parameters if desired by modifying the client code and running a custom version.

With no major concerns expressed, developers seemed ready to move forward with this inclusion list for the upgrade. The Bor and Erigon teams confirmed they are okay with the proposed changes.

Coordination with Ethereum

When asked about coordination with Ethereum’s Pectra upgrade that also plans to include EIP 3074, David Silverman said the intention is for Polygon to move ahead of Ethereum on this as they have done with previous upgrades like EIP 7212. Protocol developers are working closely with rollup teams who are also implementing 3074 to maintain compatibility. The hope is that Ethereum does not intentionally try to break this compatibility.

Next Steps

With the inclusion list finalized, protocol developers will target shipping these changes at the end of May or early June depending on testnet deployment timelines. The next PPGC meeting is tentatively scheduled for May 30 but may shift a week or two to align with the rollout.

2 Likes