NODE_EXT_SERVICES and advertising related services [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2014-08-08T13:55:42+00:00


Summary:

The discussion revolves around the possibility of having bitcoind listen on a separate port for connections from plugins. This would allow for easier management and enhanced security. The suggestion is made to use a UNIX socket instead of a TCP port, especially in scenarios where services are distributed across multiple machines.Implementing an external application or script for certain Bitcoin functions, such as 'getutxos', is also discussed. It is noted that while this could be useful for some tasks, others may require more work if implemented externally. However, information can still be queried back over RPC.The author proposes a solution where useful services like -txindex or the nLockTime storage facility can be added by having any program connect to bitcoind as normal and send "registersrv" with the necessary information. An additional standalone program can bridge this mechanism to run a shell command for specific messages.ZeroMQ, a lightweight message routing system, is mentioned as a potential plug-in for capturing precise points where a block was accepted internally. It can make P2P messages available to other applications through subscription.The categorization of block indexes in Bitcoin Wallet for Android is discussed, with the proposal to add categories instead of a single bit to enable faster and more efficient autodiscovery.There is a conversation about delegating processing of unknown messages to an external process, allowing a P2P node to be composed of separate programs. Bitcoind would act as a router through a local interprocess message bus, with ZeroMQ suggested as a suitable choice.The idea of generic service advertisement mechanisms is supported, but it is emphasized that nothing makes the proposal more focused than the existing service bits. Another email thread discusses the inclusion of advertisements in the P2P protocol, with differing opinions on whether this should be allowed. The importance of using service bits solely for advertising services on the P2P network is emphasized.In an email exchange between Wladimir and Mike Hearn, the use of service bits to advertise services on a different port is discussed. Wladimir argues against this, stating that service bits are meant for advertising services on the P2P network only and not open for discussion. The importance of having a mechanism to connect to an external service, especially when the advertised service does not have a fixed port, is highlighted.Another email exchange between Wladimir and Christian Decker focuses on the inclusion of advertisements in the P2P protocol. Christian suggests using an external network for advertising external services, but Wladimir explains that service bits are reserved for advertising services on the P2P network and proposes a mechanism to connect to external services.In conclusion, the discussions revolve around various proposals and ideas related to enhancing the functionality and flexibility of bitcoind through the use of separate ports for plugins, implementing external applications or scripts for specific Bitcoin functions, utilizing ZeroMQ as a lightweight message routing system, and exploring the categorization of block indexes in Bitcoin Wallet for Android. The conversations also touch upon the importance of maintaining the integrity and purpose of service bits in the P2P protocol and finding mechanisms to connect to external services efficiently.The suggestion from Mike Hearn in August 2014 was to continue using the existing extension mechanism until service bits start running out. This is because there is currently no shortage of service bits, allowing users to determine the services a node supports without having to connect to each one individually. By utilizing the current system, developers can add new features and functionality without impacting the core functions of the system.Using the existing extension mechanism offers flexibility and adaptability in a rapidly changing technological landscape. It also saves time and resources by avoiding the need to create an entirely new system. However, it is important to manage service bits effectively to avoid wastage or duplication. Proper monitoring and allocation of service bits are necessary to prevent conflicts or errors in the system.The Bitcoin community does not require all functionality to be built into bitcoind for a decentralized network. BitPay's insight open source block explorer API project runs on top of bitcoind and provides other services at the same IP address. This creates a decentralized network of nodes running a full node and an insight server. By querying multiple insight servers from different operators, users can avoid relying solely on BitPay's insight server and verify the results independently.To implement this in a generic way, the NODE_EXT_SERVICES is advertised through the "addr" P2P message. Nodes recognizing this bit can connect to the node and query a services list using the "getextsrv" P2P message. Services can only advertise added services if they are at the same IP address being advertised.Jeff Garzik, a Bitcoin core developer, states that this proposal is not fully developed but rather serves as a starting point for discussion. He emphasizes that implementing all services within bitcoind is unnecessary.In conclusion, the suggestion to continue using the existing extension mechanism until service bits start running out is a practical approach.


Updated on: 2023-08-01T10:12:50.941598+00:00