Skip to content

feat: Use CAR only in transit#43

Closed
andrew-ifrita wants to merge 4 commits intofeat/deploy-use-carfrom
feat/deploy-use-car-andrewa
Closed

feat: Use CAR only in transit#43
andrew-ifrita wants to merge 4 commits intofeat/deploy-use-carfrom
feat/deploy-use-car-andrewa

Conversation

@andrew-ifrita
Copy link
Copy Markdown
Collaborator

Changes built off of #36 to demonstrate what was being discussed.

~/dev/dotns-sdk/packages/cli$ time bun run dev -- bulletin upload ~/dev/andrew/moonwalker/ --car --parallel
$ bun run src/cli/index.ts bulletin upload /home/andrew/dev/andrew/moonwalker/ --car --parallel

════════════════════════════════════════
          dotns developer CLI           
════════════════════════════════════════

✔ Directory validated
• Connecting RPC wss://paseo-bulletin-rpc.polkadot.io
✓ Connecting RPC wss://paseo-bulletin-rpc.polkadot.io
• Resolving account
✓ Resolving account
• Loading keypair
✓ Loading keypair

📋 Configuration

  RPC:       wss://paseo-bulletin-rpc.polkadot.io
  Chain:     Bulletin
  Substrate: 5DfhGyQdFobKM8NsWvEeAKk5EQQgYe9AydgJ7rMB6E1EqRzV
  Auth:      default
  Account:   default
  Balance:   0.000000000000

▶ Bulletin Upload
  path:     /home/andrew/dev/andrew/moonwalker
  rpc:      wss://paseo-bulletin-rpc.polkadot.io
  mode:     car (ipfs cli)
✔ Merkleized: bafybeigkxk5xovrisw5rkcogrwg2v3qspylrylzonbytcm3xxdvs3xbnwi
✔ CAR exported: 21.14 MB
  blocks:   99
  size:     21.14 MB
✔ Stored

  cid:         bafybeigkxk5xovrisw5rkcogrwg2v3qspylrylzonbytcm3xxdvs3xbnwi
  preview:     http://dotns.paseo.li/#/preview/YmFmeWJlaWdreGs1eG92cmlzdzVya2NvZ3J3ZzJ2M3FzcHlscnlsem9uYnl0Y20zeHhkdnMzeGJud2k

✓ Upload Complete


real	2m5,927s
user	0m30,199s
sys	0m7,443s

This works

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 24, 2026

CI Summary

Check Result
PR Title Passed
Labels Passed

Labels

pkg: cli, scope: bulletin

@BigTava
Copy link
Copy Markdown
Contributor

BigTava commented Mar 24, 2026

Did you change anything in the build so the CID is different?

@andrew-ifrita
Copy link
Copy Markdown
Collaborator Author

andrew-ifrita commented Mar 24, 2026

Did you change anything in the build so the CID is different?

Yes. I added a bunch of photos to up the size from 2-3MB to 20+MB and change the root CID in the process

edit: old CID for easy reference: https://bafybeictaikgnxa6aiumef2rfheygvdz2dgmh7sb6f7dumkizodzqdgbua.ipfs.dweb.link/

@BigTava
Copy link
Copy Markdown
Contributor

BigTava commented Mar 24, 2026

Why are you storing the blocks individually? The whole point of using CAR is to avoid that altogether

This reverts commit 5fdf89e.

Batching is not supported by Bulletin Chain
@andrew-ifrita
Copy link
Copy Markdown
Collaborator Author

I attempted to batch blocks together in 5fdf89e which took us from 99 transactions to 4. However, Bulletin Chain doesn't currently support batching so that approach is dead on arrival.

@andrew-ifrita
Copy link
Copy Markdown
Collaborator Author

Why are you storing the blocks individually? The whole point of using CAR is to avoid that altogether

To keep with IPFS standards and interoperability and reduce friction for end users. This is meant to be a foundational piece of the platform. Moving away from established standards here will only have compounding effects for everyone building on the platform.

But also looking at this, by sending the blocks individually we just added a useless intermediate step. I will close this MR.

If a user wants to upload a car directly, they can do it with the existing functionality after first generating the CAR and then uploading that blob. We shouldn't help the user shoot themselves in the foot by uploading a CAR blob in a way that goes against standard IPFS usage and practices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants