Purge Stream Data

+3 votes

Hi, I'm trying to purge stream data from a single node. As per the documentation, the parameter "(purge=true)" should be followed after unsubscribe. 

How can i pass (purge=true) after the below command? Is this the correct approach?

multichain-cli chain1 unsubscribe stream1 

asked Mar 24 by dcentr

1 Answer

0 votes
 
Best answer

If you're using the command line, it's like this:

multichain-cli chain1 unsubscribe stream1 true

When you see (purge=false) in the documentation, it means that the parameter name (which is only for the documentation and you don't use) is purge and the default value (which is applied if you don't specify a value) is false.

answered Mar 25 by MultiChain
selected Mar 28 by dcentr
Thanks, it worked!
Can streams be purged on the genesis node as well?
Or does it apply only on the rest nodes?
There is not really such thing as a genesis node. One node starts the chain and has the initial address with all permissions, but apart from that it has no special status. Streams can be unsubscribed and purged on any node.
It's strange since the command worked only on my second node.
The first node created seems to ignore the request. It unsubscribes successfully but ignores purging.
I can also confirm that when purging stream data i have only 1 node running to avoid replicating.
When you unsubscribe from a stream and purge offchain data, this only affects the subscription. If the data was published by this particular node, then you'll still have the reference from the fact that this node published the data itself. In MultiChain Enterprise this original copy can be removed using the purgepublisheditems API.
...