Giter Club home page Giter Club logo

Comments (4)

llunaCreixent avatar llunaCreixent commented on August 27, 2024 1

Solved running the Safe and Token deployments sequentially in the Token test.
See commit c827f75 in fix-token-tests branch.

Still, we should explore the issue further. We expect the relayer to queue the requests and not to have conflicts with the nonce. We see this error in the logs of the circles-relayer-worker:

2021-02-23 12:10:59,958 [ERROR] [ForkPoolWorker-2] Task safe_relay_service.relay.tasks.circles_onboarding_safe_task[e091a565-7437-47df-809c-546c3af2e7a4] raised unexpected: InvalidNonce('{\'message\': "the tx doesn\'t have the correct nonce. account has nonce of: 3 tx has nonce of: 1", \'code\': -32000, \'data\': {\'stack\': "n: the tx doesn\'t have the correct nonce. account has nonce of: 3 tx has nonce of: 1\\n    at i (/app/ganache-core.docker.cli.js:55:433387)\\n    at /app/ganache-core.docker.cli.js:55:433518\\n    at /app/ganache-core.docker.cli.js:42:104258\\n    at /app/ganache-core.docker.cli.js:42:279371\\n    at /app/ganache-core.docker.cli.js:42:283136\\n    at Object.return (/app/ganache-core.docker.cli.js:42:282709)\\n    at /app/ganache-core.docker.cli.js:42:281020\\n    at e (/app/ganache-core.docker.cli.js:42:283077)\\n    at /app/ganache-core.docker.cli.js:42:283058\\n    at /app/ganache-core.docker.cli.js:42:280210\\n    at processTicksAndRejections (internal/process/task_queues.js:75:11)", \'name\': \'n\'}}')
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gnosis/eth/ethereum_client.py", line 131, in with_exception_handling
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/gnosis/eth/ethereum_client.py", line 1137, in send_raw_transaction
    return self.w3.eth.sendRawTransaction(bytes(raw_transaction))
  File "/usr/local/lib/python3.8/site-packages/web3/module.py", line 44, in caller
    result = w3.manager.request_blocking(method_str, params, error_formatters)
  File "/usr/local/lib/python3.8/site-packages/web3/manager.py", line 158, in request_blocking
    raise ValueError(response["error"])
ValueError: {'message': "the tx doesn't have the correct nonce. account has nonce of: 3 tx has nonce of: 1", 'code': -32000, 'data': {'stack': "n: the tx doesn't have the correct nonce. account has nonce of: 3 tx has nonce of: 1\n    at i (/app/ganache-core.docker.cli.js:55:433387)\n    at /app/ganache-core.docker.cli.js:55:433518\n    at /app/ganache-core.docker.cli.js:42:104258\n    at /app/ganache-core.docker.cli.js:42:279371\n    at /app/ganache-core.docker.cli.js:42:283136\n    at Object.return (/app/ganache-core.docker.cli.js:42:282709)\n    at /app/ganache-core.docker.cli.js:42:281020\n    at e (/app/ganache-core.docker.cli.js:42:283077)\n    at /app/ganache-core.docker.cli.js:42:283058\n    at /app/ganache-core.docker.cli.js:42:280210\n    at processTicksAndRejections (internal/process/task_queues.js:75:11)", 'name': 'n'}}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File "/safe-relay-service/safe_relay_service/relay/tasks.py", line 472, in circles_onboarding_safe_task
    SafeCreationServiceProvider().deploy_create2_safe_tx(safe_address)
  File "/safe-relay-service/safe_relay_service/relay/services/safe_creation_service.py", line 265, in deploy_create2_safe_tx
    ethereum_tx_sent = proxy_factory.deploy_proxy_contract_with_nonce(
  File "/usr/local/lib/python3.8/site-packages/gnosis/safe/proxy_factory.py", line 151, in deploy_proxy_contract_with_nonce
    tx_hash = self.ethereum_client.send_unsigned_transaction(tx, private_key=deployer_account.key)
  File "/usr/local/lib/python3.8/site-packages/gnosis/eth/ethereum_client.py", line 1190, in send_unsigned_transaction
    raise e
  File "/usr/local/lib/python3.8/site-packages/gnosis/eth/ethereum_client.py", line 1170, in send_unsigned_transaction
    return self.send_raw_transaction(signed_tx.rawTransaction)
  File "/usr/local/lib/python3.8/site-packages/gnosis/eth/ethereum_client.py", line 136, in with_exception_handling
    raise custom_exception(str(exc)) from exc
gnosis.eth.ethereum_client.InvalidNonce: {'message': "the tx doesn't have the correct nonce. account has nonce of: 3 tx has nonce of: 1", 'code': -32000, 'data': {'stack': "n: the tx doesn't have the correct nonce. account has nonce of: 3 tx has nonce of: 1\n    at i (/app/ganache-core.docker.cli.js:55:433387)\n    at /app/ganache-core.docker.cli.js:55:433518\n    at /app/ganache-core.docker.cli.js:42:104258\n    at /app/ganache-core.docker.cli.js:42:279371\n    at /app/ganache-core.docker.cli.js:42:283136\n    at Object.return (/app/ganache-core.docker.cli.js:42:282709)\n    at /app/ganache-core.docker.cli.js:42:281020\n    at e (/app/ganache-core.docker.cli.js:42:283077)\n    at /app/ganache-core.docker.cli.js:42:283058\n    at /app/ganache-core.docker.cli.js:42:280210\n    at processTicksAndRejections (internal/process/task_queues.js:75:11)", 'name': 'n'}}

Next steps:

from circles-core.

llunaCreixent avatar llunaCreixent commented on August 27, 2024

Sometimes (only sometimes) the Token test fails with this msg (the Safe address changes though):

Tried too many times waiting for condition "Wait until Safe 0xf489fB7639381aF4429Dd8Fd0F6Db4B3e2A4d7D4 got deployed"

from circles-core.

llunaCreixent avatar llunaCreixent commented on August 27, 2024

It fails in the deploySafe function in circles-core/test/helpers/transactions.js:

  await loop(`Wait until Safe ${safeAddress} got deployed`, () =>
    web3.eth.getCode(safeAddress),
  );

We have to troubleshoot this.

from circles-core.

adzialocha avatar adzialocha commented on August 27, 2024

Related: CirclesUBI/safe-relay-service#42

from circles-core.

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.