Giter Club home page Giter Club logo

Comments (10)

samlaf avatar samlaf commented on May 29, 2024 1

@ryanio def not simple, but I do have a repro setup.
@mattsse, I tried with --hardfork shanghai and it didn't help.

Repro:

  1. clone https://github.com/Layr-Labs/incredible-squaring-avs, make sure to install the dependencies
  2. Run make start-anvil-chain-with-el-and-avs-deployed
  3. In a separate window, run make start-operator

This will work as I've pinned foundry to nightly-de33b6af53005037b463318d2628b5cfcaf39916
To repro, run foundryup, comment the docker line, and uncomment the anvil line just above it. Also add the --hardfork shanghai flag and rerun steps 2 and 3 above to show that it fails with error

[2024-03-27 10:59:08.548 PDT] FATAL (logging/zap_logger.go:61) Error depositing into strategy {"err":"EVM error MemoryLimitOOG"}

from foundry.

samlaf avatar samlaf commented on May 29, 2024

Also running into this issue. Definitely seems to be an issue with the latest release, as I pinned an older version from 3 weeks ago of anvil and it doesn't have this issue.
Layr-Labs/incredible-squaring-avs#34

from foundry.

mattsse avatar mattsse commented on May 29, 2024

@rakita does this ring any bells?

any recent changes that concerns this error?

from foundry.

mattsse avatar mattsse commented on May 29, 2024

@ryanio couldn't reproduce, script stops after

{"jsonrpc":"2.0","id":47,"error":{"code":-32602,"message":"No Signer available"}}{"jsonrpc":"2.0","id":48,"result":{"hash":"0x654e8c7f6430edc50f1c4167f434a2362a78cc1f6fa5f69dee8348c91931d4ce","parentHash":"0xd174b29125e3561bbd37c59c25da6a9aa2a3f51f6ba7f7b8629c525ac0f1056a","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","miner":"0x0000000000000000000000000000000000000000","stateRoot":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0xe5df98398173fb61b807cfd2eafe094329b78d56a6d632af6b1ecc0032be85af","receiptsRoot":"0xb0d9dfa7882005af5e0a0a3036d59add41292122c2a705cdb273e3624b6ab8f8","logsBloom":"0x00000000040000000000000000000000000000000000080000000000000000000000000000000000000000000000000002000000080000000000000020000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400010000000000000000000000000000000000000000000000000000000000040000000000020000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000","difficulty":"0x0","number":"0x1297011","gasLimit":"0x1c9c380","gasUsed":"0xc9ca","timestamp":"0x6601b978","totalDifficulty":"0xc70d815d562d3cfa955","extraData":"0x","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","baseFeePerGas":"0x6cb979c75","uncles":[],"transactions":["0x7f280497d75ff6897434f9129098bcebe84e06f4928cfcfcd99b60dc2daeb847"],"size":"0x29e"}}{"jsonrpc":"2.0","id":49,"result":"0x1"}{"jsonrpc":"2.0","id":50,"result":"0x1"}{"jsonrpc":"2.0","id":51,"error":{"code":3,"message":"execution reverted: revert: ERC721: invalid token ID","data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184552433732313a20696e76616c696420746f6b656e2049440000000000000000"}}{"jsonrpc":"2.0","id":975548868,"result":null}

from foundry.

rakita avatar rakita commented on May 29, 2024

@rakita does this ring any bells?

any recent changes that concerns this error?

Shouldn't be any. Logic is simple, and it was not changed in a while.

from foundry.

ryanio avatar ryanio commented on May 29, 2024

@mattsse sorry about that, will try to work on another repro case, this one seems pretty fragile

@samlaf do you have any simple repro case you can share?

from foundry.

mattsse avatar mattsse commented on May 29, 2024

what changed recently is the default hardfork with cancun, could be unrelated though, but perhaps you try --hardfork shanghai just to rule that out

from foundry.

ryanio avatar ryanio commented on May 29, 2024

yeah, unfortunately need cancun for tstore for seaport 1.6 (it won't use tstore when deployed on networks without it, but since it was deployed on mainnet after cancun it will be using it)

from foundry.

klkvr avatar klkvr commented on May 29, 2024

@mattsse bisected and it seems to be caused by 9fde758

from foundry.

mattsse avatar mattsse commented on May 29, 2024

hmm, that's odd.

do we know which rpc calls are failing? I hope it is eth_estimate? because then I think I have an idea.

with the revm native conversion we no longer end up with OutOfgas result:

9fde758#diff-a0d1dbafd7eaf82b3fd4d30722d2c7e369394883a704e8b41554d0a31b43629fL30

so these are no longer caught:

InstructionResult::Revert |
InstructionResult::OutOfGas |
InstructionResult::OutOfFunds |
// we're also checking for InvalidFEOpcode here because this can be used to trigger an error <https://github.com/foundry-rs/foundry/issues/6138> common usage in openzeppelin <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/94697be8a3f0dfcd95dfb13ffbd39b5973f5c65d/contracts/metatx/ERC2771Forwarder.sol#L360-L367>
InstructionResult::InvalidFEOpcode => {
lowest_gas_limit = mid_gas_limit;
}
// The tx failed for some other reason.
reason => {
warn!(target: "node", "estimation failed due to {:?}", reason);
return Err(BlockchainError::EvmError(reason))
}

and return an error instead if memoryOOG

here:

ExecutionResult::Halt { reason, gas_used } => (reason.into(), gas_used, None),

because this now uses revm's conversion:

https://github.com/bluealloy/revm/blob/c3107ec3acf79119016acac203b1c2437005a90e/crates/interpreter/src/instruction_result.rs#L65-L71

@samlaf could you confirm that the failing calls are eth_estimate?

from foundry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.