omni / bridge-ui

UI for TokenBridge, an interoperability solution between Ethereum networks for native and ERC tokens
https://bridge.poa.net/
41 stars 51 forks source link

Bridge(on the left side) account balance it always showing 0(zero) #136

Closed sandeep1116 closed 6 years ago

sandeep1116 commented 6 years ago

While Configuring Bridge it is configuring without any issue.but Foreign Bridge(on the left side) account balance it always showing 0(zero) despite it has ether (already verified from meta mask).

I tried to reverse the setting(changed Home to Foreign and vice versa) still left hand side Bridge account balance is 0(zero)

akolotov commented 6 years ago

Hi! What kind of bridge (Rust or NodeJS based) are you using? Which branch? Which branch for contracts? Could you provide bridge-ui config? Is Foreign a public network as so I can explore all transactions to Bridge contract account?

sandeep1116 commented 6 years ago

We are using the rust based bridge using the master branch. For the contracts, we are using 1.1-rc0. Both the Home and Foreign networks are private networks.

The bridge-ui config is:

REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x6767b59DE80fc1418ed1AfC8222aC8d8D492b980 REACT_APP_HOME_BRIDGE_ADDRESS=0xd21Fc863Bd5DB5391FD1a97c0b1c0F969604Dd13 REACT_APP_HOME_HTTP_PARITY_URL=End point1 REACT_APP_FOREIGN_HTTP_PARITY_URL=End Point2 REACT_APP_GAS_PRICE_SPEED_TYPE=fast

And the result of cat poa-bridge-contracts/deploy/bridgeDeploymentResults.json is:

{
"homeBridge": {
    "address": "0xd21Fc863Bd5DB5391FD1a97c0b1c0F969604Dd13",
    "deployedBlockNumber": 590952
},
"foreignBridge": {
    "address": "0x6767b59DE80fc1418ed1AfC8222aC8d8D492b980",
    "deployedBlockNumber": 159755
},
"erc677": {
    "address": "0x38Bc87FE3AcDb863dfdAd2c27c136EAC65131023"
}

}

image

akolotov commented 6 years ago

Thanks for info.

Assuming that we have the following flow:

  1. You are sending transaction to HomeBridge and transfer some native coins there. HomeBridge emits an event after this.
  2. An bridge instance catches the event and sends a confirmation for deposit to ForeignBridge. If enough confirmations collected, ForeignBridge mints corresponding amount of ERC20/ERC677 tokens and transfers them to the account.

so could you confirm that

  1. transactions from the bridge instances to ForeignBridge were sent and were not reverted
  2. if no. 1 is OK, the balance of your account (0x66fd8d...) on ERC20/ERC677 token contract (0x38Bc87FE3AcDb863dfdAd2c27c136EAC65131023) on Foreign network is not zero.
sandeep1116 commented 6 years ago

As Home POA network account is not showing any ether in Bridge GUI ( i have already given it ether before i started configuration but despite that it showing zero ) . so when I am clicking transfer ether it is failing( due to insufficient balance).


So My point is following :

  1. Transfer to Foreign Bridge is failing as Bridge GUI shows zero ether for Home network account .

One more thing I have followed instruction of https://github.com/poanetwork/bridge-ui Please confirm if i need to follow some other instruction also.

sandeep1116 commented 6 years ago

Few more queries

1.Validators Address : I have created validator from MyEtherWallet hope this is the only way and it does not talk about POA Validator Node.

2.Authorities Address: For Authority I have also used validator address hope this is fine

3.Our private PoA Network is using Geth instead of Parity , I think should be ok please confirm

4.Our Both Blockchain are private PoA network . One of them I marked as home and other as Foreign hope that is fine please confirm.

  1. I assume left hand side Network is Home Network. but in my case it is taking Foreign network as left side no idea why.
sandeep1116 commented 6 years ago

Is it possible to have Bridge between 2 PoA Network .

akolotov commented 6 years ago

We are using the rust based bridge using the master branch.

Does it mean that you compile the binary from the sources by yourself?

As Home POA network account is not showing any ether in Bridge GUI

On the screenshot you attached I can see 10 POA on the balance of Home account. So, could you clarify what you exactly mean?

Transfer to Foreign Bridge is failing Did you confirm this by checking receipt of the corresponding transaction?

One more thing I have followed instruction of https://github.com/poanetwork/bridge-ui

Could you confirm that bridge-contracts deployment was performed without any issues?

Is it possible to have Bridge between 2 PoA Network .

Yes.

Our private PoA Network is using Geth instead of Parity , I think should be ok please confirm

Yes, I do not see any issues so far with this.

sandeep1116 commented 6 years ago

Does it mean that you compile the binary from the sources by yourself? Ans : I have used instruction form https://github.com/poanetwork/bridge-ui .

On the screenshot you attached I can see 10 POA on the balance of Home account. So, could you clarify what you exactly mean? 10 PoA it is showing it the amount this address was having before PoA Bridge setup. Though other is also having ether but for unknown reason it is showing zero.

Did you confirm this by checking receipt of the corresponding transaction? What does that mean , it fails as balance at ETH unknown is always zero.

Could you confirm that bridge-contracts deployment was performed without any issues? Yes it has done without any issue .

One More thing for testing purpose i have used 1 PoA network and other as Kovan ETH network there things are working fine.

if i need to create bridge for 2 PoA network do i need to assign one as ETH network ?

I assume left hand side Network is Home Network. but in my case always takes PoA network that i mention as Foreign network as left side no idea why.

sandeep1116 commented 6 years ago

Please help me I am stuck on above problem .

patitonar commented 6 years ago

The Bridge UI will try to show on the left side the network you are connected to on Metamask/Nifty Wallet/Trust Wallet. To do that, it compares the network id defined on Home network against network id from your wallet, it they match, Home will be on left side, if not, Home will be on the right side. So in order to work correctly you will need to define different networks ids for your 2 PoA networks.

sandeep1116 commented 6 years ago

thanks !

Let me try this it seems i used same network id for both PoA network.

sandeep1116 commented 6 years ago

It worked ! Many Thanks .