Skip to content

Instantly share code, notes, and snippets.

syntax = "proto3";
service NodeInterface {
rpc Messages(MessageSubscribeTo) returns (stream Message);
rpc GetRawBlock(GetRawBlockRequest) returns (GetRawBlockResponse);
rpc GetMempool(GetMempoolRequest) returns (GetMempoolResponse);
}
message MessageSubscribeTo {
bool updated_block_tip = 1;
@EyeOfPython
EyeOfPython / PluginSystem.md
Created May 10, 2021 22:30
Plugin system for Bitcoin-like blockchains

TCP Plugin system

Allows plugins to connect to nodes.

Message Layout

Messages have the same format as on the P2P network:

Name Data type Description

OP_RETURN Metaprotocol

Motivation

This protocol aims to solve the problem that multiple OP_RETURN outputs would solve but without changing the BCH standardness rules.

One aim is to be compatible with SLP such that existing SLP UTXOs will not be burned by un-upgraded wallets.

Specification

{
"v": 3,
"q": {
"db": ["u", "c"],
"aggregate": [
{
"$match": {
"$or": [
{"in.e.a": this._baseAddress},
{"out.e.a": this._baseAddress},
{
"v": 3,
"q":
{
"db": ["c", "u"],
"aggregate": [
{"$match":{
"in.h0": "45584348",
"in.b1.op": 82,
"slp.valid": true
{
"v": 3,
"q":
{
"db": ["c", "u"],
"aggregate": [
{"$match":{
"in.h0": "45584348",
"in.b1.op": 82,
"slp.valid": true,