-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add signal for name updates #33
Comments
The way I did it in the API server is very simple: clear the cache on a new block. RPC lookups are quite fast so this should be enough for most applications for the moment. |
I think it could make sense to allow signaling of new name transactions. This is useful in use cases where a large number of names are being watched, so that fewer name_show calls are needed on each new block. It's also useful for seeing pending name operations. @phelixbtc How fast are name_show lookups in Namecoin Core? I'm skeptical that they're so fast that no users would want a signaling mechanism. @hlandau I think you were talking about this functionality a while back. Can you comment? |
Please see https://github.com/hlandau/namesync.t/blob/master/doc/name_sync.md for the protocol I implemented for my namesync use case. It would be nice if whatever is implemented could support this. |
Yes, I recall that discussion - but I think this is something completely different than name signalling with Bitcoin's |
We should have this in the ZeroMQ interface. We likely need something like this (but probably slightly different) also for Chimaera, so I'll work on this at some point in time. |
The existing ZMQ interface from upstream Bitcoin supports four publishing methods: Blocks for a new best chain tip and transactions when added to the mempool, both just by hash or with the full data. As far as I understand, this is mainly meant for use cases where Bitcoin Core is run as a "border router" that pre-validates transactions/blocks and filters out potential DoS traffic. The logical extension to names would be to define two new publishers This does not yet cover pending name operations, and it does not cover What do you think about this? |
@JeremyRand, what do you think about the proposal in my previous comment? Would that make sense? It will be useful to anyone who wants to maintain an external database of names; we will implement a similar interface for game states in Xaya (https://github.com/xaya/Specs/blob/master/interface.md), where this has already been discussed with future users. |
@domob1812 I've never actually used ZMQ (in Bitcoin Core or Namecoin Core), so I'll generally defer to you on this. That said, one interesting use case for this is that ncdns's |
Bitcoin and, in consequence, Namecoin Core implement a rough "signaling" mechanism for new blocks, alerts and tx in the wallet (
blocknotify
,alertnotify
andwalletnotify
). Very recently, they apparently also added a messaging system based on ZeroMQ.Should we take advantage of this infrastructure and work on a way to get notification on name updates? This could be useful for things like NMControl that cache values. On the other hand, it probably only makes sense if one can explicitly specify the set of names one is interested in. Otherwise, just using the block notification is enough (except if one is looking for pending transactions).
Thoughts?
The text was updated successfully, but these errors were encountered: