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

It seem as if two separate websocket connections may not be in sync #248

Closed
miracle2k opened this issue Jan 8, 2014 · 1 comment
Closed

Comments

@miracle2k
Copy link

I have two websocket connections to rippled.

In the first, I issue a {"command":"subscribe","streams":["ledger"]} to subscribe for updates. I then add those to a queue. A second websocket connection is used to query more details for each ledger, using:

{"command": "ledger", "transactions" : true, "ledger_index": %s, "expand": true}

I frequently (about a 1000 times) a day encounter the behavior that the second web socket connection gives me a record that says "closed": false, indeed sometimes with transactions that do not make it. This is despite the fact that the subscribe mechanism explicitly claimed "type":"ledgerClosed".

When I encounter this, I crash and reconnect, upon which time I get the closed ledger information. I have not tried but assume that asking the same websocket again after a delay would also yield the closed ledger.

This occurs with both my own rippled, 0.19.2, and with s1.ripple.com.

Was previously reported here: https://ripplelabs.atlassian.net/browse/IN-1

@JoelKatz
Copy link
Collaborator

This is expected behavior. There is no mechanism that ensures that everyone sees the exact same view of the ledger at the same time. One server may see a ledger as fully-validated while another server still sees that ledger as open. The guarantees are:

  1. If you see a ledger as fully confirmed, that same connection should never tell you otherwise.

  2. If you see a ledger as fully confirmed, every properly-operating server should eventually agree that ledger was fully confirmed.

There are no inter-connection or inter-server synchronization guarantees.

rec pushed a commit to rec/rippled that referenced this issue Sep 9, 2015
Fix typo, add sip_client example (SIP over WebSockets)
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