My own grin explorer does not have genesis block data

I have just built my own grin explorer here: https://scan.grin.money.
I set my grin node to archive mode but the import_from_tip from python code only imported last 3 days and explorer only shows the heights of last 3 days. How can I have the data since genesis block like grin-explorer?
How can I make my node to be a real full node? Or the issue from the python code itself?

@noobvie Just a guess, you are probably not connected to an Archive node since there are few around. Still on my to do list to run one of my own.
If you are not connected to another archive node, but only to other nodes, you cannot sync all the older blocks including the genesis block since they are not available.

You should checkour https://grinnode.live/grinnode.live, they have some publicly available archive nodes which you can add to your peers list to sync the full blockchain with history:
https://Grinnode.live Public GRIN API and sync service
If that does not work you can contact @mcm-mike, but first try to get it to work on your own.

Thanks for the reply, I contacted with Hendi (owner of grin-explorer) and found out it was due to my old grin node (version 5.04). I upgraded to version 5.10 alpha 1 and restarted the chain_data synchronzation from the scratch to be a real full node (it’s continuing syncing more than 2 days…, not yet finished), will keep you updated once things work well.

1 Like

Technically speaking, every full node is an archive node in that it can seed the entire tx history needed to sync a new node. It just doesn’t do it block by block, which is not required in MW. The “full” in full node means that it fully verifies the tx history. It doesn’t trust any peer to tell it the truth (as might be the case with checkpoints).
To make the distinction clear, I like the name “block archive node” for a node that manages to archive all blocks.

4 Likes

I just imagine what if there is no more full archive node in the network, is it safe in case all the nodes are pruned nodes?

Grin doesn’t have any pruned nodes. Pruned nodes forget most of the tx history and are not able to seed new nodes.
If all block archive nodes are gone, along with all copies of some old block, then Grin is still fine but will have to do without further block archive nodes.

2 Likes

Maybe we have different definition of pruned node? as I see in the default configuration in file grin-server.toml

image

The difference is that a pruned node does not keep blocks, after scanning for transactions in a specific wallet, blocks are discarded. As such a pruned node cannot seed any blocks.
A grin non-archieve node on the other hand does receive and keep all the blocks from the time that node started running. So a non-archive node run from day 1 has exactly the same blocks as an archive node.
The difference comes into play when you start a new node, this new node does not re-scan/recalculate the whole transaction history but only syncs from a checkpoint.

Edit: It is important to realize that scanning/re-calculating from a checkpoint is as valid as scanning from the genesis block. So the biggest reason of running an archive node is for doing blockchain analysis since you have a copy of the full history.

1 Like

The configuration file is not using the clearest of terminology.
I’d replace “full archive” by “block archive”, and leave out the word pruned. A fast-syncing node doesn’t prune the tx history (i.e. the kernels) that it downloads from peers, and can seed other new nodes.

1 Like

For my latest update, finally I completed the sync from scratch to be a real full archive node, took me nearly 3 days and 9GB of diskspace.
The data copying from blockchain into Postgresql is still in progress, maybe 1-2 days depends on my lowend VPS.
And thanks for everyone. As a newbie, I learnt many things new from this mini project :smiley:

2 Likes