multi: refactors for bison wallet integration#20
multi: refactors for bison wallet integration#20buck54321 wants to merge 3 commits intobisoncraft:masterfrom
Conversation
|
Should we allow users to be able to subscribe to a higher level topic i.e. "markets" and then receive updates for all subtopics? Currently, bison wallet will have to keep searching for markets and subscribe to any ones they are not subscribed to in order to get updates. Also, the current technique to search if topics exist or not depends on whether or not any clients have subscribed to the topic on the node that is being queried. I think it should instead depend on whether on not any data has been broadcast on that topic in the past X amount of time. |
I guess I assumed that there would be some kind of notification when a new topic is created.
Hmm, yeah. Nodes will have to somehow synchronize their subtries? Solution needed. |
If we allow subscribing to "markets" and that causes the user to be subscribed to all sub-topics, they will be notified whenever a message is sent on any market-related topic.
If searching for topic is not based on subscriptions, but rather based on whether or not a topic has been active in the past X minutes, then it will be easier, as all nodes receive all broadcast messages. I'm also thinking we should cache messages in tatanka nodes for a certain amount of time, so that when new users subscribe to a topic, they will immediately receive the most recent data. |
|
Should be ready for review again. Please don't get too hung up around the nuance of subscribe/unsubscribe error handling. I want to work it out in conjunction with some Bison Wallet work to see how it will work best with the caller's needs. |
|
|
||
| // Remove expired bonds. | ||
| var expiredIdx int = -1 | ||
| for i, bond := range bi.bondParams { |
There was a problem hiding this comment.
Removing expired bonds is now a subset of adding bonds. It's not explicit and couples the two processes. I think we should retain ClearExpiredBonds.
There was a problem hiding this comment.
My bad, thought there was a separate process removing expired bonds. Disregard.


A handful of refactors to make mesh work for Bison Wallet. .
requireEventuallythroughout instead oftime.Sleep. This reduces the runtime of the tests from > 30 s to < 4 s on my machine.I tried to keep stylistic changes to a minimum, but there are a couple. I also recognize that there might be some conflicts with some existing PRs, so I apologize for that and am happy to take on the brunt of the rebasing work it might generate.