Skip to content

Commit

Permalink
Merge pull request #34 from ZeroDAO/dev
Browse files Browse the repository at this point in the history
Core primitives and modules for data sampling
  • Loading branch information
DarkingLee authored Oct 17, 2023
2 parents 28a04b1 + cd47886 commit 29e7479
Show file tree
Hide file tree
Showing 28 changed files with 776 additions and 168 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git/
.github/
.vscode
doc/
target/
72 changes: 70 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ members = [
"crates/frame-system-ext",
"crates/melo-erasure-coding",
"crates/pallet-melo-store",
"crates/das-db",
"crates/meloxt",
"runtime",
]
Expand Down
18 changes: 9 additions & 9 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ RUN apt-get update && \
apt-get autoremove -y && \
apt-get clean && \
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
# add user and link ~/.local/share/polkadot to /data
useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \
mkdir -p /data /polkadot/.local/share && \
chown -R polkadot:polkadot /data && \
ln -s /data /polkadot/.local/share/node-template
# add user and link ~/.local/share/melodot to /data
useradd -m -u 1000 -U -s /bin/sh -d /melodot melodot && \
mkdir -p /data /melodot/.local/share && \
chown -R melodot:melodot /data && \
ln -s /data /melodot/.local/share/melodot-node

USER polkadot
USER melodot

# copy the compiled binary to the container
COPY --chown=polkadot:polkadot --chmod=774 node-template /usr/bin/node-template
COPY --chown=melodot:melodot --chmod=774 melodot-node /usr/bin/melodot-node

# check if executable works in this container
RUN /usr/bin/node-template --version
RUN /usr/bin/melodot-node --version

# ws_port
EXPOSE 9930 9333 9944 30333 30334

CMD ["/usr/bin/node-template"]
CMD ["/usr/bin/melodot-node"]
9 changes: 6 additions & 3 deletions crates/core-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
melo-das-primitives = { version = "0.1.0", path = "../das-primitives", default-features = false}
melo-erasure-coding = { version = "0.1.0", path = "../melo-erasure-coding", default-features = false}
melo-das-db = { version = "0.0.1", path = "../das-db", default-features = false}

rayon = "1.5.1"
codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] }
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
serde = { version = "1.0.136", optional = true, features = ["alloc", "derive"] }
rand = { version = "0.8", default-features = false, features = ["alloc"] }

sp-core = { version = "7.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
sp-std = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
Expand All @@ -31,11 +33,10 @@ sc-offchain = {optional = true, default-features = false, git = "https://github.

# For testing
lazy_static = "1.4"
rand = { version = "0.8.5", optional = true }
sp-application-crypto = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }

[dev-dependencies]
rand = "0.8.5"
rand = "0.8"
serde_json = "1.0.85"
zstd = { version = "0.12.3", default-features = false }
sp-state-machine = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" }
Expand All @@ -47,9 +48,9 @@ default = ["std", "outside"]
std = [
"codec/std",
"log/std",
"rand",
"scale-info/std",
"serde",
"rand/std",
"sp-core/std",
"sp-runtime/std",
"melo-das-primitives/std",
Expand All @@ -62,11 +63,13 @@ std = [
"sp-application-crypto/std",
"sc-client-api",
"sc-offchain",
"melo-das-db/std",
]
outside = [
"melo-das-primitives/serde",
"sc-client-api",
"sc-offchain",
# "melo-das-db/outside",
]
parallel = [
"melo-das-primitives/parallel",
Expand Down
Loading

0 comments on commit 29e7479

Please sign in to comment.