How to create links between the blocks added in IPFS?

I have json blocks with transaction details and added them as blocks from command line using ipfs-api.
1). How can I link these blocks together to create a blockchain?
2). Is there any way to find the last block of the blockchain created?

Logic/code would be helpful. thanks in advance!

What type of blockchain do you want to make? What problem are you trying to solve? Who will be able to add stuff? How often?..

And IPFS is a nice tool to store your blocks and to link them, libp2p is a nice tool for exchanging them, but that doesn’t make it a blockchain.

Maybe this thread is relevant:

1 Like

Thanks for the detailed explanation!
However, I’m trying to understand how blockchain is implemented in IPFS and I’m missing the links.

Firstly, my use case is storing transactions of property registration in a public blockchain. I’m trying to create a blockchain with n transactions in a block and use an algorithm to traverse back the chain to find a particular transaction, i.e., Searching of a blockchain. I have stored each transaction in a dictionary file along with the hash of the previous block. (I mean IPFS blocks, are they not same as a blockchain block?)

Now, If the rules and consensus mechanism can be incorporated in my python code, can this be implemented in IPFS or do I have to use any other blockchains like Ethereum, IOTA for this purpose. If so why do we need to use any other blockchain if I can create my own in a private network.