Comments (4)
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:
- Relayer deploying the safe (check if something is done in parallel)
https://github.com/CirclesUBI/safe-relay-service/blob/main/safe_relay_service/relay/tasks.py#L424 - Compare it to the gnosis core in the relayer.
https://github.com/gnosis/safe-relay-service/blob/master/safe_relay_service/relay/tasks.py
from circles-core.
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.
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.
Related: CirclesUBI/safe-relay-service#42
from circles-core.
Related Issues (20)
- Add info about token zero address in core.token.getAddress
- Change getLatest to include notifications of unique transfers that are not hub-transfers HOT 3
- Increase fetch limit to 1000 from 100 for trust connections HOT 2
- Improve documentation of core method getNetwork
- Replace safe.js logic with safe-core-sdk
- Replace organization.js logic with safe-core-sdk
- Replace token.js logic with safe-core-sdk
- Replace trust.js logic with safe-core-sdk
- Upgrade web3 to v4
- Check 3 trust connections in payment service
- hub transfer not available in mutual activities
- Investigate behaviour of getNetwork and mutually trusted HOT 4
- Fix building process using safe-core-sdk
- Make sure all the test pass with the new core version
- refactor activity.js
- Improve mutual connections further
- Deploy safe not using payment service when account has xDai
- Remove avatar image in storage HOT 2
- Create method for user delete
- Fix tests in Actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circles-core.