Skip to content

Balancer: Tests fail with InvalidOperandOOG #178

@Brianspha

Description

@Brianspha

When running the [pool-cow tests](https://github.com/balancer/balancer-v3-monorepo/tree/main/pkg/pool-cow/test) in the Balancer monorepo targeting the EVM backend, certain calls (e.g. vault.registerPool(...)) unexpectedly trigger InvalidOperandOOG an “invalid operand + out of gas” error from the interpreter. This appears to stem from revm (via revive) using a default EVM spec that lacks support for needed opcodes/features.

Expected Behaviour
Test environments should be able to override or specify the EVM hardfork / spec (e.g. Prague / EOF / new precompiles and and) so that test behaviour can match production assumptions and newer opcodes are enabled.

How to Reproduce

The below code block yields a failure

sharedBeforeEach('create and initialise pool', async () => {
...

    const tx = await factory.connect(bob).create(
      'Cow Pool Test',
      'CPT',
      tokenConfig,
      WEIGHTS,
      { pauseManager: ZERO_ADDRESS, swapFeeManager: ZERO_ADDRESS, poolCreator: ZERO_ADDRESS },
      SWAP_FEE,
      ZERO_BYTES32
    );
    const receipt = await tx.wait(); // At this point 
    ...
  });

Querying the receipt from the node outside of any tooling using the tx hash from the node logs shows that receipt with a status of 0x0, additionally when looking at the contract code the code fails at _registerPool this is called by vault.registerPool which is called by the PoolFactory contract

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions