Sparse peer with transient participation
An example operation may include one or more of connecting, by a lead peer, to a blockchain network of an organization configured to store assets, receiving, by the lead peer, a block from an ordering server, that contains a plurality of chaincode transactions belonging to a plurality of peers of the blockchain, applying, by the lead peer, a filter to the block, determining, by the lead peer, a recipient peer of the block in response to the application of the filter, and receiving, by the lead peer, a notification of validation and commitment of the block to the blockchain by the recipient peer.
1. A peer node comprising:
a memory storing one or more instructions; and
a processor that when executing the one or more instructions is configured to:
connect to a decentralized network which includes a plurality of blockchain peers which receive blocks from an ordering node,
select a subset of data from a blockchain ledger shared by the plurality of blockchain peers,
transmit a filter condition that specifies one or more chaincodes that correspond to the subset of data to the plurality of blockchain peers,
receive a subset of blocks from among all blocks on the blockchain ledger through a gossip protocol executed with the plurality of blockchain peers,
construct a local blockchain ledger in the memory,
commit the subset of blocks to the local blockchain ledger in the memory, and
bootstrap to the blockchain ledger shared by the plurality of blockchain peers based on the local blockchain ledger stored in the memory.
2. The peer node of claim 1 , wherein the processor is further configured to:
selectively endorse blocks that contain transactions satisfied by data of the local blockchain ledger of the peer node.
3. The peer node of claim 1 , wherein the processor is further configured to:
maintain a set of indexes for filter conditions corresponding to a plurality of different chaincode identifiers.
4. The peer node of claim 1 , wherein each peer node, of the plurality of the peer nodes, is a sparse peer configured to only process blocks that contain a chaincode identifier associated with that sparse peer.
5. The peer node of claim 1 , wherein the processor is further configured to:
update the local blockchain ledger when blocks that match a filter of the peer node are received.
6. A method comprising:
connecting, via a peer node, to a decentralized network which includes a plurality of blockchain peers which receive blocks from an ordering node;
selecting a subset of data from a blockchain ledger shared by the plurality of blockchain peers;
transmitting a filter condition that specifies one or more chaincodes that correspond to the subset of data to the plurality of blockchain peers;
receiving a subset of blocks from among all blocks on the blockchain ledger through a gossip protocol executed with the plurality of blockchain peers;
constructing a local blockchain ledger in a memory of the peer node;
committing the subset of blocks to the local blockchain ledger in the memory; and
bootstrapping the peer node to the blockchain ledger shared by the plurality of blockchain peers based on the local blockchain ledger stored in the memory.
7. The method of claim 6 , further comprising:
selectively endorsing blocks that contain transactions that can be satisfied by data of the local blockchain ledger of the peer node.
8. The method of claim 6 , further comprising:
maintaining a set of indexes for filter conditions corresponding to a plurality of different chaincode identifiers.
9. The method of claim 6 , wherein each peer node, of the plurality of the peer nodes, is a sparse peer configured to only process blocks that contain a chaincode identifier associated with that sparse peer.
10. The method of claim 6 , further comprising:
updating the local blockchain ledger upon receiving blocks that match a filter of the peer node.
11. A non-transitory computer readable medium storing instructions that when read by a processor configure a computer to perform a method comprising:
connecting, via a peer node, to a decentralized network which includes a plurality of blockchain peers which receive blocks from an ordering node;
selecting a subset of data from a blockchain ledger shared by the plurality of blockchain peers;
transmitting a filter condition that specifies one or more chaincodes that correspond to the subset of data to the plurality of blockchain peers;
receiving a subset of blocks from among all blocks on the blockchain ledger through a gossip protocol executed with the plurality of blockchain peers;
constructing a local blockchain ledger in a memory of the peer node;
committing the subset of blocks to the local blockchain ledger in the memory; and
bootstrapping the peer node to the blockchain ledger shared by the plurality of blockchain peers based on the local blockchain ledger stored in the memory.
12. The non-transitory computer readable medium of claim 11 , wherein the one or more instruction further cause the processor to perform:
selectively endorsing blocks that contain transactions that can be satisfied by data of the local blockchain ledger of the peer node.
13. The non-transitory computer readable medium of claim 11 , wherein the one or more instruction further cause the processor to perform:
maintaining a set of indexes for filter conditions corresponding to a plurality of different chaincode identifiers.
14. The non-transitory computer readable medium of claim 11 , wherein the one or more instruction further cause the processor to perform:
updating the local blockchain ledger upon receiving blocks that match a filter of the peer node.