You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a node service/module that allows to subscribe to blockchain events
that can be used for things like an external explorer/blockchain indexer, wallet backend, etc.
Interesting Events
New block
Tip changed
Steps
Create a new message box in the node just like in the explorer, and
propagate the necessary events (one of those is basically what's done for
the explorer right now).
Add a new warp handler for websockets at ws://host/notifier
Basic idea
the handler will listen for new connections
at each local event will send a message to all the
connected clients
The messages will be (for now)
NewBlock(blockid): Passing id's here means that the actual block will
need to be obtained from somewhere else, but that's already needed
for bootstrapping (getting blocks from 0..tip), so it may be
enough to solve that problem there
NewTip(blockid)
All messages are one-directional. Node -> Connected clients. Clients can't
publish things.
Add new settings to configuration.
max_connections: maximum number of subscribers at the same time
Questions
Do we want the clients to be able to subscribe to specific
messages/topics/channels?
How should we encode the messages? Using a binary format? text? If we only send
ids it's not much of a difference, though.
The text was updated successfully, but these errors were encountered:
I have no experience with ws and so not sure if this makes sense, but reading about 'able to subscribe to specific messages/topics/channels' let me think about MQTT. Their clients and brokers already implement topics and subscriptions. There are plenty of client implementations. Lightweight. Standardized.
Add a publish/subscribe api for blockchain events
Idea
Have a node service/module that allows to subscribe to blockchain events
that can be used for things like an external explorer/blockchain indexer, wallet backend, etc.
Interesting Events
Steps
Create a new message box in the node just like in the explorer, and
propagate the necessary events (one of those is basically what's done for
the explorer right now).
Add a new warp handler for websockets at
ws://host/notifier
Basic idea
connected clients
The messages will be (for now)
NewBlock(blockid)
: Passing id's here means that the actual block willneed to be obtained from somewhere else, but that's already needed
for bootstrapping (getting blocks from 0..tip), so it may be
enough to solve that problem there
NewTip(blockid)
All messages are one-directional. Node -> Connected clients. Clients can't
publish things.
Add new settings to configuration.
max_connections: maximum number of subscribers at the same time
Questions
Do we want the clients to be able to subscribe to specific
messages/topics/channels?
How should we encode the messages? Using a binary format? text? If we only send
ids it's not much of a difference, though.
The text was updated successfully, but these errors were encountered: