1Open the viewer
Go to services.divi.domains/zmq/. The page is titled Real-Time Blockchain Events, with Divi 3.0.0 ZMQ Event Viewer under it. It needs no account and no wallet, and it works on a phone.
ZMQ is the way a Divi node announces news to other programs. A node on the Divi server tells the viewer about every new block and transaction, and the viewer passes each one straight to your browser.
Within a second or two you should see:
- Status: Connected. It says Connecting... for a moment first. If it says Disconnected, see the table at the end.
- A list of cards under the counters. These are the last 100 events the viewer saw, so the page is never empty. The newest card is on top.
- Events, Blocks and Transactions counters. These count everything since the viewer last restarted, not since you opened the page. Each block and each transaction is counted twice, once for its short message and once for its full one, so the numbers are not a block height.
Mainnet makes a block about once a minute. Leave the page open and new cards appear at the top as each one arrives.
2What arrives when a block is made
Each new block brings a small burst of cards, all with the same time. Read from the bottom of the burst upwards, because that is the order they arrived in:
- hashtx and rawtx for each transaction in the block, first the coinbase and then the staking transaction, then any payments.
- hashblock, the new block's hash.
- rawblock, the block itself, decoded.
A payment someone sends also shows up on its own between blocks, as soon as the node hears of it. It then appears a second time inside the block that confirms it. The coinbase and staking transactions only ever appear with their block. For the developer's view of the same messages, see react to blocks and transactions with ZMQ.
3Read the cards
Every card has a coloured label on the left and a time on the right. The time is when the event reached the viewer, shown in your own time zone.
hashblock and hashtx cards hold a single hash. It is a link: tap it to open that block or transaction in the classic explorer in a new tab.
A rawblock card is headed Block Header and lists:
- Version, which is 4 on today's Divi blocks.
- Prev Block, the block before this one. It is a link too.
- Merkle Root, a fingerprint of all the transactions in the block.
- Time, the time written into the block, always in UTC.
- Bits, the encoded difficulty.
- Nonce, which is always 0 on Divi, because blocks are staked rather than mined.
- TX Count, the number of transactions. An ordinary block has 2.
- Raw Size, the block's size in bytes.
A rawtx card shows one transaction: its inputs, its outputs in DIVI, and its size. Two kinds come with every block:
- Coinbase Transaction, with the input "Coinbase (newly minted)" and an output of 0.00000000 DIVI. On Divi it is always empty, because the reward goes elsewhere.
- The staking transaction. The viewer labels it Regular Transaction, but you can tell it apart: its first output, Out 0, is exactly 0.00000000 DIVI. The next output pays the staker their coins back plus the reward.
The small copy buttons next to each value copy it to your clipboard. To learn what these parts of a block mean, see read a block.
4Filter, pause and switch views
Above the counters are four tick boxes, each for one kind of card:
- Blocks shows the hashblock cards.
- Transactions shows the hashtx cards.
- Raw Blocks shows the rawblock cards.
- Raw TX shows the rawtx cards.
To follow only blocks, untick Transactions and Raw TX. Cards of an unticked kind are hidden, and new ones of that kind are not added while it stays unticked.
Decoded and Raw switch every card between the readable view and the hexadecimal data exactly as the node sent it.
Pause stops new cards from appearing so you can read without the list moving. The button then says Resume. Anything that arrives while paused is skipped, not saved for later. Clear empties the list. The list keeps the newest 100 cards and drops older ones.
5Check a block against the explorer
The viewer gets its news from a Divi node, so every block it shows is a real block on the chain. Confirm it:
- Wait for the next block to arrive and find its hashblock card.
- Tap the hash. The classic explorer opens that block, with its height.
- Compare the explorer's transaction count and time with the rawblock card's TX Count and Time.
- For a fuller view, copy the hash with its copy button and paste it into the search box of Explorer 2.0.
The explorer may need a few seconds to catch up with a block the viewer showed instantly. If it says the block is not found, wait a moment and reload.
6Watch testnet
Tap the up-and-down arrows button at the top of the page. Its tooltip reads Switch to Testnet. It opens services.divi.domains/testnet/zmq/, the same viewer for testnet. Its hash links open the testnet explorer, and the same button there takes you back to mainnet.
Testnet coins have no value, which makes it a good place to watch your own transaction arrive. Send yourself some coins from the testnet faucet and keep the testnet viewer open while you do.
Any Divi node can send these same messages to your own programs. React to blocks and transactions with ZMQ shows the settings and a working script.
If something goes wrong
| You see | What it means |
|---|---|
| Status says Connecting... or Disconnected | Your browser lost its link to the viewer. Reload the page. On a work network, a firewall may block the live connection. |
| Connected, but no new cards for several minutes | Check that Pause is not on and all four boxes are ticked. Mainnet blocks are about a minute apart, but a gap of a few minutes happens. |
| Cards stopped while you were away | Phones and laptops pause background tabs. Reload the page to catch up on the last 100 events. |
| Explorer says the block or transaction is not found | The explorer has not caught up yet. Wait a few seconds and reload. On testnet, make sure the link opened the testnet explorer. |
| The counters show huge numbers | They count since the viewer last restarted, and each block and transaction counts twice. They are not the block height. |
Still stuck? Ask the Divi chatbot, or see all tutorials.