Comments (13)
health: false
means the node is not fully synced and the numbers are off.
from poa-bridge.
:) it was in my todo of issues to create for the projects.
Since personally I don't like the idea of yet another service to be requested, I thought about an oracle which will put gas price into the bridge contract. My rationales are:
- we need two different prices: one for POA and another for Foundation;
- we are tying with POA in the core of the bridge without strict necessity.
My suggestion are
- create public fields
gasPrice
in both contractsHomeBridge
andForeignBridge
; - initialize
gasPrice
as part of deployment of contracts.
This will be Phase I
Later in Phase II we will:
- provide
updateGasPrice
method in both contracts to set newgasPrice
with some consensus; - develop a tool or the bridge subsystem which will call
updateGasPrice
periodically.
@rstormsf if you agree let's change the label to solidity and modify the title to reflect the idea of the changing.
from poa-bridge.
@rstormsf @igorbarinov did you discuss it? should we have a call together to discuss it?
from poa-bridge.
We have gasprice.poa.network
on support and monitoring. It's as good as a supported onchain oracle. I'd like to stick with it with an option to hardcode gasprice if that host is not available. I suggest having 21Gwei as a hardcoded parameter.
from poa-bridge.
@phahulin could you create a public dashboard in site24x7 for gasprice oracle
for host health and API health
@banteg thank you for the code https://github.com/banteg/gasprice
from poa-bridge.
@igorbarinov please check out this dashboard https://www.site24x7.com/public/dashboard/8s1wsTAc/g8Ipq0FBcZ91xw291jfLWVBkJ0jC5DLujR/xAyNIDrraYAkxnvoKUBHlauhy7dDGbQxteFTkHMOoiMhfYD63Eyzl6uNzRhBp6KHZIsTkfWPbhiydvLmPEfG
from poa-bridge.
Nice, could we have outage number? duration?
disk space also will be good to know
from poa-bridge.
Pashi, nice dashboard! But gasprice oracle is out of sync 🙈😬
- please add logging for gasprice and parity service
- add corresponding checks on log files
from poa-bridge.
OK. Here is my suggestion:
- we introduce public fields
gasPrice
in both contractsHomeBridge
andForeignBridge
; - gasPrice will be initialized as part of deployment of contracts:
- it equals 1 gwei in
HomeBridge
- it equals 21 gwei in
ForeignBridge
- it equals 1 gwei in
- In order to perform
deposit_relay
orwithdraw_confirm
the bridge will request http://gasprice.poa.network and if it is not availablegasPrice
ofForeignBridge
will be requested. - In order to perform
withdraw_relay
,gasPrice
ofHomeBridge
will be requested.
from poa-bridge.
Bridge should read from config.toml
gas_price_oracle_url = "https://gasprice.poa.network/"
gas_price_speed_type = "fast"
and receive this value in gwei, convert to hex value in wei for signing tx on foreign.
this value could be cached only for short period of time ( 5-10min)
from poa-bridge.
Here is the recent requirements based on discussions:
- We do provide options in
[home]
and[foreign]
of configuration file to allow configure a JSON source of gas price:
gas_price_oracle_url = "https://gasprice.poa.network/"
gas_price_speed_type = "fast"
gas_price_update_timeout = 600
- We expect that the gas price oracle will return information in the following form:
{"block_number":5559089,"block_time":14.824,"instant":50.0,"standard":4.0,"slow":2.0,"fast":5.0,"health":true}
- We add the parameter
default_gas_price
in [home]and
[foreign]` - We remove
gas_price
from[transactions]
fordeposit_relay
,withdraw_confirm
andwithdraw_relay
.
The logic is as follows:
- Try to get gas price from the oracle for the corresponding network. It needs to be done on regular basis with usage of
gas_price_update_timeout
. - If the oracle is not accessible or returns incorrect information, the default gas price (
default_gas_price
) is used for the corresponding network.
from poa-bridge.
In the JSON returned from GET https://gasprice.poa.network
:
{
"block_number": 5584026,
"block_time": 14.307,
"instant": 41,
"standard": 5,
"slow": 4,
"fast": 6,
"health": true
}
does anyone know what does the "health" key-value pair means? Does health: true
indicate that the gas prices values returned from the API are trustworthy, while health: false
indicates otherwise? If that is the case, then we should use the default gas price in the cases of:
health: false
- request duration to
gas_price_oracle_url
has exceededgas_price_update_timeout
?
from poa-bridge.
Ok, cool. Thanks!
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.