Commit Graph

33 Commits

Author SHA1 Message Date
Alexander Kolotov 7c429798b3
Merge pull request #82 from yrashk/required-signatures
Problem: required_signatures is static
2018-07-05 12:34:20 +03:00
Yurii Rashkovskii 18802df14c
Problem: insecure RPCs are subject to MITM attacks
Solution: by default, disallow use of non-TLS RPC endpoints

For testing, there's an escape hatch of a command line
argument `--allow-insecure-rpc-endpoints` (purposefully
long) that will reduce the severity of using a non-TLS
RPC endpoint to a warning in a log file.

It was not made to be a configuration file option to reduce
the risk of this option slipping into a production configuration
file by mistake.

Closes #79
2018-06-04 14:33:32 -07:00
Yurii Rashkovskii d4de1c824f
Problem: can't merge "required_signatures is static"
This is because other changes on master are in conflict.

Solution: merge and resolve conflicts

Merge remote-tracking branch 'origin/master' into required-signatures
2018-06-04 14:27:13 -07:00
Yurii Rashkovskii b890ada627
Problem: config allows arbitrary keys to be passed
This means that a misspelled config field can cause a lot
of confusion -- things won't work as expected.

Solution: restore more restrictive config deserialization
where unknown keys would trigger an error
2018-06-04 14:17:29 -07:00
Yurii Rashkovskii bbda17d906
Merge pull request #94 from yrashk/accounts-deprecation
Problem: authorities.accounts config setting is obsolete
2018-06-04 14:15:29 -07:00
Yurii Rashkovskii ae8cc1552f
Problem: slow performance and regular timeouts sending transactions
Solution: fix the maximum number of concurrent HTTP request
at a transport level.

It is set by default to 64 and there's now a new configuration
parameter (`concurrent_http_requests`) in `home` and `foreign`
sections. Previously used `concurrency` parameter from transactions
configuration has been removed.
2018-06-01 18:31:47 -07:00
Yurii Rashkovskii b68f23558b
Problem: authorities.accounts config setting is obsolete
Solution: make it only accessible when `deploy` feature is on
(for integration tests)

Closes #73
2018-05-28 11:15:51 -07:00
Yurii Rashkovskii fac38d7059
Problem: can't be merged with the master without a conflict
Solution: resolve the conflict

(Merge remote-tracking branch 'origin/master' into required-signatures)
2018-05-23 22:20:19 -07:00
Peter van Nostrand aaa5bee49e Problem: no functionality exists to dynamically fetch gas-prices
Currently, gas-prices are set upon bridge startup via the
Users's config TOML file; this value remains constant for the
life of the Bridge.

Solution: create a mechanism that asynchronously queries
gas-prices from an "Oracle" service on a timed interval. This
mechanism should be a stream of gas-prices that can be polled
from the Bridge.
2018-05-23 20:42:13 -04:00
Yurii Rashkovskii 8a56c5cafb
Problem: required_signatures is static
Validators' information is completely configured through validators
contracts and does not depend on `authorities.required_signatures`
parameter of bridge's configuration.

The number of validators also could be changed during run-time and
therefore `authorities.required_signatures` parameter will not reflect
the actual number of signatures required for transaction validation.

Solution: retrieve required_signatures from RequiredSignaturesChanged
event and requiredSignatures() method

Closes #74
2018-05-19 08:38:53 -07:00
Yurii Rashkovskii ce487b34a6
Problem: bridge tests failing
Solution: bring them up to date
2018-05-04 11:02:17 -07:00
Yurii Rashkovskii fbe77d7359
Problem: bridge sends out transactions slowly
This is because it is limiting them to one at a time
per operation type. This was done so that there's no
gaps in nonces due to undelivered transactions.

Solution: allow concurrent sending of transactions

By default, 100 transactions are allowed.

Note, however, that now there's a chance that nonce
gaps may be formed under cerain circumstances.
2018-05-03 14:14:42 -07:00
Yurii Rashkovskii 6a371cfb46
Merge pull request #58 from yrashk/contract-setting
Problem: `contract` configuration is no longer necessary
2018-05-01 19:10:29 -07:00
Yurii Rashkovskii 6ed056b744
Problem: estimated_gas_cost_of_withdraw setting is no longer useful
Solution: remove it from the default build
2018-05-01 11:58:08 -07:00
Yurii Rashkovskii 633e4a122a
Problem: `contract` configuration is no longer necessary
It is only necessary when deploying

Solution: remove the requirement for this configuration option
but leave it for the `deploy` feature used in integration tests
until they are rewritten to use external deployment mechanics.
2018-05-01 11:40:30 -07:00
Alexander Kolotov f6c6546e77
Merge pull request #56 from yrashk/failing-tests
Problem: bridge crate tests failing to compile
2018-05-01 20:43:15 +03:00
Yurii Rashkovskii 935f6bdc9b
Problem: bridge crate tests failing to compile
Solution: bring them up to date
2018-05-01 10:03:42 -07:00
Yurii Rashkovskii 9a192c1e07
Problem: bridge should not deploy its contracts anymore
Bridge's contracts are now developed in a separate repository
and have their own deployment procedure:

https://github.com/poanetwork/poa-parity-bridge-contracts

However, our integration tests are not yet updated to
use this deployment procedure.

Solution: disable deployment compile-time by default
and only use it in integration tests as a stopgap measure
until the new deployment procedure (or any other viable
alternative) has been used.
2018-05-01 09:43:34 -07:00
Yurii Rashkovskii 385c5885dd
Problem: nonce reuse without error
In cases when the node is backed by a cluster of nodes,
one node will not share the same information with the
other, hence it will not be able to report nonce reuse,
ultimately leading to lost transactions as they are
discarded later.

Solution: combine getTransactionCount with an internal counter
so that validator controls its own nonces, but in case if
something external happens, it can reset itself against
those externalities.
2018-04-29 16:41:03 -07:00
Yurii Rashkovskii c0715dadba
Merge branch 'raw-transactions' into rpc+raw-transactions 2018-04-26 18:21:07 -07:00
Yurii Rashkovskii 94b1343594
Problem: sending unsigned transactions over API
This means that the node has to sign the transaction itself.
It might be acceptable in a localized setup, but can't be used
with untrusted setups. For example, once HTTP RPC is supported,
we can't really use infrastructure like INFURA to send transactions.

Solution: switch to signing transactions in bridge

This absolutely requires separating the accounts used by validators
and administrative tasks as this will otherwise interfere with
management of nonces.
2018-04-26 17:50:07 -07:00
Yurii Rashkovskii 4151237c54
Problem: RPC transport change conflated with keystore
As a part of the original feature request, there was a need
for the bridge to be able to sign its own transactions. However,
this didn't fully materialize in the original patch, and only
configuration parameters were implemented.

Solution: remove these last conflated bits
and make this a pure transport change patch.
2018-04-19 10:13:45 -07:00
Yurii Rashkovskii c04d6a282e
Problem: RPC patch doesn't compile yet
The inner workings of choosing IPC vs RPC haven't been worked out.

Solution: remove IPC in favour of RPC
2018-04-19 09:51:37 -07:00
Edward Mack aacea235bb
Problem: IPC doesn't scale well
Using IPC means bridge has to run alognside the node
on the same machine. This, at times, presents problems
in terms of efficiency or coupling of deployment.

Solution: switch to RPC
2018-04-19 09:51:32 -07:00
debris 5e90f850fd updated web3 to latest version and resolved build issues 2018-02-07 14:50:49 +01:00
Maximilian Krüger ccaac25d2f compile contracts in build.rs and remove compiled from git so they don't get out of sync 2018-01-18 12:53:02 +01:00
Maximilian Krüger 55d2e1bf55 add config option `estimated_gas_cost_of_withdraw` 2018-01-09 12:53:50 +01:00
debris 59403966fc rename to home/foreign, closes #46 2017-10-10 11:02:58 +02:00
debris d34f0e5427 Merge branch 'master' into fixes 2017-10-02 17:52:49 +02:00
debris 134bf5a620 fixed loading .bin files, filter topics and example gas amounts 2017-10-01 19:18:50 +02:00
viktor ef62bcc427 Function names typos 2017-09-28 15:59:19 -07:00
debris 6286a76708 timeouts 2017-08-31 17:32:34 +02:00
debris fa962565ad repo overhaul, separated binary from library, closes #10, added tests crate 2017-08-25 00:36:13 +02:00