Comments (13)
I think the root cause of the issue could relate to hardware on my testbed: it is an ordinary laptop with Intel i5-3317U CPU 1.70GHz, 4 cores, HDD (not SSD) and WiFi connection to Internet.
It is not my main workstation - it is dedicated just for tests: centos linux without X.org installed, parity, bridge - no other processes is being run.
from poa-bridge.
The first of transactions arrived on Ropsten: https://ropsten.etherscan.io/tx/0x42d204dbf87b8b53c00a1ce11c79ed6eee91e189ebb1106211db7f24ba20f4b6.
The last transaction: https://ropsten.etherscan.io/tx/0xb53ea50e62bfcfda6ba1441d243a4df56f472b2e7d9b895943dbd8dcb8257d47.
Totally it was about 17000 txs sent by the bridge till it was killed.
from poa-bridge.
On it
from poa-bridge.
config.toml
- https://gist.github.com/akolotov/5c68b9438c991401df12450ad569a4f2
from poa-bridge.
Thank you Do you have a script that reproduces this issue?
from poa-bridge.
from poa-bridge.
So, from the log above we can see that parity is actually sending a response to those timed out requests (bridge doesn't lose the connection, it simply abandons it after a timeout is experienced). The way bridge is structured it effectively considers timed out transactions to "never happen".
There are perhaps a couple of measures we can take here:
- Increase timeout length. This does not require changing bridge code, just the config. In your example config, it is set to 10 seconds. What's the longest reasonable timeout you can think of?
- Persist every outgoing transaction in a durable queue and always flush the queue before starting normal operations.
- Limit the number of transactions that can be sent out simultaneously to relieve the pressure on Parity and prevent the timeout counter from being started too early (timeout is per-transaction)
from poa-bridge.
I think the most efficient first step on my end here would be (3). After that, we can do (2).
from poa-bridge.
I completely agree with you thoughts. #1 is too platform specific and do not provide any guaranty that in some moment a system will not get in a state when the timeout is too short again.
from poa-bridge.
Would you mind trying yrashk@304a843 out on your hardware setup? This is a first draft. This change limits the size of the batch. The integration test pass. Let me know if this helps or not.
from poa-bridge.
I have tested the changes with 1K and 2K deposits (transactions).
1K deposits transferred successfully.
The original issue was reproduced with 2K deposits.
Here is difference in bridge logs:
1K deposts:
INFO:bridge::bridge::deposit_relay: got 353 new deposits to relay
INFO:bridge::bridge::deposit_relay: relaying 353 deposits
INFO:bridge::bridge::deposit_relay: deposit relay completed
INFO:bridge::bridge::deposit_relay: got 300 new deposits to relay
INFO:bridge::bridge::deposit_relay: relaying 300 deposits
INFO:bridge::bridge::deposit_relay: deposit relay completed
2K deposts:
INFO:bridge::bridge::deposit_relay: got 710 new deposits to relay
INFO:bridge::bridge::deposit_relay: relaying 710 deposits
WARN:bridge: Bridge is down with Request eth_sendTransaction timed out, attempting to restart
WARN:<unknown>: Sending a response to deallocated channel: Ok([Ok(String("0x6c881ae94549f05a09088e1ed017324eb4909e9957d61f5ad9a4967a2ac04ad3"))])
So, the bridge combined two sequential blocks in one batch for the second test.
It means that it is makes sense to understand why Parity behaves differently in these two cases. Most probably we will see a proper fix for the issue in that case.
from poa-bridge.
Do we still experience this issue in any severe form?
from poa-bridge.
Did not test it with new version of bridge supporting RPC. Are you able to do generate traffic (dozen of transaction in one block) and test it by yourself?
from poa-bridge.
Related Issues (20)
- Bridge contract addresses in the configuration file
- Update RELEASE_NOTES with the recent changes for 0.3.0 HOT 1
- Root Cause Analysis of unprocessed tx HOT 8
- Failover RPC support
- Fork of parity-bridge? HOT 4
- authorities sections is obsolete in the configuration file
- gas_price parameter still mentioned in the error message
- Account invalid error when using single validator HOT 18
- facing issue while make with Rust version 1.29.0 for ethstore v0.2.0 HOT 3
- Using a commit/contest method to scale validator set HOT 11
- Remove dependency on 'solc' from build process HOT 9
- One account should be used for home and foreign networks
- HTTPS must be forced for RPC connections HOT 2
- Get the message length from the bridge contract
- Use JMESPath to retrieve a gas-price value from the Oracle JSON.
- Problem: potential loss of database updates
- Introduce versioning for the binary
- a warning message if the keystore contains non-JSON files HOT 1
- [Crash] if tx queue has reached to parity node HOT 5
- [Crash] bridge cannot process 2k txs HOT 1
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 poa-bridge.