Giter Site home page Giter Site logo

Comments (5)

tony-armstrong avatar tony-armstrong commented on August 21, 2024
  1. executed the same test in polygon's version, the first error is the same.
  2. this workflow of a fix branch of polygon's version passed https://github.com/0xPolygonHermez/zkevm-node/actions/runs/6832757640

from b2-zkevm-node.

tony-armstrong avatar tony-armstrong commented on August 21, 2024

this reason of 1st is to wait for the l2 block number to be consolidated, but this interface always returns false.

from b2-zkevm-node.

tony-armstrong avatar tony-armstrong commented on August 21, 2024
  1. I did some analysis on the TestEthTransfer test failure in e2e-group1, following is the analysis method
    test-e2e() {
    DIRNAME=tmp-test-e2e-$DATE
    mkdir -p $DIRNAME
    exec >"$DIRNAME/$FUNCNAME.log" 2>&1
    make stop run run-explorer
    sleep 10s
    make test-e2e-group-1-debug >$DIRNAME/test-e2e-group-1-debug.log 2>&1
    SRVS=$(docker-compose ps -a | cut -d ' ' -f 1 | sed 1d | xargs)
    for item in $SRVS; do
    docker-compose logs $item >$DIRNAME/$item.log 2>&1
    done
    make stop
  2. The reason for the failure is that the program has been awaiting for the l2 tx to become VirtualState(sometimes Consolidated). See the explanation of these two states Polygon zkEVM Glossary | Polygon Wiki
  3. From the l1 browser, it's not found that the sender calls the sequenceBatches method of the PolygonZkEVM contract. Why is't not called?
  4. Check the container log and find that there are some errors.
    + grep -irnHE 'err|fail' tmp-test-e2e-20231114-162359/zkevm-mock-l1-network.log
    tmp-test-e2e-20231114-162359/zkevm-mock-l1-network.log:521:zkevm-mock-l1-network  | 8:25AM INF Served eth_estimateGas conn=172.25.0.10:36912 duration=17.500446 err="rpc error: code = Unknown desc = execution reverted: ERC20: insufficient allowance" module=geth reqid=4
    tmp-test-e2e-20231114-162359/zkevm-mock-l1-network.log:659:zkevm-mock-l1-network  | 8:25AM INF Served eth_estimateGas conn=172.25.0.10:36912 duration=5.419438 err="rpc error: code = Unknown desc = execution reverted: ERC20: insufficient allowance" module=geth reqid=8
    Among them, the possible reasons are insufficient allowance, this error may be the return value of the following contract.
    What is the relationship between the eth_estimateGas and that contract?
    e5-2690-v3 b2-zkevm-contracts git:(main) ✗ grep -irn 'insufficient allowance' --include='*.sol' contracts 
    contracts/mocks/ERC20WeirdMetadata.sol:320:            require(currentAllowance >= amount, "ERC20: insufficient allowance");
    e5-2690-v3 b2-zkevm-contracts git:(main) ✗ grep -irn '_spendAllowance' --include='*.sol' contracts       
    contracts/mocks/ERC20WeirdMetadata.sol:141:        _spendAllowance(from, spender, amount);
    contracts/mocks/ERC20WeirdMetadata.sol:313:    function _spendAllowance(

@0x677261706562616261 @Stonepapa

from b2-zkevm-node.

tony-armstrong avatar tony-armstrong commented on August 21, 2024
  1. The reason for waiting for the block number xxx to be virtualized is that the sleep time is't enough for the l1 network to be ready, and the approve component execution will fail
  2. The failure will cause the sequencer-sender to be unable to successfully call sequenceBatches contract method
  3. There are two solutions
    1. more sleep
    2. use healthcheck(recommend), wait for l1 to be ready and then start the approve component. see 7a1294f for details

@0x677261706562616261 @Stonepapa

from b2-zkevm-node.

tony-armstrong avatar tony-armstrong commented on August 21, 2024
  1. The reason for waiting for the block number xxx to be consolidated maybe version mismatch between b2-zkevm-node and b2-zkevm-prover
  2. If so, I need to rebuild both images
Xnip2023-11-16_23-45-21 Xnip2023-11-17_00-08-20

from b2-zkevm-node.

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.