Skip to content

aave-umbrella: initialize() likely exceeds per-transaction complexity #199

@eugypalu

Description

@eugypalu

Summary

While porting Aave Umbrella to PolkaVM, I observed that some contracts consistently revert during their initialize() calls — most notably RewardsController and Umbrella.


Observations

These contracts follow the typical OpenZeppelin upgradeable pattern and include, within a single initialize() call:

  • AccessControl role setup
  • EIP712 domain separator computation
  • multiple _grantRole() operations
  • initialization of inherited modules with storage writes

On PolkaVM, these calls revert, whereas the exact same logic works on EVM. Through bisecting and simplification, it seems that the failure correlates with the combined complexity or weight of the initializer, rather than any specific component.


Workaround

Splitting the initialization logic across multiple smaller functions (e.g. initializeStep1(), initializeStep2(), …) appears to avoid the issue — allowing the contracts to initialize successfully and pass tests on PolkaVM.


Metadata

Metadata

Assignees

No one assigned

    Labels

    PVMProblem occurs at the execution stage for PVMproject: Aave

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions