In this quick tutorial, we will cover “Understanding the Log Message Node”. The Catenis system allows you to log messages to the Bitcoin blockchain. Using the “Log Message” node on Catenis Flow allows individuals to easily log information to the Bitcoin blockchain by inserting message content in a bitcoin transaction, or IPFS message hash references into a Bitcoin transaction.
Information is logged directly to a Bitcoin Transaction if data is less than or equal to 75 bytes or characters.
When content is above 75 bytes, Catenis Flow employs automated content size detection and hashes the content, then places the content’s hash into the Bitcoin blockchain while placing the content itself onto IPFS.
In this video we will cover:
Prerequisite
Thank you for watching Understanding the Log Message Node in the Catenis Flow tutorial series. Watch the next video, Working with the Log Message Node, to further expand your knowledge.
Links from this video for easy access:
To sign up for your free account, head to our website www.blockchainofthings.com.
Join our community forum for the quickest response time to all your questions and concerns. This forum is our customer support. https://forum.blockchainofthings.com/
[Music]
Hi, this is Clara for Blockchain of Things.
Today, we’ll learn the ins and outs of the Log Message Node.
The Log Message Node on Catenis Flow, allows
individuals to easily log information to the Bitcoin Blockchain
by inserting message content or IPFS
message hash references into a bitcoin transaction.
Information is logged directly to a bitcoin transaction
if data is less than or equal to 75 bytes or characters.
When content is above 75 bytes, Catenis Flow employs automated content size deduction and hashes the content
then places the content’s hash into the Bitcoin Blockchain while placing the content itself, onto IPFS.
Note, that the content’s IPFS hash that is placed into the bitcoin transactions is Base 56 encoded.
If you would like to decode the entry into a
UTF-8 hash, there is a nifty base 56 decoder/encoder
written by James Stanley that can be found at this link:
So, let’s begin.
First, let’s review the Node Properties Panel field.
With Node-RED running in your browser,
drag a Log Message Node into your workspace
and open the Node Property Configuration
slide out panel by double-clicking on the node.
Node-RED specific fields include the
name field, and connection field
While Catenis Flow settings fields include the encoding
drop-down, encrypt checkbox, off-chain checkbox,
storage dropdown, and asynchronous checkbox.
Let’s go through the functions of each of these fields.
Starting with the name field.
Add a descriptive name of your choice to the name
field that will help differentiate this node
from others of the same type on the Node-RED workspace.
This is strongly recommended in order to keep your flow organized, but it is not required.
In the connection field, you can set a previously configured Catenis Virtual Device connection or add a new virtual device.
If you need to configure a new virtual device,
check out the video at this link to learn how.
Now, let’s take a look at the encoding drop-down menu.
Catenis Flow will automatically encode the
content you send into one of these three types you designate
UTF-8, Base 64, or Hexadecimal.
UTF-8 is typically associated with textual content and is the default encoding type Catenis uses.
Base 64 is typically used when one wants to handle
data sorted in the form of a document.
Hexadecimal is typically used when one wants to express binary numbers.
Catenis Flow defaults to encrypting all content it logs with military-grade Encryption.
However, if you want your data to be logged in clear text,
deselect the encrypt checkbox.
All Catenis messages default to being sent via the Catenis off-chain protocol.
You can choose to disable off-chain messages and send a standard message instead
by unchecking the off-chain message checkbox.
Disabling off-chain messages is highly discouraged
as standard messages incur higher fees, cost more Catenis Credits and create unneeded bitcoin transactions.
Catenis Flow supports two different modes of storage
and offers automatic detection of which
storage is needed based on the content size.
In the storage dropdown, you can choose to
use automatic detection
which will automatically detect the size of
the content you are logging,
and if the content is 75 bytes or less, it will place the content in a bitcoin transaction.
If the content is above 75 bytes it will
create a signature hash of the content
and place this signature hash in a bitcoin
transaction, while placing the content itself on IPFS.
Alternatively, you could choose to select the embed option which will force the
content being logged to be embedded with a bitcoin transaction.
If the content is above 75 bytes and this option is selected,
Catenis Flow will return an error message.
A third option is force external storage.
This setting will force the content being logged, to be hashed.
Its hash will be placed within a bitcoin transaction
and its content will be placed in external IPFS storage,
even if the content is smaller than 75 bytes.
If checked, the async checkbox forces the
content to be logged asynchronously.
This is useful when handling content that is large. Typically above 10 megabytes.
Additional properties can be set by passing an adjacent object when handling large content.
Note, that inputs injected into this node via a JSON object containing alternate node properties
will override the properties set on this node’s slide-out properties panel.
To learn how to handle large content using
a JSON object, check out the tutorial at this link:
Now, let’s take a look at the
example flow found at this link:
Copy the example flow.
Click the Node-RED hamburger menu and click import.
To display the import flow dialog box.
Paste the flow into the import box and click the import button.
This flow is a working example implementing the Log Message Node. You can pause this tutorial now to explore this flow on your own.
Now that you understand the Log Message Node,
you’re ready to begin building your own flows with the Log Message Node.
In our next video, you will learn how to build
your own version of the flow that we just imported.
[Music]