Skip to content

Conversation

@viviveevee
Copy link
Contributor

Description

The portal currently cannot sync the new website because it runs into the instruction limit, most likely because of a lot of hashing that happens on the canister side since this is the only significant change between it working and not.

How Has This Been Tested?

Locally tested with a new e2e test that reproduces the issue. Removed again since it takes ~9 minutes to run:

@test "can upload 70 2mb files" {
  install_asset assetscanister
  dfx_start
  assert_command dfx deploy

  # Create 70 files, each 8MB in size
  mkdir -p src/e2e_project_frontend/assets/large_files
  for i in $(seq 1 70); do
    dd if=/dev/urandom of="src/e2e_project_frontend/assets/large_files/file_${i}.bin" bs=8097152 count=1
  done

  # Deploy all the files
  echo Deploying...
  assert_command dfx deploy -v

  # Verify that all files were uploaded by listing them
  assert_command dfx canister call e2e_project_frontend list '(record {})'
  for i in $(seq 1 70); do
    assert_match "/large_files/file_${i}.bin"
  done

  # Verify a few files can be retrieved
  assert_command dfx canister call --query e2e_project_frontend get "(record{key=\"/large_files/file_1.bin\";accept_encodings=vec{\"identity\"}})"
  assert_match 'total_length = 8_097_152'
  
  assert_command dfx canister call --query e2e_project_frontend get "(record{key=\"/large_files/file_35.bin\";accept_encodings=vec{\"identity\"}})"
  assert_match 'total_length = 8_097_152'
  
  assert_command dfx canister call --query e2e_project_frontend get "(record{key=\"/large_files/file_70.bin\";accept_encodings=vec{\"identity\"}})"
  assert_match 'total_length = 8_097_152'
}

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@viviveevee viviveevee marked this pull request as ready for review December 19, 2025 10:13
@viviveevee viviveevee requested a review from a team as a code owner December 19, 2025 10:13
@viviveevee viviveevee merged commit 7ae5a63 into master Dec 19, 2025
130 checks passed
@viviveevee viviveevee deleted the vivee/better-chunking branch December 19, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants