Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump MAX_BLOCK_SIZE to 2MiB limit imposed by bitswap #1863

Merged
merged 1 commit into from
Apr 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/api/src/routes/nfts-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { JSONResponse } from '../utils/json-response.js'
import { checkAuth } from '../utils/auth.js'
import { toNFTResponse } from '../utils/db-transforms.js'

const MAX_BLOCK_SIZE = 1 << 20 // Maximum permitted block size in bytes (1MiB).
const MAX_BLOCK_SIZE = 1 << 21 // Maximum permitted block size in bytes (2MiB).
const decoders = [pb, raw, cbor]

/**
Expand Down Expand Up @@ -195,7 +195,7 @@ export async function nftUpdateUpload(event, ctx) {
*
* - Missing root CIDs
* - >1 root CID
* - Any block bigger than MAX_BLOCK_SIZE (1MiB)
* - Any block bigger than MAX_BLOCK_SIZE (2MiB)
* - 0 blocks
* - Missing root block
* - Missing non-root blocks (when root block has links)
Expand Down