Change every dagger to codex (#102)
This commit is contained in:
parent
a3f10f7f20
commit
209343087c
|
@ -209,12 +209,12 @@ jobs:
|
||||||
make NIM_COMMIT="${{ matrix.branch }}" testAll
|
make NIM_COMMIT="${{ matrix.branch }}" testAll
|
||||||
if [[ ${{ runner.os }} = macOS ]]; then
|
if [[ ${{ runner.os }} = macOS ]]; then
|
||||||
echo
|
echo
|
||||||
echo otool -L build/testDagger
|
echo otool -L build/testCodex
|
||||||
otool -L build/testDagger
|
otool -L build/testCodex
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo ldd build/testDagger
|
echo ldd build/testCodex
|
||||||
ldd build/testDagger
|
ldd build/testCodex
|
||||||
fi
|
fi
|
||||||
echo "Testing TRACE log level"
|
echo "Testing TRACE log level"
|
||||||
./env.sh nim c -d:chronicles_log_level=TRACE dagger.nim
|
./env.sh nim c -d:chronicles_log_level=TRACE codex.nim
|
||||||
|
|
|
@ -27,4 +27,4 @@ nimble.paths
|
||||||
.env
|
.env
|
||||||
|
|
||||||
.update.timestamp
|
.update.timestamp
|
||||||
dagger.nims
|
codex.nims
|
||||||
|
|
26
Makefile
26
Makefile
|
@ -56,15 +56,15 @@ else
|
||||||
NIM_PARAMS := $(NIM_PARAMS) -d:release
|
NIM_PARAMS := $(NIM_PARAMS) -d:release
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps: | deps-common nat-libs dagger.nims
|
deps: | deps-common nat-libs codex.nims
|
||||||
ifneq ($(USE_LIBBACKTRACE), 0)
|
ifneq ($(USE_LIBBACKTRACE), 0)
|
||||||
deps: | libbacktrace
|
deps: | libbacktrace
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#- deletes and recreates "dagger.nims" which on Windows is a copy instead of a proper symlink
|
#- deletes and recreates "codex.nims" which on Windows is a copy instead of a proper symlink
|
||||||
update: | update-common
|
update: | update-common
|
||||||
rm -rf dagger.nims && \
|
rm -rf codex.nims && \
|
||||||
$(MAKE) dagger.nims $(HANDLE_OUTPUT)
|
$(MAKE) codex.nims $(HANDLE_OUTPUT)
|
||||||
|
|
||||||
# detecting the os
|
# detecting the os
|
||||||
ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
|
ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
|
||||||
|
@ -79,16 +79,16 @@ endif
|
||||||
# Builds and run a part of the test suite
|
# Builds and run a part of the test suite
|
||||||
test: | build deps
|
test: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim test $(NIM_PARAMS) dagger.nims
|
$(ENV_SCRIPT) nim test $(NIM_PARAMS) codex.nims
|
||||||
|
|
||||||
# Builds and runs all tests
|
# Builds and runs all tests
|
||||||
testAll: | build deps
|
testAll: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/testDagger" "build/testContracts" && \
|
echo -e $(BUILD_MSG) "build/testCodex" "build/testContracts" && \
|
||||||
$(ENV_SCRIPT) nim testAll $(NIM_PARAMS) dagger.nims
|
$(ENV_SCRIPT) nim testAll $(NIM_PARAMS) codex.nims
|
||||||
|
|
||||||
# symlink
|
# symlink
|
||||||
dagger.nims:
|
codex.nims:
|
||||||
ln -s dagger.nimble $@
|
ln -s codex.nimble $@
|
||||||
|
|
||||||
# nim-libbacktrace
|
# nim-libbacktrace
|
||||||
libbacktrace:
|
libbacktrace:
|
||||||
|
@ -96,12 +96,12 @@ libbacktrace:
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
$(MAKE) NIMFLAGS="--lineDir:on --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage" testAll
|
$(MAKE) NIMFLAGS="--lineDir:on --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage" testAll
|
||||||
cd nimcache/release/testDagger && rm -f *.c
|
cd nimcache/release/testCodex && rm -f *.c
|
||||||
cd nimcache/release/testContracts && rm -f *.c
|
cd nimcache/release/testContracts && rm -f *.c
|
||||||
mkdir -p coverage
|
mkdir -p coverage
|
||||||
lcov --capture --directory nimcache/release/testDagger --directory nimcache/release/testContracts --output-file coverage/coverage.info
|
lcov --capture --directory nimcache/release/testCodex --directory nimcache/release/testContracts --output-file coverage/coverage.info
|
||||||
shopt -s globstar && ls $$(pwd)/dagger/{*,**/*}.nim
|
shopt -s globstar && ls $$(pwd)/codex/{*,**/*}.nim
|
||||||
shopt -s globstar && lcov --extract coverage/coverage.info $$(pwd)/dagger/{*,**/*}.nim --output-file coverage/coverage.f.info
|
shopt -s globstar && lcov --extract coverage/coverage.info $$(pwd)/codex/{*,**/*}.nim --output-file coverage/coverage.f.info
|
||||||
echo -e $(BUILD_MSG) "coverage/report/index.html"
|
echo -e $(BUILD_MSG) "coverage/report/index.html"
|
||||||
genhtml coverage/coverage.f.info --output-directory coverage/report
|
genhtml coverage/coverage.f.info --output-directory coverage/report
|
||||||
if which open >/dev/null; then (echo -e "\e[92mOpening\e[39m HTML coverage report in browser..." && open coverage/report/index.html) || true; fi
|
if which open >/dev/null; then (echo -e "\e[92mOpening\e[39m HTML coverage report in browser..." && open coverage/report/index.html) || true; fi
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -12,23 +12,23 @@ import pkg/chronos
|
||||||
import pkg/confutils
|
import pkg/confutils
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
|
|
||||||
import ./dagger/conf
|
import ./codex/conf
|
||||||
import ./dagger/dagger
|
import ./codex/codex
|
||||||
|
|
||||||
export dagger, conf, libp2p, chronos, chronicles
|
export codex, conf, libp2p, chronos, chronicles
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
import std/os
|
import std/os
|
||||||
|
|
||||||
import pkg/confutils/defs
|
import pkg/confutils/defs
|
||||||
|
|
||||||
import ./dagger/utils/fileutils
|
import ./codex/utils/fileutils
|
||||||
|
|
||||||
when defined(posix):
|
when defined(posix):
|
||||||
import system/ansi_c
|
import system/ansi_c
|
||||||
|
|
||||||
let config = DaggerConf.load(
|
let config = CodexConf.load(
|
||||||
version = daggerFullVersion
|
version = codexFullVersion
|
||||||
)
|
)
|
||||||
config.setupLogging()
|
config.setupLogging()
|
||||||
config.setupMetrics()
|
config.setupMetrics()
|
||||||
|
@ -50,7 +50,7 @@ when isMainModule:
|
||||||
|
|
||||||
trace "Repo dir initialized", dir = config.dataDir / "repo"
|
trace "Repo dir initialized", dir = config.dataDir / "repo"
|
||||||
|
|
||||||
let server = DaggerServer.new(config)
|
let server = CodexServer.new(config)
|
||||||
|
|
||||||
## Ctrl+C handling
|
## Ctrl+C handling
|
||||||
proc controlCHandler() {.noconv.} =
|
proc controlCHandler() {.noconv.} =
|
|
@ -1,7 +1,7 @@
|
||||||
mode = ScriptMode.Verbose
|
mode = ScriptMode.Verbose
|
||||||
|
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
author = "Dagger Team"
|
author = "Codex Team"
|
||||||
description = "p2p data durability engine"
|
description = "p2p data durability engine"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
binDir = "build"
|
binDir = "build"
|
||||||
|
@ -28,7 +28,7 @@ requires "nim >= 1.2.0",
|
||||||
|
|
||||||
when declared(namedBin):
|
when declared(namedBin):
|
||||||
namedBin = {
|
namedBin = {
|
||||||
"dagger/dagger": "dagger"
|
"codex/codex": "codex"
|
||||||
}.toTable()
|
}.toTable()
|
||||||
|
|
||||||
### Helper functions
|
### Helper functions
|
||||||
|
@ -45,23 +45,23 @@ proc test(name: string, srcDir = "tests/", lang = "c") =
|
||||||
buildBinary name, srcDir
|
buildBinary name, srcDir
|
||||||
exec "build/" & name
|
exec "build/" & name
|
||||||
|
|
||||||
task dagger, "build dagger binary":
|
task codex, "build codex binary":
|
||||||
buildBinary "dagger"
|
buildBinary "codex"
|
||||||
|
|
||||||
task testDagger, "Build & run Dagger tests":
|
task testCodex, "Build & run Codex tests":
|
||||||
test "testDagger"
|
test "testCodex"
|
||||||
|
|
||||||
task testContracts, "Build & run Dagger Contract tests":
|
task testContracts, "Build & run Codex Contract tests":
|
||||||
test "testContracts"
|
test "testContracts"
|
||||||
|
|
||||||
task testIntegration, "Run integration tests":
|
task testIntegration, "Run integration tests":
|
||||||
daggerTask()
|
codexTask()
|
||||||
test "testIntegration"
|
test "testIntegration"
|
||||||
|
|
||||||
task test, "Run tests":
|
task test, "Run tests":
|
||||||
testDaggerTask()
|
testCodexTask()
|
||||||
|
|
||||||
task testAll, "Run all tests":
|
task testAll, "Run all tests":
|
||||||
testDaggerTask()
|
testCodexTask()
|
||||||
testContractsTask()
|
testContractsTask()
|
||||||
testIntegrationTask()
|
testIntegrationTask()
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -30,7 +30,7 @@ import ./pendingblocks
|
||||||
export peers, pendingblocks, payments, discovery
|
export peers, pendingblocks, payments, discovery
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc engine"
|
topics = "codex blockexc engine"
|
||||||
|
|
||||||
const
|
const
|
||||||
DefaultMaxPeersPerRequest* = 10
|
DefaultMaxPeersPerRequest* = 10
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -25,7 +25,7 @@ import ../../stores/blockstore
|
||||||
import ../pendingblocks
|
import ../pendingblocks
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger discovery engine"
|
topics = "codex discovery engine"
|
||||||
|
|
||||||
const
|
const
|
||||||
DefaultConcurrentDiscRequests = 10
|
DefaultConcurrentDiscRequests = 10
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -26,9 +26,9 @@ import ./networkpeer
|
||||||
export networkpeer, payments
|
export networkpeer, payments
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc network"
|
topics = "codex blockexc network"
|
||||||
|
|
||||||
const Codec* = "/dagger/blockexc/1.0.0"
|
const Codec* = "/codex/blockexc/1.0.0"
|
||||||
|
|
||||||
type
|
type
|
||||||
WantListHandler* = proc(peer: PeerID, wantList: WantList): Future[void] {.gcsafe.}
|
WantListHandler* = proc(peer: PeerID, wantList: WantList): Future[void] {.gcsafe.}
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -15,7 +15,7 @@ import pkg/libp2p
|
||||||
import ./protobuf/blockexc
|
import ./protobuf/blockexc
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc networkpeer"
|
topics = "codex blockexc networkpeer"
|
||||||
|
|
||||||
const
|
const
|
||||||
MaxMessageSize = 100 * 1024 * 1024 # manifest files can be big
|
MaxMessageSize = 100 * 1024 * 1024 # manifest files can be big
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -25,7 +25,7 @@ import ../peercontext
|
||||||
export peercontext
|
export peercontext
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc peerctxstore"
|
topics = "codex blockexc peerctxstore"
|
||||||
|
|
||||||
type
|
type
|
||||||
PeerCtxStore* = ref object of RootObj
|
PeerCtxStore* = ref object of RootObj
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -21,7 +21,7 @@ import pkg/libp2p
|
||||||
import ../blocktype
|
import ../blocktype
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger blockexc pendingblocks"
|
topics = "codex blockexc pendingblocks"
|
||||||
|
|
||||||
const
|
const
|
||||||
DefaultBlockTimeout* = 10.minutes
|
DefaultBlockTimeout* = 10.minutes
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -33,26 +33,26 @@ import ./discovery
|
||||||
import ./contracts
|
import ./contracts
|
||||||
|
|
||||||
type
|
type
|
||||||
DaggerServer* = ref object
|
CodexServer* = ref object
|
||||||
runHandle: Future[void]
|
runHandle: Future[void]
|
||||||
config: DaggerConf
|
config: CodexConf
|
||||||
restServer: RestServerRef
|
restServer: RestServerRef
|
||||||
daggerNode: DaggerNodeRef
|
codexNode: CodexNodeRef
|
||||||
|
|
||||||
proc start*(s: DaggerServer) {.async.} =
|
proc start*(s: CodexServer) {.async.} =
|
||||||
s.restServer.start()
|
s.restServer.start()
|
||||||
await s.daggerNode.start()
|
await s.codexNode.start()
|
||||||
|
|
||||||
s.runHandle = newFuture[void]()
|
s.runHandle = newFuture[void]()
|
||||||
await s.runHandle
|
await s.runHandle
|
||||||
|
|
||||||
proc stop*(s: DaggerServer) {.async.} =
|
proc stop*(s: CodexServer) {.async.} =
|
||||||
await allFuturesThrowing(
|
await allFuturesThrowing(
|
||||||
s.restServer.stop(), s.daggerNode.stop())
|
s.restServer.stop(), s.codexNode.stop())
|
||||||
|
|
||||||
s.runHandle.complete()
|
s.runHandle.complete()
|
||||||
|
|
||||||
proc new*(T: type DaggerServer, config: DaggerConf): T =
|
proc new*(T: type CodexServer, config: CodexConf): T =
|
||||||
|
|
||||||
const SafePermissions = {UserRead, UserWrite}
|
const SafePermissions = {UserRead, UserWrite}
|
||||||
let
|
let
|
||||||
|
@ -130,9 +130,9 @@ proc new*(T: type DaggerServer, config: DaggerConf): T =
|
||||||
config.ethDeployment,
|
config.ethDeployment,
|
||||||
config.ethAccount
|
config.ethAccount
|
||||||
)
|
)
|
||||||
daggerNode = DaggerNodeRef.new(switch, store, engine, erasure, blockDiscovery, contracts)
|
codexNode = CodexNodeRef.new(switch, store, engine, erasure, blockDiscovery, contracts)
|
||||||
restServer = RestServerRef.new(
|
restServer = RestServerRef.new(
|
||||||
daggerNode.initRestApi(config),
|
codexNode.initRestApi(config),
|
||||||
initTAddress("127.0.0.1" , config.apiPort),
|
initTAddress("127.0.0.1" , config.apiPort),
|
||||||
bufferSize = (1024 * 64),
|
bufferSize = (1024 * 64),
|
||||||
maxRequestBodySize = int.high)
|
maxRequestBodySize = int.high)
|
||||||
|
@ -141,6 +141,6 @@ proc new*(T: type DaggerServer, config: DaggerConf): T =
|
||||||
switch.mount(network)
|
switch.mount(network)
|
||||||
T(
|
T(
|
||||||
config: config,
|
config: config,
|
||||||
daggerNode: daggerNode,
|
codexNode: codexNode,
|
||||||
restServer: restServer,
|
restServer: restServer,
|
||||||
)
|
)
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -44,7 +44,7 @@ type
|
||||||
Json = "json"
|
Json = "json"
|
||||||
None = "none"
|
None = "none"
|
||||||
|
|
||||||
DaggerConf* = object
|
CodexConf* = object
|
||||||
logLevel* {.
|
logLevel* {.
|
||||||
defaultValue: LogLevel.INFO
|
defaultValue: LogLevel.INFO
|
||||||
desc: "Sets the log level",
|
desc: "Sets the log level",
|
||||||
|
@ -74,7 +74,7 @@ type
|
||||||
name: "metrics-port" }: Port
|
name: "metrics-port" }: Port
|
||||||
|
|
||||||
dataDir* {.
|
dataDir* {.
|
||||||
desc: "The directory where dagger will store configuration and data."
|
desc: "The directory where codex will store configuration and data."
|
||||||
defaultValue: defaultDataDir()
|
defaultValue: defaultDataDir()
|
||||||
defaultValueDesc: ""
|
defaultValueDesc: ""
|
||||||
abbr: "d"
|
abbr: "d"
|
||||||
|
@ -124,7 +124,7 @@ type
|
||||||
name: "max-peers" }: int
|
name: "max-peers" }: int
|
||||||
|
|
||||||
agentString* {.
|
agentString* {.
|
||||||
defaultValue: "Dagger"
|
defaultValue: "Codex"
|
||||||
desc: "Node agent string which is used as identifier in network"
|
desc: "Node agent string which is used as identifier in network"
|
||||||
name: "agent-string" }: string
|
name: "agent-string" }: string
|
||||||
|
|
||||||
|
@ -171,20 +171,20 @@ const
|
||||||
nimBanner* = staticExec("nim --version | grep Version")
|
nimBanner* = staticExec("nim --version | grep Version")
|
||||||
|
|
||||||
#TODO add versionMajor, Minor & Fix when we switch to semver
|
#TODO add versionMajor, Minor & Fix when we switch to semver
|
||||||
daggerVersion* = gitRevision
|
codexVersion* = gitRevision
|
||||||
|
|
||||||
daggerFullVersion* =
|
codexFullVersion* =
|
||||||
"Dagger build " & daggerVersion & "\p" &
|
"Codex build " & codexVersion & "\p" &
|
||||||
nimBanner
|
nimBanner
|
||||||
|
|
||||||
|
|
||||||
proc defaultDataDir*(): string =
|
proc defaultDataDir*(): string =
|
||||||
let dataDir = when defined(windows):
|
let dataDir = when defined(windows):
|
||||||
"AppData" / "Roaming" / "Dagger"
|
"AppData" / "Roaming" / "Codex"
|
||||||
elif defined(macosx):
|
elif defined(macosx):
|
||||||
"Library" / "Application Support" / "Dagger"
|
"Library" / "Application Support" / "Codex"
|
||||||
else:
|
else:
|
||||||
".cache" / "dagger"
|
".cache" / "codex"
|
||||||
|
|
||||||
getHomeDir() / dataDir
|
getHomeDir() / dataDir
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ proc stripAnsi(v: string): string =
|
||||||
|
|
||||||
res
|
res
|
||||||
|
|
||||||
proc setupLogging*(conf: DaggerConf) =
|
proc setupLogging*(conf: CodexConf) =
|
||||||
when defaultChroniclesStream.outputs.type.arity != 2:
|
when defaultChroniclesStream.outputs.type.arity != 2:
|
||||||
warn "Logging configuration options not enabled in the current build"
|
warn "Logging configuration options not enabled in the current build"
|
||||||
else:
|
else:
|
||||||
|
@ -283,7 +283,7 @@ proc setupLogging*(conf: DaggerConf) =
|
||||||
|
|
||||||
setLogLevel(conf.logLevel)
|
setLogLevel(conf.logLevel)
|
||||||
|
|
||||||
proc setupMetrics*(config: DaggerConf) =
|
proc setupMetrics*(config: CodexConf) =
|
||||||
if config.metricsEnabled:
|
if config.metricsEnabled:
|
||||||
let metricsAddress = config.metricsAddress
|
let metricsAddress = config.metricsAddress
|
||||||
notice "Starting metrics HTTP server",
|
notice "Starting metrics HTTP server",
|
|
@ -1,13 +1,13 @@
|
||||||
Dagger Contracts in Nim
|
Codex Contracts in Nim
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
Nim API for the [Dagger smart contracts][1].
|
Nim API for the [Codex smart contracts][1].
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
For a global overview of the steps involved in starting and fulfilling a
|
For a global overview of the steps involved in starting and fulfilling a
|
||||||
storage contract, see [Dagger Contracts][1].
|
storage contract, see [Codex Contracts][1].
|
||||||
|
|
||||||
Smart contract
|
Smart contract
|
||||||
--------------
|
--------------
|
||||||
|
@ -15,7 +15,7 @@ Smart contract
|
||||||
Connecting to the smart contract on an Ethereum node:
|
Connecting to the smart contract on an Ethereum node:
|
||||||
|
|
||||||
```nim
|
```nim
|
||||||
import dagger/contracts
|
import codex/contracts
|
||||||
import ethers
|
import ethers
|
||||||
|
|
||||||
let address = # fill in address where the contract was deployed
|
let address = # fill in address where the contract was deployed
|
||||||
|
@ -178,4 +178,4 @@ await storage
|
||||||
|
|
||||||
[1]: https://github.com/status-im/dagger-contracts/
|
[1]: https://github.com/status-im/dagger-contracts/
|
||||||
[2]: https://ethereum.org/en/developers/docs/standards/tokens/erc-20/
|
[2]: https://ethereum.org/en/developers/docs/standards/tokens/erc-20/
|
||||||
[3]: https://github.com/status-im/dagger-research/blob/main/design/storage-proof-timing.md
|
[3]: https://github.com/status-im/codex-research/blob/main/design/storage-proof-timing.md
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -26,7 +26,7 @@ import ./backend
|
||||||
export backend
|
export backend
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger erasure"
|
topics = "codex erasure"
|
||||||
|
|
||||||
type
|
type
|
||||||
## Encode a manifest into one that is erasure protected.
|
## Encode a manifest into one that is erasure protected.
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -10,12 +10,12 @@
|
||||||
import pkg/stew/results
|
import pkg/stew/results
|
||||||
|
|
||||||
type
|
type
|
||||||
DaggerError* = object of CatchableError # base dagger error
|
CodexError* = object of CatchableError # base codex error
|
||||||
DaggerResult*[T] = Result[T, ref DaggerError]
|
CodexResult*[T] = Result[T, ref CodexError]
|
||||||
|
|
||||||
template mapFailure*(
|
template mapFailure*(
|
||||||
exp: untyped,
|
exp: untyped,
|
||||||
exc: typed = type DaggerError): untyped =
|
exc: typed = type CodexError): untyped =
|
||||||
## Convert `Result[T, E]` to `Result[E, ref CatchableError]`
|
## Convert `Result[T, E]` to `Result[E, ref CatchableError]`
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -32,12 +32,12 @@ import ./discovery
|
||||||
import ./contracts
|
import ./contracts
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger node"
|
topics = "codex node"
|
||||||
|
|
||||||
type
|
type
|
||||||
DaggerError = object of CatchableError
|
CodexError = object of CatchableError
|
||||||
|
|
||||||
DaggerNodeRef* = ref object
|
CodexNodeRef* = ref object
|
||||||
switch*: Switch
|
switch*: Switch
|
||||||
networkId*: PeerID
|
networkId*: PeerID
|
||||||
blockStore*: BlockStore
|
blockStore*: BlockStore
|
||||||
|
@ -46,7 +46,7 @@ type
|
||||||
discovery*: Discovery
|
discovery*: Discovery
|
||||||
contracts*: ?ContractInteractions
|
contracts*: ?ContractInteractions
|
||||||
|
|
||||||
proc start*(node: DaggerNodeRef) {.async.} =
|
proc start*(node: CodexNodeRef) {.async.} =
|
||||||
if not node.switch.isNil:
|
if not node.switch.isNil:
|
||||||
await node.switch.start()
|
await node.switch.start()
|
||||||
|
|
||||||
|
@ -63,9 +63,9 @@ proc start*(node: DaggerNodeRef) {.async.} =
|
||||||
await contracts.start()
|
await contracts.start()
|
||||||
|
|
||||||
node.networkId = node.switch.peerInfo.peerId
|
node.networkId = node.switch.peerInfo.peerId
|
||||||
notice "Started dagger node", id = $node.networkId, addrs = node.switch.peerInfo.addrs
|
notice "Started codex node", id = $node.networkId, addrs = node.switch.peerInfo.addrs
|
||||||
|
|
||||||
proc stop*(node: DaggerNodeRef) {.async.} =
|
proc stop*(node: CodexNodeRef) {.async.} =
|
||||||
trace "Stopping node"
|
trace "Stopping node"
|
||||||
|
|
||||||
if not node.engine.isNil:
|
if not node.engine.isNil:
|
||||||
|
@ -84,28 +84,28 @@ proc stop*(node: DaggerNodeRef) {.async.} =
|
||||||
await contracts.stop()
|
await contracts.stop()
|
||||||
|
|
||||||
proc findPeer*(
|
proc findPeer*(
|
||||||
node: DaggerNodeRef,
|
node: CodexNodeRef,
|
||||||
peerId: PeerID): Future[?PeerRecord] {.async.} =
|
peerId: PeerID): Future[?PeerRecord] {.async.} =
|
||||||
return await node.discovery.findPeer(peerId)
|
return await node.discovery.findPeer(peerId)
|
||||||
|
|
||||||
proc connect*(
|
proc connect*(
|
||||||
node: DaggerNodeRef,
|
node: CodexNodeRef,
|
||||||
peerId: PeerID,
|
peerId: PeerID,
|
||||||
addrs: seq[MultiAddress]): Future[void] =
|
addrs: seq[MultiAddress]): Future[void] =
|
||||||
node.switch.connect(peerId, addrs)
|
node.switch.connect(peerId, addrs)
|
||||||
|
|
||||||
proc retrieve*(
|
proc retrieve*(
|
||||||
node: DaggerNodeRef,
|
node: CodexNodeRef,
|
||||||
cid: Cid): Future[?!LPStream] {.async.} =
|
cid: Cid): Future[?!LPStream] {.async.} =
|
||||||
|
|
||||||
trace "Received retrieval request", cid
|
trace "Received retrieval request", cid
|
||||||
without blk =? await node.blockStore.getBlock(cid):
|
without blk =? await node.blockStore.getBlock(cid):
|
||||||
return failure(
|
return failure(
|
||||||
newException(DaggerError, "Couldn't retrieve block for Cid!"))
|
newException(CodexError, "Couldn't retrieve block for Cid!"))
|
||||||
|
|
||||||
without mc =? blk.cid.contentType():
|
without mc =? blk.cid.contentType():
|
||||||
return failure(
|
return failure(
|
||||||
newException(DaggerError, "Couldn't identify Cid!"))
|
newException(CodexError, "Couldn't identify Cid!"))
|
||||||
|
|
||||||
# if we got a manifest, stream the blocks
|
# if we got a manifest, stream the blocks
|
||||||
if $mc in ManifestContainers:
|
if $mc in ManifestContainers:
|
||||||
|
@ -152,7 +152,7 @@ proc retrieve*(
|
||||||
return LPStream(stream).success()
|
return LPStream(stream).success()
|
||||||
|
|
||||||
proc store*(
|
proc store*(
|
||||||
node: DaggerNodeRef,
|
node: CodexNodeRef,
|
||||||
stream: LPStream): Future[?!Cid] {.async.} =
|
stream: LPStream): Future[?!Cid] {.async.} =
|
||||||
trace "Storing data"
|
trace "Storing data"
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ proc store*(
|
||||||
# Generate manifest
|
# Generate manifest
|
||||||
without data =? blockManifest.encode():
|
without data =? blockManifest.encode():
|
||||||
return failure(
|
return failure(
|
||||||
newException(DaggerError, "Could not generate dataset manifest!"))
|
newException(CodexError, "Could not generate dataset manifest!"))
|
||||||
|
|
||||||
# Store as a dag-pb block
|
# Store as a dag-pb block
|
||||||
without manifest =? bt.Block.new(data = data, codec = DagPBCodec):
|
without manifest =? bt.Block.new(data = data, codec = DagPBCodec):
|
||||||
|
@ -207,7 +207,7 @@ proc store*(
|
||||||
|
|
||||||
return manifest.cid.success
|
return manifest.cid.success
|
||||||
|
|
||||||
proc requestStorage*(self: DaggerNodeRef,
|
proc requestStorage*(self: CodexNodeRef,
|
||||||
cid: Cid,
|
cid: Cid,
|
||||||
duration: UInt256,
|
duration: UInt256,
|
||||||
nodes: uint,
|
nodes: uint,
|
||||||
|
@ -289,7 +289,7 @@ proc requestStorage*(self: DaggerNodeRef,
|
||||||
return success purchase.id
|
return success purchase.id
|
||||||
|
|
||||||
proc new*(
|
proc new*(
|
||||||
T: type DaggerNodeRef,
|
T: type CodexNodeRef,
|
||||||
switch: Switch,
|
switch: Switch,
|
||||||
store: BlockStore,
|
store: BlockStore,
|
||||||
engine: BlockExcEngine,
|
engine: BlockExcEngine,
|
|
@ -199,8 +199,8 @@ proc split(f: File, s: int64): int64 =
|
||||||
return n
|
return n
|
||||||
|
|
||||||
proc hashToG1[T: byte|char](msg: openArray[T]): blst_p1 =
|
proc hashToG1[T: byte|char](msg: openArray[T]): blst_p1 =
|
||||||
## Hash to curve with Dagger specific domain separation
|
## Hash to curve with Codex specific domain separation
|
||||||
const dst = "DAGGER-PROOF-OF-CONCEPT"
|
const dst = "CODEX-PROOF-OF-CONCEPT"
|
||||||
result.blst_hash_to_g1(msg, dst, aug = "")
|
result.blst_hash_to_g1(msg, dst, aug = "")
|
||||||
|
|
||||||
proc hashNameI(name: array[namelen, byte], i: int64): blst_p1 =
|
proc hashNameI(name: array[namelen, byte], i: int64): blst_p1 =
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -102,11 +102,11 @@ proc decodeString(_: type array[32, byte],
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
err e.msg.cstring
|
err e.msg.cstring
|
||||||
|
|
||||||
proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
|
||||||
var router = RestRouter.init(validate)
|
var router = RestRouter.init(validate)
|
||||||
router.api(
|
router.api(
|
||||||
MethodGet,
|
MethodGet,
|
||||||
"/api/dagger/v1/connect/{peerId}") do (
|
"/api/codex/v1/connect/{peerId}") do (
|
||||||
peerId: PeerID,
|
peerId: PeerID,
|
||||||
addrs: seq[MultiAddress]) -> RestApiResponse:
|
addrs: seq[MultiAddress]) -> RestApiResponse:
|
||||||
## Connect to a peer
|
## Connect to a peer
|
||||||
|
@ -140,7 +140,7 @@ proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
||||||
|
|
||||||
router.api(
|
router.api(
|
||||||
MethodGet,
|
MethodGet,
|
||||||
"/api/dagger/v1/download/{id}") do (
|
"/api/codex/v1/download/{id}") do (
|
||||||
id: Cid, resp: HttpResponseRef) -> RestApiResponse:
|
id: Cid, resp: HttpResponseRef) -> RestApiResponse:
|
||||||
## Download a file from the node in a streaming
|
## Download a file from the node in a streaming
|
||||||
## manner
|
## manner
|
||||||
|
@ -185,7 +185,7 @@ proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
||||||
|
|
||||||
router.rawApi(
|
router.rawApi(
|
||||||
MethodPost,
|
MethodPost,
|
||||||
"/api/dagger/v1/storage/request/{cid}") do (cid: Cid) -> RestApiResponse:
|
"/api/codex/v1/storage/request/{cid}") do (cid: Cid) -> RestApiResponse:
|
||||||
## Create a request for storage
|
## Create a request for storage
|
||||||
##
|
##
|
||||||
## cid - the cid of a previously uploaded dataset
|
## cid - the cid of a previously uploaded dataset
|
||||||
|
@ -216,7 +216,7 @@ proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
||||||
|
|
||||||
router.rawApi(
|
router.rawApi(
|
||||||
MethodPost,
|
MethodPost,
|
||||||
"/api/dagger/v1/upload") do (
|
"/api/codex/v1/upload") do (
|
||||||
) -> RestApiResponse:
|
) -> RestApiResponse:
|
||||||
## Upload a file in a streamming manner
|
## Upload a file in a streamming manner
|
||||||
##
|
##
|
||||||
|
@ -273,7 +273,7 @@ proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
||||||
|
|
||||||
router.api(
|
router.api(
|
||||||
MethodGet,
|
MethodGet,
|
||||||
"/api/dagger/v1/info") do () -> RestApiResponse:
|
"/api/codex/v1/info") do () -> RestApiResponse:
|
||||||
## Print rudimentary node information
|
## Print rudimentary node information
|
||||||
##
|
##
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
||||||
|
|
||||||
router.api(
|
router.api(
|
||||||
MethodGet,
|
MethodGet,
|
||||||
"/api/dagger/v1/sales/availability") do () -> RestApiResponse:
|
"/api/codex/v1/sales/availability") do () -> RestApiResponse:
|
||||||
## Returns storage that is for sale
|
## Returns storage that is for sale
|
||||||
|
|
||||||
without contracts =? node.contracts:
|
without contracts =? node.contracts:
|
||||||
|
@ -299,7 +299,7 @@ proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
||||||
|
|
||||||
router.rawApi(
|
router.rawApi(
|
||||||
MethodPost,
|
MethodPost,
|
||||||
"/api/dagger/v1/sales/availability") do () -> RestApiResponse:
|
"/api/codex/v1/sales/availability") do () -> RestApiResponse:
|
||||||
## Add available storage to sell
|
## Add available storage to sell
|
||||||
##
|
##
|
||||||
## size - size of available storage in bytes
|
## size - size of available storage in bytes
|
||||||
|
@ -321,7 +321,7 @@ proc initRestApi*(node: DaggerNodeRef, conf: DaggerConf): RestRouter =
|
||||||
|
|
||||||
router.api(
|
router.api(
|
||||||
MethodGet,
|
MethodGet,
|
||||||
"/api/dagger/v1/storage/purchases/{id}") do (
|
"/api/codex/v1/storage/purchases/{id}") do (
|
||||||
id: array[32, byte]) -> RestApiResponse:
|
id: array[32, byte]) -> RestApiResponse:
|
||||||
|
|
||||||
without contracts =? node.contracts:
|
without contracts =? node.contracts:
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -29,7 +29,7 @@ import ../errors
|
||||||
export blockstore
|
export blockstore
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger cachestore"
|
topics = "codex cachestore"
|
||||||
|
|
||||||
type
|
type
|
||||||
CacheStore* = ref object of BlockStore
|
CacheStore* = ref object of BlockStore
|
||||||
|
@ -37,7 +37,7 @@ type
|
||||||
size*: Positive # in bytes
|
size*: Positive # in bytes
|
||||||
cache: LruCache[Cid, Block]
|
cache: LruCache[Cid, Block]
|
||||||
|
|
||||||
InvalidBlockSize* = object of DaggerError
|
InvalidBlockSize* = object of CodexError
|
||||||
|
|
||||||
const
|
const
|
||||||
MiB* = 1024 * 1024 # bytes, 1 mebibyte = 1,048,576 bytes
|
MiB* = 1024 * 1024 # bytes, 1 mebibyte = 1,048,576 bytes
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -26,7 +26,7 @@ import ./blockstore
|
||||||
export blockstore
|
export blockstore
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger fsstore"
|
topics = "codex fsstore"
|
||||||
|
|
||||||
type
|
type
|
||||||
FSStore* = ref object of BlockStore
|
FSStore* = ref object of BlockStore
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -24,7 +24,7 @@ import ../blockexchange
|
||||||
export blockstore, blockexchange, asyncheapqueue
|
export blockstore, blockexchange, asyncheapqueue
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger networkstore"
|
topics = "codex networkstore"
|
||||||
|
|
||||||
type
|
type
|
||||||
NetworkStore* = ref object of BlockStore
|
NetworkStore* = ref object of BlockStore
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -14,7 +14,7 @@ import pkg/chronicles
|
||||||
export libp2p, chronos, chronicles
|
export libp2p, chronos, chronicles
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger seekablestream"
|
topics = "codex seekablestream"
|
||||||
|
|
||||||
type
|
type
|
||||||
SeekableStream* = ref object of LPStream
|
SeekableStream* = ref object of LPStream
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -25,7 +25,7 @@ import ./seekablestream
|
||||||
export stores, blocktype, manifest, chronos
|
export stores, blocktype, manifest, chronos
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "dagger storestream"
|
topics = "codex storestream"
|
||||||
|
|
||||||
type
|
type
|
||||||
StoreStream* = ref object of SeekableStream
|
StoreStream* = ref object of SeekableStream
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2021 Status Research & Development GmbH
|
## Copyright (c) 2021 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
@ -75,8 +75,8 @@ switch("warning", "LockLevel:off")
|
||||||
|
|
||||||
switch("define", "libp2p_pki_schemes=secp256k1")
|
switch("define", "libp2p_pki_schemes=secp256k1")
|
||||||
#TODO this infects everything in this folder, ideally it would only
|
#TODO this infects everything in this folder, ideally it would only
|
||||||
# apply to dagger.nim, but since dagger.nims is used for other purpose
|
# apply to codex.nim, but since codex.nims is used for other purpose
|
||||||
# we can't use it. And dagger.cfg doesn't work
|
# we can't use it. And codex.cfg doesn't work
|
||||||
switch("define", "chronicles_sinks=textlines[dynamic],json[dynamic]")
|
switch("define", "chronicles_sinks=textlines[dynamic],json[dynamic]")
|
||||||
|
|
||||||
# begin Nimble config (version 1)
|
# begin Nimble config (version 1)
|
||||||
|
|
|
@ -8,11 +8,11 @@ import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/libp2p/errors
|
import pkg/libp2p/errors
|
||||||
|
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/blockexchange
|
import pkg/codex/blockexchange
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
|
|
||||||
import ../../helpers/mockdiscovery
|
import ../../helpers/mockdiscovery
|
||||||
|
|
|
@ -8,12 +8,12 @@ import pkg/chronos
|
||||||
import pkg/chronicles
|
import pkg/chronicles
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
|
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/blockexchange
|
import pkg/codex/blockexchange
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
import pkg/dagger/blockexchange/engine
|
import pkg/codex/blockexchange/engine
|
||||||
|
|
||||||
import ../../helpers/mockdiscovery
|
import ../../helpers/mockdiscovery
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import std/unittest
|
import std/unittest
|
||||||
|
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import ../../examples
|
import ../../examples
|
||||||
|
|
||||||
suite "engine payments":
|
suite "engine payments":
|
|
@ -2,7 +2,7 @@ import pkg/asynctest
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/stew/byteutils
|
import pkg/stew/byteutils
|
||||||
import ../../examples
|
import ../../examples
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
|
|
||||||
suite "account protobuf messages":
|
suite "account protobuf messages":
|
||||||
|
|
|
@ -2,7 +2,7 @@ import pkg/asynctest
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
|
|
||||||
import pkg/dagger/blockexchange/protobuf/presence
|
import pkg/codex/blockexchange/protobuf/presence
|
||||||
import ../../examples
|
import ../../examples
|
||||||
|
|
||||||
suite "block presence protobuf messages":
|
suite "block presence protobuf messages":
|
|
@ -8,12 +8,12 @@ import pkg/stew/byteutils
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/libp2p/errors
|
import pkg/libp2p/errors
|
||||||
|
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/blockexchange
|
import pkg/codex/blockexchange
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/discovery
|
import pkg/codex/discovery
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
|
|
||||||
import ../helpers
|
import ../helpers
|
||||||
import ../examples
|
import ../examples
|
|
@ -9,13 +9,13 @@ import pkg/libp2p
|
||||||
import pkg/libp2p/routing_record
|
import pkg/libp2p/routing_record
|
||||||
import pkg/libp2pdht/discv5/protocol as discv5
|
import pkg/libp2pdht/discv5/protocol as discv5
|
||||||
|
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
import pkg/dagger/blockexchange
|
import pkg/codex/blockexchange
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/discovery
|
import pkg/codex/discovery
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
import pkg/dagger/utils/asyncheapqueue
|
import pkg/codex/utils/asyncheapqueue
|
||||||
|
|
||||||
import ../helpers
|
import ../helpers
|
||||||
import ../examples
|
import ../examples
|
|
@ -7,10 +7,10 @@ import pkg/libp2p
|
||||||
import pkg/libp2p/errors
|
import pkg/libp2p/errors
|
||||||
import pkg/protobuf_serialization
|
import pkg/protobuf_serialization
|
||||||
|
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
import pkg/dagger/blockexchange
|
import pkg/codex/blockexchange
|
||||||
|
|
||||||
import ../helpers
|
import ../helpers
|
||||||
import ../examples
|
import ../examples
|
|
@ -4,8 +4,8 @@ import std/sequtils
|
||||||
import pkg/unittest2
|
import pkg/unittest2
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
|
|
||||||
import pkg/dagger/blockexchange/peers
|
import pkg/codex/blockexchange/peers
|
||||||
import pkg/dagger/blockexchange/protobuf/blockexc
|
import pkg/codex/blockexchange/protobuf/blockexc
|
||||||
|
|
||||||
import ../examples
|
import ../examples
|
||||||
|
|
|
@ -3,10 +3,10 @@ import std/sequtils
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/nitro
|
import pkg/nitro
|
||||||
import pkg/stint
|
import pkg/stint
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
import pkg/dagger/sales
|
import pkg/codex/sales
|
||||||
import ../examples
|
import ../examples
|
||||||
|
|
||||||
export examples
|
export examples
|
|
@ -1,6 +1,6 @@
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/libp2p/varint
|
import pkg/libp2p/varint
|
||||||
import pkg/dagger/blocktype
|
import pkg/codex/blocktype
|
||||||
|
|
||||||
import ./helpers/nodeutils
|
import ./helpers/nodeutils
|
||||||
import ./helpers/randomchunker
|
import ./helpers/randomchunker
|
|
@ -1,5 +1,5 @@
|
||||||
import std/times
|
import std/times
|
||||||
import dagger/clock
|
import codex/clock
|
||||||
|
|
||||||
export clock
|
export clock
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
## Nim-Dagger
|
## Nim-Codex
|
||||||
## Copyright (c) 2022 Status Research & Development GmbH
|
## Copyright (c) 2022 Status Research & Development GmbH
|
||||||
## Licensed under either of
|
## Licensed under either of
|
||||||
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||||
|
@ -12,7 +12,7 @@ import pkg/libp2p
|
||||||
import pkg/questionable
|
import pkg/questionable
|
||||||
import pkg/questionable/results
|
import pkg/questionable/results
|
||||||
import pkg/stew/shims/net
|
import pkg/stew/shims/net
|
||||||
import pkg/dagger/discovery
|
import pkg/codex/discovery
|
||||||
|
|
||||||
type
|
type
|
||||||
MockDiscovery* = ref object of Discovery
|
MockDiscovery* = ref object of Discovery
|
|
@ -1,7 +1,7 @@
|
||||||
import std/sequtils
|
import std/sequtils
|
||||||
import std/heapqueue
|
import std/heapqueue
|
||||||
import pkg/questionable
|
import pkg/questionable
|
||||||
import pkg/dagger/market
|
import pkg/codex/market
|
||||||
|
|
||||||
export market
|
export market
|
||||||
|
|
|
@ -2,7 +2,7 @@ import std/sets
|
||||||
import std/tables
|
import std/tables
|
||||||
import std/sequtils
|
import std/sequtils
|
||||||
import pkg/upraises
|
import pkg/upraises
|
||||||
import pkg/dagger/por/timing/proofs
|
import pkg/codex/por/timing/proofs
|
||||||
|
|
||||||
type
|
type
|
||||||
MockProofs* = ref object of Proofs
|
MockProofs* = ref object of Proofs
|
|
@ -3,10 +3,10 @@ import std/sequtils
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
|
|
||||||
import pkg/dagger/discovery
|
import pkg/codex/discovery
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
import pkg/dagger/blockexchange
|
import pkg/codex/blockexchange
|
||||||
|
|
||||||
import ../examples
|
import ../examples
|
||||||
|
|
|
@ -2,8 +2,8 @@ import std/sequtils
|
||||||
|
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
|
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
|
|
||||||
export chunker
|
export chunker
|
||||||
|
|
|
@ -5,8 +5,8 @@ import pkg/asynctest
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/stew/byteutils
|
import pkg/stew/byteutils
|
||||||
import pkg/questionable/results
|
import pkg/questionable/results
|
||||||
import pkg/dagger/stores/cachestore
|
import pkg/codex/stores/cachestore
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
|
|
||||||
import ../helpers
|
import ../helpers
|
||||||
|
|
|
@ -8,10 +8,10 @@ import pkg/asynctest
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/stew/byteutils
|
import pkg/stew/byteutils
|
||||||
|
|
||||||
import pkg/dagger/stores/cachestore
|
import pkg/codex/stores/cachestore
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
|
|
||||||
import ../helpers
|
import ../helpers
|
||||||
|
|
|
@ -2,8 +2,8 @@ import pkg/chronos
|
||||||
import pkg/asynctest
|
import pkg/asynctest
|
||||||
import pkg/stew/results
|
import pkg/stew/results
|
||||||
|
|
||||||
import pkg/dagger/utils/asyncheapqueue
|
import pkg/codex/utils/asyncheapqueue
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
|
|
||||||
type
|
type
|
||||||
Task* = tuple[name: string, priority: int]
|
Task* = tuple[name: string, priority: int]
|
|
@ -1,6 +1,6 @@
|
||||||
import pkg/asynctest
|
import pkg/asynctest
|
||||||
import pkg/stew/byteutils
|
import pkg/stew/byteutils
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/chronicles
|
import pkg/chronicles
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
|
@ -6,11 +6,11 @@ import pkg/libp2p
|
||||||
import pkg/questionable
|
import pkg/questionable
|
||||||
import pkg/questionable/results
|
import pkg/questionable/results
|
||||||
|
|
||||||
import pkg/dagger/erasure
|
import pkg/codex/erasure
|
||||||
import pkg/dagger/manifest
|
import pkg/codex/manifest
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
import pkg/dagger/rng
|
import pkg/codex/rng
|
||||||
|
|
||||||
import ./helpers
|
import ./helpers
|
||||||
|
|
|
@ -7,9 +7,9 @@ import pkg/asynctest
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/stew/byteutils
|
import pkg/stew/byteutils
|
||||||
|
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
import pkg/dagger/manifest
|
import pkg/codex/manifest
|
||||||
|
|
||||||
import ./helpers
|
import ./helpers
|
||||||
|
|
|
@ -10,14 +10,14 @@ import pkg/nitro
|
||||||
import pkg/libp2p
|
import pkg/libp2p
|
||||||
import pkg/libp2pdht/discv5/protocol as discv5
|
import pkg/libp2pdht/discv5/protocol as discv5
|
||||||
|
|
||||||
import pkg/dagger/stores
|
import pkg/codex/stores
|
||||||
import pkg/dagger/blockexchange
|
import pkg/codex/blockexchange
|
||||||
import pkg/dagger/chunker
|
import pkg/codex/chunker
|
||||||
import pkg/dagger/node
|
import pkg/codex/node
|
||||||
import pkg/dagger/manifest
|
import pkg/codex/manifest
|
||||||
import pkg/dagger/discovery
|
import pkg/codex/discovery
|
||||||
import pkg/dagger/blocktype as bt
|
import pkg/codex/blocktype as bt
|
||||||
import pkg/dagger/contracts
|
import pkg/codex/contracts
|
||||||
|
|
||||||
import ./helpers
|
import ./helpers
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ suite "Test Node":
|
||||||
localStore: CacheStore
|
localStore: CacheStore
|
||||||
engine: BlockExcEngine
|
engine: BlockExcEngine
|
||||||
store: NetworkStore
|
store: NetworkStore
|
||||||
node: DaggerNodeRef
|
node: CodexNodeRef
|
||||||
blockDiscovery: Discovery
|
blockDiscovery: Discovery
|
||||||
peerStore: PeerCtxStore
|
peerStore: PeerCtxStore
|
||||||
pendingBlocks: PendingBlocksManager
|
pendingBlocks: PendingBlocksManager
|
||||||
|
@ -55,7 +55,7 @@ suite "Test Node":
|
||||||
engine = BlockExcEngine.new(localStore, wallet, network, discovery, peerStore, pendingBlocks)
|
engine = BlockExcEngine.new(localStore, wallet, network, discovery, peerStore, pendingBlocks)
|
||||||
store = NetworkStore.new(engine, localStore)
|
store = NetworkStore.new(engine, localStore)
|
||||||
contracts = ContractInteractions.new()
|
contracts = ContractInteractions.new()
|
||||||
node = DaggerNodeRef.new(switch, store, engine, nil, blockDiscovery, contracts) # TODO: pass `Erasure`
|
node = CodexNodeRef.new(switch, store, engine, nil, blockDiscovery, contracts) # TODO: pass `Erasure`
|
||||||
|
|
||||||
await node.start()
|
await node.start()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import pkg/asynctest
|
import pkg/asynctest
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/dagger/proving
|
import pkg/codex/proving
|
||||||
import ./helpers/mockproofs
|
import ./helpers/mockproofs
|
||||||
import ./helpers/mockclock
|
import ./helpers/mockclock
|
||||||
import ./examples
|
import ./examples
|
|
@ -2,7 +2,7 @@ import std/times
|
||||||
import pkg/asynctest
|
import pkg/asynctest
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/stint
|
import pkg/stint
|
||||||
import pkg/dagger/purchasing
|
import pkg/codex/purchasing
|
||||||
import ./helpers/mockmarket
|
import ./helpers/mockmarket
|
||||||
import ./helpers/mockclock
|
import ./helpers/mockclock
|
||||||
import ./examples
|
import ./examples
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue