-
Notifications
You must be signed in to change notification settings - Fork 206
Publishing the Unchained Index Manifest
Thomas Jay Rush edited this page Feb 10, 2024
·
17 revisions
- Update the index to the latest block
- Pin the chunks (and blooms) to both IPFS and Pinata
- Update the
manifest.json
file - Publish the
manifest.json
to the smart contract
- Either
chifra scrape
- Copy the index from the source machine (use
get_index
)
-
chifra chunks manifest
will show you the last known chunk in the manifest ($lastBlock
) - subtract a few blocks from the
$lastBlock
.lastBlock -= 10
for example. export TB_CHUNKS_PINFIRSTBLOCK=$lastBlock
-
Note: it's okay to lower
$lastBlock
a few blocks to start a little bit earlier to avoid off-by-one. $lastBlock will snap back to the start of the previous chunk if you do so. -
chifra chunks index --check
(do not proceed if it doesn't pass)
- Turn on local IPFS daemon
echo no | chifra chunks manifest --chain sepolia --pin --remote --sleep 1 --deep
- This last command will pin all the chunks after
$lastBlock
to both local IPFS daemon and Pinata (if local is running), but it will not rewrite the manifest.json file in theunchained
folder. It write the manifest.json to the local folder. - check the manifest. It should be good before proceeding.
- At this point, all pins should be both local in IPFS and remote at Pinata. Now we re-write the local manifest
-
chifra chunks manifest
should report old latest manifest record -
chifra chunks manifest --remote
should report the same lastBlock export TB_CHUNKS_PINFIRSTBLOCK= # start at block zero?
-
echo no | chifra chunks manifest --chain sepolia --pin --remote --rewrite
# note that without --deep this just pins manifest and timestamps, so setting to zero is okay
-
chifra chunks manifest
should report new latest manifest record -
chifra chunks manifest --remote
should report the same lastBlock