diff --git a/codex/blockexchange/engine/engine.nim b/codex/blockexchange/engine/engine.nim index e1624e99..bf4cbee0 100644 --- a/codex/blockexchange/engine/engine.nim +++ b/codex/blockexchange/engine/engine.nim @@ -67,12 +67,12 @@ const DefaultMaxPeersPerRequest* = 10 DefaultTaskQueueSize = 100 DefaultConcurrentTasks = 10 - # DefaultMaxRetries = 3 - # DefaultConcurrentDiscRequests = 10 - # DefaultConcurrentAdvertRequests = 10 - # DefaultDiscoveryTimeout = 1.minutes - # DefaultMaxQueriedBlocksCache = 1000 - # DefaultMinPeersPerBlock = 3 + # DefaultMaxRetries = 3 + # DefaultConcurrentDiscRequests = 10 + # DefaultConcurrentAdvertRequests = 10 + # DefaultDiscoveryTimeout = 1.minutes + # DefaultMaxQueriedBlocksCache = 1000 + # DefaultMinPeersPerBlock = 3 type TaskHandler* = proc(task: BlockExcPeerCtx): Future[void] {.gcsafe.} diff --git a/tests/codex/slots/sampler/testutils.nim b/tests/codex/slots/sampler/testutils.nim index f20b5efc..5460fde7 100644 --- a/tests/codex/slots/sampler/testutils.nim +++ b/tests/codex/slots/sampler/testutils.nim @@ -77,15 +77,13 @@ asyncchecksuite "Test proof sampler utils": ) proc getExpectedIndices(n: int): seq[Natural] = - return collect( - newSeq, + return collect(newSeq): (; for i in 1 .. n: cellIndex( proofInput.entropy, proofInput.slotRoot, proofInput.nCellsPerSlot, i ) - ), - ) + ) check: slotCellIndices(3) == getExpectedIndices(3) diff --git a/tests/integration/codexconfig.nim b/tests/integration/codexconfig.nim index 41d7109c..5c932b5b 100644 --- a/tests/integration/codexconfig.nim +++ b/tests/integration/codexconfig.nim @@ -169,7 +169,8 @@ proc withLogFile*(self: CodexConfigs): CodexConfigs {.raises: [CodexConfigError] proc withLogFile*( self: var CodexConfig, logFile: string -) {.raises: [CodexConfigError].} = #: CodexConfigs = +) {.raises: [CodexConfigError].} = + #: CodexConfigs = ## typically called internally from the test suite, sets a log file path to ## be created during the test run, for a specified node in the group # var config = self diff --git a/tests/integration/multinodes.nim b/tests/integration/multinodes.nim index 80b1b7b5..7e5ed70f 100644 --- a/tests/integration/multinodes.nim +++ b/tests/integration/multinodes.nim @@ -218,15 +218,15 @@ template multinodesuite*(name: string, body: untyped) = ) config.addCliOption( PersistenceCmd.prover, "--circom-r1cs", - "vendor/codex-contracts-eth/verifier/networks/hardhat/proof_main.r1cs" + "vendor/codex-contracts-eth/verifier/networks/hardhat/proof_main.r1cs", ) config.addCliOption( PersistenceCmd.prover, "--circom-wasm", - "vendor/codex-contracts-eth/verifier/networks/hardhat/proof_main.wasm" + "vendor/codex-contracts-eth/verifier/networks/hardhat/proof_main.wasm", ) config.addCliOption( PersistenceCmd.prover, "--circom-zkey", - "vendor/codex-contracts-eth/verifier/networks/hardhat/proof_main.zkey" + "vendor/codex-contracts-eth/verifier/networks/hardhat/proof_main.zkey", ) return await newCodexProcess(providerIdx, config, Role.Provider) diff --git a/tests/integration/testcli.nim b/tests/integration/testcli.nim index 8d1878e2..eaaa569b 100644 --- a/tests/integration/testcli.nim +++ b/tests/integration/testcli.nim @@ -21,7 +21,7 @@ asyncchecksuite "Command line interface": args.concat( @[ "--api-port=" & $(await nextFreePort(8080 + nodeCount)), - "--disc-port=" & $(await nextFreePort(8090 + nodeCount)) + "--disc-port=" & $(await nextFreePort(8090 + nodeCount)), ] ), debug = false, @@ -40,7 +40,7 @@ asyncchecksuite "Command line interface": @[ "persistence", "--eth-provider=" & "http://127.0.0.1:" & $HardhatPort, - "--eth-private-key=" & unsafeKeyFile + "--eth-private-key=" & unsafeKeyFile, ] ) await node.waitUntilOutput( @@ -66,7 +66,7 @@ asyncchecksuite "Command line interface": "--eth-provider=" & "http://127.0.0.1:" & $HardhatPort, "prover", marketplaceArg, - "--circom-r1cs=tests/circuits/fixtures/proof_main.r1cs" + "--circom-r1cs=tests/circuits/fixtures/proof_main.r1cs", ] ) await node.waitUntilOutput(expectedDownloadInstruction) @@ -80,7 +80,7 @@ asyncchecksuite "Command line interface": "prover", marketplaceArg, "--circom-r1cs=tests/circuits/fixtures/proof_main.r1cs", - "--circom-wasm=tests/circuits/fixtures/proof_main.wasm" + "--circom-wasm=tests/circuits/fixtures/proof_main.wasm", ] ) await node.waitUntilOutput(expectedDownloadInstruction) diff --git a/tests/integration/testrestapi.nim b/tests/integration/testrestapi.nim index cf92edfb..9c1ec633 100644 --- a/tests/integration/testrestapi.nim +++ b/tests/integration/testrestapi.nim @@ -87,7 +87,7 @@ twonodessuite "REST API": var responseBefore = client1.requestStorageRaw( cid, duration, reward, proofProbability, collateral, expiry, nodes.uint, - tolerance.uint + tolerance.uint, ) check responseBefore.status == "400 Bad Request" @@ -108,7 +108,7 @@ twonodessuite "REST API": var responseBefore = client1.requestStorageRaw( cid, duration, reward, proofProbability, collateral, expiry, nodes.uint, - tolerance.uint + tolerance.uint, ) check responseBefore.status == "400 Bad Request" @@ -131,7 +131,7 @@ twonodessuite "REST API": var responseBefore = client1.requestStorageRaw( cid, duration, reward, proofProbability, collateral, expiry, nodes.uint, - tolerance.uint + tolerance.uint, ) check responseBefore.status == "400 Bad Request" @@ -153,7 +153,7 @@ twonodessuite "REST API": var responseBefore = client1.requestStorageRaw( cid, duration, reward, proofProbability, collateral, expiry, nodes.uint, - tolerance.uint + tolerance.uint, ) check responseBefore.status == "200 OK" @@ -200,7 +200,7 @@ twonodessuite "REST API": let headers = newHttpHeaders( { "Content-Type": "text/plain", - "Content-Disposition": "attachment; filename=\"example.txt\"" + "Content-Disposition": "attachment; filename=\"example.txt\"", } ) let uploadResponse = client1.uploadRaw("some file contents", headers) @@ -228,7 +228,7 @@ twonodessuite "REST API": let headers = newHttpHeaders( { "Content-Disposition": "attachment; filename=\"example.txt\"", - "Content-Type": "text/plain" + "Content-Type": "text/plain", } ) diff --git a/tests/testIntegration.nim b/tests/testIntegration.nim index 97575e9c..f3713595 100644 --- a/tests/testIntegration.nim +++ b/tests/testIntegration.nim @@ -16,7 +16,7 @@ const TestConfigs = IntegrationTestConfig.init("./integration/testmarketplace", startHardhat = true), IntegrationTestConfig.init("./integration/testproofs", startHardhat = true), IntegrationTestConfig.init("./integration/testvalidator", startHardhat = true), - IntegrationTestConfig.init("./integration/testecbug", startHardhat = true) + IntegrationTestConfig.init("./integration/testecbug", startHardhat = true), ] # Echoes stderr if there's a test failure (eg test failed, compilation error)