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

Attempting to create offer encounters error "There are no arbitrators available" #3679

Closed
devinbileck opened this issue Nov 25, 2019 · 5 comments · Fixed by #3665
Closed

Comments

@devinbileck
Copy link
Member

Description

If you start a client after the arbitrator has shutdown their client, when you attempt to make an offer, you will encounter an error - "There are no arbitrators available".

Version

master (commit hash d12a404)

Steps to reproduce

Spin up a regtest environment:

  • Start the seednodes
  • Start the arbitrator instance and register as arbitrator, mediator, refund agent
  • Start Alice
  • Shut down Arbitrator
  • Start Bob
  • Attempt to create an offer with Alice
  • Attempt to create an offer with Bob

Expected behaviour

Both Alice and Bob should be able to proceed with creating an offer.

Actual behaviour

Only Alice is able to proceed to the create offer view. Bob is presented with an error - "There are no arbitrators available".

Screenshots

image

Device or machine

Windows 10

Additional info

From the log, it indicates there are no available disputeAgents but the connection details from the seed shows different.

#################################################################
Connected to node: localhost:3002
Received 3 instances
RefundAgent: 1
Mediator: 1
Arbitrator: 1
################################################################# 
Nov-24 17:21:43.488 [PeerGroup Thread] INFO  org.bitcoinj.core.PeerGroup: Attempting connection to [127.0.0.1]:18444     (0 connected, 1 pending, 0 max) 
Nov-24 17:21:43.522 [JavaFX Application Thread] INFO  b.n.p.p.g.RequestDataHandler: Processing 3 protectedStorageEntries took 42 ms. 
Nov-24 17:21:43.525 [JavaFX Application Thread] INFO  bisq.core.app.BisqSetup: walletInitialized=false, p2pNetWorkReady=true 
Nov-24 17:21:43.526 [JavaFX Application Thread] INFO  b.n.p.p.g.RequestDataHandler: Processing GetDataResponse took 48 ms 
Nov-24 17:21:43.542 [JavaFX Application Thread] INFO  bisq.core.app.BisqSetup: walletInitialized=true, p2pNetWorkReady=true 
Nov-24 17:21:43.543 [JavaFX Application Thread] INFO  bisq.core.app.BisqSetup: initDomainServices 
Nov-24 17:21:43.576 [JavaFX Application Thread] INFO  b.c.s.d.a.DisputeAgentManager: Available disputeAgents: [] 
Nov-24 17:21:43.577 [JavaFX Application Thread] INFO  b.c.s.d.a.DisputeAgentManager: Available disputeAgents: [] 
Nov-24 17:21:43.579 [JavaFX Application Thread] INFO  b.c.s.d.a.DisputeAgentManager: Available disputeAgents: [] 
@freimair
Copy link
Member

freimair commented Nov 25, 2019

I get this behavior a lot recently. Except I can have the Arbitrator running and Alice and/or Bob complain on having no arbitrator when wanting to create or take an offer.

When I say I get this behavior a lot recently, I mean that this is not always the case. Sometimes everything works, sometimes it works after getting a cup of tea, sometimes it simply does not work and I loose hours on trying to find a pattern on why that is. It is a real pain when trying to review PRs and smoke testing them...

I have not yet discovered why that is neither did I spot any pattern how this can be reproduced.

@chimp1984
Copy link
Contributor

register as arbitrator

That is not needed anymore with 1.2. Only mediator and refund agent are required.

@chimp1984
Copy link
Contributor

I just tested and saw the same issue. Both refundAgent (new arbitrator) and mediators are not available at startup. I tested then with v1.2.3 and there it is ok, so the bug was introduced by one of the recent PRs. I assume it is related to one of the P2P network changes.
Map<NodeAddress, T> map = disputeAgentService.getDisputeAgents(); has a empty map even the data has been delivered from the seed.

@julianknutsen Can it be that is caused by one of the changes in P2PDataStorage?

@chimp1984
Copy link
Contributor

I reverted P2P module back to v.1.2.3 and then the issue is gone. So it is related to a change in P2PDataStorage.

@julianknutsen
Copy link
Contributor

julianknutsen commented Nov 25, 2019

This bug was found last week during my integration tests of the GetDataRequest code. The PR was sent out on Friday. #3665

I've rebased this ahead of a few other patches that are still in review that will hopefully expedite the review cycle.

The root cause was that we were not reconstructing in-memory ProtectedStorageEntry objects from seednodes on startup if we had seen them before we shut down.

The reason it was intermittent is that if the Arbitrator node is running, it will constantly publish the data with new sequence numbers so nodes will get them. But, if it isn't running the bug didn't allow nodes to get the latest data from the seed node.

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