From ad53066131f7e08fed45e83864e668a9d6d58413 Mon Sep 17 00:00:00 2001 From: Slava <20563034+veaceslavdoina@users.noreply.github.com> Date: Tue, 25 Jun 2024 21:31:50 +0300 Subject: [PATCH 1/2] ci: add verify_circuit=true to the releases (#840) --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 936f568e..c3e67d9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,7 @@ env: nim_version: v1.6.14 rust_version: 1.78.0 binary_base: codex + nim_flags: '-d:verify_circuit=true' upload_to_codex: false jobs: @@ -74,7 +75,7 @@ jobs: - name: Release - Build run: | - make NIMFLAGS="--out:${{ env.binary }}" + make NIMFLAGS="--out:${{ env.binary }} ${{ env.nim_flags }}" - name: Release - Upload binaries uses: actions/upload-artifact@v4 From a55b676a429f8c2de4b9e7c917005f90acdfd642 Mon Sep 17 00:00:00 2001 From: Giuliano Mega Date: Tue, 25 Jun 2024 18:38:53 -0300 Subject: [PATCH 2/2] provisional fix so EC errors do not crash the node on download (#841) --- codex/node.nim | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/codex/node.nim b/codex/node.nim index e5156a69..15ca1466 100644 --- a/codex/node.nim +++ b/codex/node.nim @@ -240,14 +240,14 @@ proc streamEntireDataset( self: CodexNodeRef, manifest: Manifest, manifestCid: Cid, -): ?!LPStream = +): Future[?!LPStream] {.async.} = ## Streams the contents of the entire dataset described by the manifest. ## trace "Retrieving blocks from manifest", manifestCid if manifest.protected: # Retrieve, decode and save to the local store all EС groups - proc erasureJob(): Future[void] {.async.} = + proc erasureJob(): Future[?!void] {.async.} = try: # Spawn an erasure decoding job let @@ -258,10 +258,16 @@ proc streamEntireDataset( self.taskpool) without _ =? (await erasure.decode(manifest)), error: trace "Unable to erasure decode manifest", manifestCid, exc = error.msg - except CatchableError as exc: + # -------------------------------------------------------------------------- + # FIXME this is a HACK so that the node does not crash during the workshop. + # We should NOT catch Defect. + except Exception as exc: trace "Exception decoding manifest", manifestCid, exc = exc.msg + return failure(exc.msg) + # -------------------------------------------------------------------------- - asyncSpawn erasureJob() + if err =? (await erasureJob()).errorOption: + return failure(err) # Retrieve all blocks of the dataset sequentially from the local store or network trace "Creating store stream for manifest", manifestCid @@ -283,7 +289,7 @@ proc retrieve*( return await self.streamSingleBlock(cid) - self.streamEntireDataset(manifest, cid) + await self.streamEntireDataset(manifest, cid) proc store*( self: CodexNodeRef,