8000 Transaction gas limit exceeds block gas limit for our own examples · Issue #94 · NilFoundation/mina-state-proof · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Transaction gas limit exceeds block gas limit for our own examples #94

Open
alexandra-mara opened this issue Jul 31, 2023 · 3 comments
Open

Comments

@alexandra-mara
Copy link
Contributor
alexandra-mara commented Jul 31, 2023

Upd: works at 59b6d70, so possibly a problem within one of the further commits

I have the following problem trying to validate our own test state /test/data/proof_state.bin from the repo's README—or any proof, to be honest. Since I've already checked and tuned all dependencies, the problem doesn't seem to be in my setup.

[mara@kolibri mina-state-proof]$ npx hardhat validate_ledger_state \
    --proof ./test/data/proof_state.bin \
    --ledger jwYPLbRQa4X86tSJs1aTzusf3TNdVTj58oyWJQB132sEGUtKHcB \
    --network localhost
jwYPLbRQa4X86tSJs1aTzusf3TNdVTj58oyWJQB132sEGUtKHcB
An unexpected error occurred:
ProviderError: Transaction gas limit is 40500000 and exceeds block gas limit of 30000000
    at HttpProvider.request (/home/mara/Projects/mina-state-proof/node_modules/hardhat/src/internal/core/providers/http.ts:88:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async EthersProviderWrapper.send (/home/mara/Projects/mina-state-proof/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)

Validation description in the Proof Market's docs

By the way, here's my npx hardhat test output:

[mara@kolibri mina-state-proof]$ npx hardhat test


  Lock
    Deployment
      ✔ Should set the right unlockTime (25586ms)
      ✔ Should set the right owner (136ms)
      ✔ Should receive and store the funds to lock
      ✔ Should fail if the unlockTime is not in the future (339ms)
    Withdrawals
      Validations
        ✔ Should revert with the right error if called too soon (119ms)
        ✔ Should revert with the right error if called from another account (163ms)
        ✔ Shouldn't fail if the unlockTime has arrived and the owner calls it (379ms)
      Events
        ✔ Should emit an event on withdrawals (153ms)
      Transfers
        ✔ Should transfer the funds to the owner (172ms)

  Mina state proof validation tests
    Ledger Proof - Success
      1) Should validate correct proof 
      ✔ Should update and store proof  (34017ms)
      ✔ Should validate previously updated & stored correct proof  (825ms)
    Account Proof - Success
      2) Should validate correct proof 
    Ledger Proof - Failures
      ✔ Should emit event on incorrect proof validation (736ms)
      ✔ Should fail to update and store incorrect proof  (1181ms)
      3) Should fail for incorrect hash
    Account Proof - Failures
      ✔ Should reject invalid ledger hash (37626ms)


  14 passing (5m)
  3 failing

  1) Mina state proof validation tests
       Ledger Proof - Success
         Should validate correct proof :
     Error: Timeout of 40000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/mara/Projects/mina-state-proof/test/mina-placeholder-verifier-proof-test.js)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at runNextTicks (node:internal/process/task_queues:64:3)
      at listOnTimeout (node:internal/timers:538:9)
      at processTimers (node:internal/timers:512:7)

  2) Mina state proof validation tests
       Account Proof - Success
         Should validate correct proof :
     Error: Timeout of 40000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/mara/Projects/mina-state-proof/test/mina-placeholder-verifier-proof-test.js)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at runNextTicks (node:internal/process/task_queues:64:3)
      at listOnTimeout (node:internal/timers:538:9)
      at processTimers (node:internal/timers:512:7)

  3) Mina state proof validation tests
       Ledger Proof - Failures
         Should fail for incorrect hash:
     Error: Timeout of 40000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/mara/Projects/mina-state-proof/test/mina-placeholder-verifier-proof-test.js)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at runNextTicks (node:internal/process/task_queues:64:3)
      at listOnTimeout (node:internal/timers:538:9)
      at processTimers (node:internal/timers:512:7)
@NickVolynkin
Copy link

@alexandra-mara please add prerequisites or a link to a particular place in the tutorial where it happens.

@alexandra-mara
Copy link
Contributor Author

@alexandra-mara please add prerequisites or a link to a particular place in the tutorial where it happens.

@NickVolynkin there's actually no prerequisites besides compiling the contracts. That's a test example from the repo's README. Added this to the description, and also a link to the documentation.

@alexandra-mara
Copy link
Contributor Author
alexandra-mara commented Jul 31, 2023

Tests with gas reporting

[mara@kolibri mina-state-proof]$ REPORT_GAS=true npx hardhat test

  Lock
    Deployment
      ✓ Should set the right unlockTime
      ✓ Should set the right owner
      ✓ Should receive and store the funds to lock
      ✓ Should fail if the unlockTime is not in the future
    Withdrawals
      Validations
        ✓ Should revert with the right error if called too soon
        ✓ Should revert with the right error if called from another account
        ✓ Shouldn't fail if the unlockTime has arrived and the owner calls it
      Events
        ✓ Should emit an event on withdrawals
      Transfers
        ✓ Should transfer the funds to the owner

  Mina state proof validation tests
    Ledger Proof - Success

      1) Should val
8000
idate correct proof 
      ✓ Should update and store proof 
      ✓ Should validate previously updated & stored correct proof 
    Account Proof - Success

      2) Should validate correct proof 
    Ledger Proof - Failures
      ✓ Should emit event on incorrect proof validation
      ✓ Should fail to update and store incorrect proof 
      ✓ Should fail for incorrect hash
    Account Proof - Failures
      ✓ Should reject invalid ledger hash

·---------------------------------------|---------------------------|-------------|------------------------------·
|         Solc version: 0.8.18          ·  Optimizer enabled: true  ·  Runs: 200  ·  Block limit: 100000000 gas  │
········································|···························|·············|·······························
|  Methods                                                                                                       │
················|·······················|············|··············|·············|···············|···············
|  Contract     ·  Method               ·  Min       ·  Max         ·  Avg        ·  # calls      ·  usd (avg)   │
················|·······················|············|··············|·············|···············|···············
|  Lock         ·  withdraw             ·         -  ·           -  ·      33820  ·            7  ·           -  │
················|·······················|············|··············|·············|···············|···············
|  MinaState    ·  updateLedgerProof    ·    205785  ·     6658600  ·    4077474  ·            5  ·           -  │
················|·······················|············|··············|·············|···············|···············
|  MinaState    ·  verifyAccountState   ·    430047  ·    14253768  ·    7341908  ·            4  ·           -  │
················|·······················|············|··············|·············|···············|···············
|  MinaState    ·  verifyLedgerState    ·    158947  ·     6574294  ·    4435845  ·            6  ·           -  │
················|·······················|············|··············|·············|···············|···············
|  Deployments                          ·                                         ·  % of limit   ·              │
········································|············|··············|·············|···············|···············
|  account_gate0                        ·         -  ·           -  ·     270434  ·        0.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate1                        ·         -  ·           -  ·     271538  ·        0.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate10                       ·         -  ·           -  ·    2268881  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate11                       ·         -  ·           -  ·    2268833  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate12                       ·         -  ·           -  ·    2268857  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate2                        ·         -  ·           -  ·    2268665  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate3                        ·         -  ·           -  ·    2268641  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate4                        ·         -  ·           -  ·    2268425  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate5                        ·         -  ·           -  ·    2268641  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate6                        ·         -  ·           -  ·    2268665  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate7                        ·         -  ·           -  ·    2268617  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate8                        ·         -  ·           -  ·    2268653  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_gate9                        ·         -  ·           -  ·    2268857  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  account_proof_split_gen              ·         -  ·           -  ·     845754  ·        0.8 %  ·           -  │
········································|············|··············|·············|···············|···············
|  AccountPathProof                     ·         -  ·           -  ·     451844  ·        0.5 %  ·           -  │
········································|············|··············|·············|···············|···············
|  Lock                                 ·         -  ·           -  ·     204563  ·        0.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate_argument_split_gen    ·         -  ·           -  ·     801496  ·        0.8 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate0                      ·         -  ·           -  ·    4230916  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate11                     ·         -  ·           -  ·    4390338  ·        4.4 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate15_0                   ·         -  ·           -  ·    5178111  ·        5.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate15_1                   ·         -  ·           -  ·    1422933  ·        1.4 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate16_0                   ·         -  ·           -  ·    4657302  ·        4.7 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate16_1                   ·         -  ·           -  ·    5300322  ·        5.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate3                      ·         -  ·           -  ·    4192864  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate5                      ·         -  ·           -  ·    4192444  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate7                      ·         -  ·           -  ·    4193080  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_base_gate9                      ·         -  ·           -  ·    4193176  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate_argument_split_gen  ·         -  ·           -  ·     744908  ·        0.7 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate0                    ·         -  ·           -  ·    2278053  ·        2.3 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate10                   ·         -  ·           -  ·    4191628  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate12                   ·         -  ·           -  ·    4191604  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate14                   ·         -  ·           -  ·    4191328  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate16                   ·         -  ·           -  ·    4191628  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate18                   ·         -  ·           -  ·    4876441  ·        4.9 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate3                    ·         -  ·           -  ·    4150166  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  mina_scalar_gate8                    ·         -  ·           -  ·    4191568  ·        4.2 %  ·           -  │
········································|············|··············|·············|···············|···············
|  MinaState                            ·         -  ·           -  ·    1001481  ·          1 %  ·           -  │
········································|············|··············|·············|···············|···············
|  MinaStateProof                       ·         -  ·           -  ·     637800  ·        0.6 %  ·           -  │
········································|············|··············|·············|···············|···············
|  placeholder_verifier                 ·         -  ·           -  ·    5356519  ·        5.4 %  ·           -  │
········································|············|··············|·············|···············|···············
|  PlaceholderVerifier                  ·         -  ·           -  ·    2294215  ·        2.3 %  ·           -  │
·---------------------------------------|------------|--------------|-------------|---------------|--------------·

  15 passing (5m)
  2 failing

  1) Mina state proof validation tests
       Ledger Proof - Success
         Should validate correct proof :
     Error: Timeout of 40000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/mara/Projects/mina-state-proof/test/mina-placeholder-verifier-proof-test.js)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at runNextTicks (node:internal/process/task_queues:64:3)
      at listOnTimeout (node:internal/timers:538:9)
      at processTimers (node:internal/timers:512:7)

  2) Mina state proof validation tests
       Account Proof - Success
         Should validate correct proof :
     Error: Timeout of 40000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/mara/Projects/mina-state-proof/test/mina-placeholder-verifier-proof-test.js)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at runNextTicks (node:internal/process/task_queues:64:3)
      at listOnTimeout (node:internal/timers:538:9)
      at processTimers (node:internal/timers:512:7)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0