truffle icon indicating copy to clipboard operation
truffle copied to clipboard

Error deploying to Linea

Open emilyJLin95 opened this issue 1 year ago • 2 comments

When you deploy to Linea with HD-wallet-provider, we consistently run into:

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.

/Users/emilylin/dev/demos/linea-tutorial/node_modules/eth-block-tracker/src/polling.js:51
        const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${err.stack}`)
                       ^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
undefined
    at PollingBlockTracker._performSync (/Users/emilylin/dev/demos/linea-tutorial/node_modules/eth-block-tracker/src/polling.js:51:24)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
UnhandledRejections detected
Promise {
  <rejected> {
    code: -32603,
    message: 'Too Many Requests',
    data: { originalError: {} }
  }
} {
  code: -32603,
  message: 'Too Many Requests',
  data: { originalError: {} }
}
Promise {
  <rejected> {
    code: -32603,
    message: 'Too Many Requests',
    data: { originalError: {} }
  }
} {
  code: -32603,
  message: 'Too Many Requests',
  data: { originalError: {} }
}

or

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.

/Users/emilylin/dev/demos/linea-tutorial/node_modules/eth-block-tracker/src/polling.js:51
        const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${err.stack}`)
                       ^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
undefined
    at PollingBlockTracker._performSync (/Users/emilylin/dev/demos/linea-tutorial/node_modules/eth-block-tracker/src/polling.js:51:24)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Reproduction steps:

Deploy a contract using this configuration:

linea: {
      provider: () => {
        return new HDWalletProvider(
          MNEMONIC,
          'https://rpc.goerli.linea.build/',
        );
      },
      network_id: "59140"
    },

emilyJLin95 avatar Mar 30 '23 21:03 emilyJLin95

Maybe try add PollingInterval, I have a contract running with the following parameters:

linea: {
      provider: function() {
        return new HDWalletProvider(
          MNEMONIC, PROJECT_ID,
       );
      },
      verify: {
        apiUrl: "https://explorer.goerli.linea.build/api",
        apiKey: ETHERSCAN_API_KEY,
        explorerUrl: "https://explorer.goerli.linea.build/",
      },
        poolingInterval: 30000,
        networkCheckTimeoutnetworkCheckTimeout: 10000,
        timeoutBlocks: 50,
        network_id: "59140",
    },

RSviatoslav avatar Apr 02 '23 07:04 RSviatoslav

Same... but this time I get

Promise {
  <rejected> {
    code: -32603,
    message: 'Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range.',
    data: { originalError: {} }
  }
} {
  code: -32603,
  message: 'Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range.',
  data: { originalError: {} }
}

whyvrafvr avatar May 03 '23 10:05 whyvrafvr