Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parity Bridge is corrupting the database file #26

Closed
peterjoel opened this issue Apr 19, 2018 · 6 comments
Closed

Parity Bridge is corrupting the database file #26

peterjoel opened this issue Apr 19, 2018 · 6 comments

Comments

@peterjoel
Copy link

I'm running Parity-bridge, based on the current version of the README, using:

./parity-bridge/target/release/bridge --config config.toml --database db.toml

And my db.toml file is like this:

home_contract_address = "0x74A71bFb6C4903d79EbDd77C556D2d43A9346BdD"
foreign_contract_address = "0xD6fE4c32ADDe8e4b5eD6272Ecb5c434Dc7b120c4"
home_deploy = 2025251 # block number at which the contract was created for home contract you can find in `bridgeDeploymentResults.json`
foreign_deploy = 6923247 # block number at which the contract was created for foreign contract you can find in `bridgeDeploymentResults.json`
checked_deposit_relay = 2025251 # last checked deposits events on Home network
checked_withdraw_relay = 6923247 # last checked withdraw events on Foreign network
checked_withdraw_confirm = 6923247 # last checked withdraw events on Foreign network

However, once the parity-bridge process starts, the file gets corrupted. It looks like this:

home_contract_address = "0x74a71bfb6c4903d79ebdd77c556d2d43a9346bdd"
foreign_contract_address = "0xd6fe4c32adde8e4b5ed6272ecb5c434dc7b120c4"
home_deploy = 2025251
foreign_deploy = 6923247
checked_deposit_relay = 2026365
checked_withdraw_relay = 6924041
checked_withdraw_confirm = 6924041
loy = 6923247 # block number at which the contract was created for foreign contract you can find in `bridgeDeploymentResults.json`
checked_deposit_relay = 2025251 # last checked deposits events on Home network
checked_withdraw_relay = 6923247 # last checked withdraw events on Foreign network
checked_withdraw_confirm = 6923247 # last checked withdraw events on Foreign network

The Home and Foreign account balances show as zero, even though I transferred ETH into them, and I suspect this is the cause.

@snd
Copy link

snd commented Apr 19, 2018

does the problem occur with https://github.com/paritytech/parity-bridge/ or https://github.com/poanetwork/parity-bridge/? could you please move the issue to the repo it applies to : )

is it possible you were running two bridge processes?

could you please provide:

  • the commit you built from
  • your config.toml

thanks for filing this. definitely needs to get fixed

@peterjoel
Copy link
Author

Moving to the appropriate repository

@peterjoel
Copy link
Author

My Config.toml looks like this:

estimated_gas_cost_of_withdraw = 0
[home]
#account which you specified as validator on Home network
account = "0x6a5ab794a06fcf328ae6d1ffc34e2a81bd3dc2c6"
ipc = "/Users/peter/dev/poa/sokol-kovan-bridge/sokol-node/sokol-datadir/jsonrpc.ipc"
# How many block confirmation to wait to send a tx
required_confirmations = 0

[home.contract]

bin = "HomeBridge_bytecode.bin"

[foreign]
account = "0x6a5ab794a06fcf328ae6d1ffc34e2a81bd3dc2c6"
ipc = "/Users/peter/dev/poa/sokol-kovan-bridge/kovan-node/kovan-datadir/jsonrpc.ipc"
required_confirmations = 0

[foreign.contract]
bin = "ForeignBridge_bytecode.bin"

[authorities]
accounts = [
  "0x6a5ab794a06fcf328ae6d1ffc34e2a81bd3dc2c6",
  "0x6a5ab794a06fcf328ae6d1ffc34e2a81bd3dc2c6"
]
required_signatures = 1

[transactions]
home_deploy = { gas = 3000000 }
foreign_deploy = { gas = 3000000 }
deposit_relay = { gas = 3000000 }
withdraw_relay = { gas = 3000000 }
withdraw_confirm = { gas = 3000000 }

@phahulin
Copy link

@peterjoel try removing comments #... from db.toml

@snd
Copy link

snd commented Apr 20, 2018

@peterjoel could you post the output of running ./parity-bridge --help

@peterjoel
Copy link
Author

I assume you mean:

peter$ ./parity-bridge/target/release/bridge --help
Ethereum-Kovan bridge.
    Copyright 2017 Parity Technologies (UK) Limited

Usage:
    bridge --config <config> --database <database>
    bridge -h | --help

Options:
    -h, --help           Display help message and exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants