This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
amqp_witness_plugin: sign blocks as non-producer and publish over AMQP #9122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
A witness is, conceptually, a node that signs a block attesting that the entire contents of the block are valid. A producer is a witness. This plugin extends the concept to a non-producing node. When the plugin is activated irreversible blocks are signed and those signatures are published to an AMQP exchange.
An AMQP server and existing exchange must be specified. The plugin is able to use any existing signature provider: a soft key specified in the config, keosd, or a Secure Enclave key. Blocks older than a specified age will not be signed -- useful for sync or replay.
Either the block’s signature digest or simply its action merkle root is reported in the message and what is signed. I believe this is appropriate to identify the block for both applications considered. A stateful application, like a light validator, will know the block signature digest it is seeking witness signatures for. A stateless application, like an application that is only inspecting action receipts, only wishes to know that the action receipt merkle proof for a block satisfies a merkle root that a witness has signed.
This plugin communicates to the AMQP server via the reliable_amqp_publisher for increased publishing reliability.
Consensus Changes
API Changes
Documentation Additions
Yes big time; a new plugin and the start of more AMQP support throughout nodeos.