mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-12 22:43:42 +08:00
Move puppet-chain to contrib/tools
- Move puppet-chain src to contrib/tools - Update base Dockerfiles to not build/copy puppet-chain
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
[alias]
|
||||
stacks-node = "run --package stacks-node --"
|
||||
puppet-chain = "run --package puppet-chain --"
|
||||
stacks-node = "run --package stacks-node --"
|
||||
468
.vscode/launch.json
vendored
468
.vscode/launch.json
vendored
@@ -1,266 +1,208 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'blockstack-core'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"build",
|
||||
"--bin=stacks-inspect",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "stacks-inspect",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'clarity-cli'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"build",
|
||||
"--bin=clarity-cli",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "clarity-cli",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'blockstack-cli'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"build",
|
||||
"--bin=blockstack-cli",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "blockstack-cli",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": ["generate-sk"],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'puppet-chain'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"build",
|
||||
"--bin=puppet-chain",
|
||||
"--package=puppet-chain"
|
||||
],
|
||||
"filter": {
|
||||
"name": "puppet-chain",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'stacks-node' -- mocknet",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"build",
|
||||
"--bin=stacks-node",
|
||||
"--package=stacks-node"
|
||||
],
|
||||
"filter": {
|
||||
"name": "stacks-node",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": ["mocknet"],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in library 'blockstack_lib'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--lib",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "blockstack_lib",
|
||||
"kind": "lib"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'blockstack-core'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=stacks-inspect",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "stacks-inspect",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'clarity-cli'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=clarity-cli",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "clarity-cli",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'blockstack-cli'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=blockstack-cli",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "blockstack-cli",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'stacks-node'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=stacks-node",
|
||||
"--package=stacks-node"
|
||||
],
|
||||
"filter": {
|
||||
"name": "stacks-node",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'puppet-chain'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=puppet-chain",
|
||||
"--package=puppet-chain"
|
||||
],
|
||||
"filter": {
|
||||
"name": "puppet-chain",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "benchmark 'marf_bench'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bench=marf_bench",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "marf_bench",
|
||||
"kind": "bench"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "benchmark 'large_contract_bench'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bench=large_contract_bench",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "large_contract_bench",
|
||||
"kind": "bench"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "benchmark 'block_limits'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bench=block_limits",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "block_limits",
|
||||
"kind": "bench"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'blockstack-core'",
|
||||
"cargo": {
|
||||
"args": ["build", "--bin=stacks-inspect", "--package=blockstack-core"],
|
||||
"filter": {
|
||||
"name": "stacks-inspect",
|
||||
"kind": "bin"
|
||||
}
|
||||
]
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'clarity-cli'",
|
||||
"cargo": {
|
||||
"args": ["build", "--bin=clarity-cli", "--package=blockstack-core"],
|
||||
"filter": {
|
||||
"name": "clarity-cli",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'blockstack-cli'",
|
||||
"cargo": {
|
||||
"args": ["build", "--bin=blockstack-cli", "--package=blockstack-core"],
|
||||
"filter": {
|
||||
"name": "blockstack-cli",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": ["generate-sk"],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "executable 'stacks-node' -- mocknet",
|
||||
"cargo": {
|
||||
"args": ["build", "--bin=stacks-node", "--package=stacks-node"],
|
||||
"filter": {
|
||||
"name": "stacks-node",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": ["mocknet"],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in library 'blockstack_lib'",
|
||||
"cargo": {
|
||||
"args": ["test", "--no-run", "--lib", "--package=blockstack-core"],
|
||||
"filter": {
|
||||
"name": "blockstack_lib",
|
||||
"kind": "lib"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'blockstack-core'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=stacks-inspect",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "stacks-inspect",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'clarity-cli'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=clarity-cli",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "clarity-cli",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'blockstack-cli'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=blockstack-cli",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "blockstack-cli",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "unit tests in executable 'stacks-node'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=stacks-node",
|
||||
"--package=stacks-node"
|
||||
],
|
||||
"filter": {
|
||||
"name": "stacks-node",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "benchmark 'marf_bench'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bench=marf_bench",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "marf_bench",
|
||||
"kind": "bench"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "benchmark 'large_contract_bench'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bench=large_contract_bench",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "large_contract_bench",
|
||||
"kind": "bench"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "benchmark 'block_limits'",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bench=block_limits",
|
||||
"--package=blockstack-core"
|
||||
],
|
||||
"filter": {
|
||||
"name": "block_limits",
|
||||
"kind": "bench"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
15
Cargo.lock
generated
15
Cargo.lock
generated
@@ -1908,21 +1908,6 @@ dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "puppet-chain"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-h1",
|
||||
"async-std",
|
||||
"base64 0.12.3",
|
||||
"http-types",
|
||||
"rand 0.7.3",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "1.2.3"
|
||||
|
||||
@@ -133,5 +133,4 @@ members = [
|
||||
".",
|
||||
"clarity",
|
||||
"stx-genesis",
|
||||
"testnet/stacks-node",
|
||||
"testnet/puppet-chain"]
|
||||
"testnet/stacks-node"]
|
||||
|
||||
12
Dockerfile
12
Dockerfile
@@ -7,19 +7,11 @@ ARG GIT_COMMIT='No Commit Info'
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
|
||||
RUN mkdir /out
|
||||
|
||||
RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json --release
|
||||
RUN cd testnet/puppet-chain && cargo build --release
|
||||
|
||||
RUN cp target/release/stacks-node /out
|
||||
RUN cp target/release/puppet-chain /out
|
||||
|
||||
FROM alpine
|
||||
|
||||
COPY --from=build /out/ /bin/
|
||||
|
||||
FROM --platform=${TARGETPLATFORM} alpine
|
||||
COPY --from=build /out/stacks-node /bin/
|
||||
CMD ["stacks-node", "mainnet"]
|
||||
|
||||
@@ -1,24 +1,15 @@
|
||||
FROM rust:stretch as build
|
||||
FROM rust:bullseye as build
|
||||
|
||||
ARG STACKS_NODE_VERSION="No Version Info"
|
||||
ARG GIT_BRANCH='No Branch Info'
|
||||
ARG GIT_COMMIT='No Commit Info'
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir /out
|
||||
|
||||
RUN cd testnet/stacks-node && cargo build --features monitoring_prom,slog_json --release
|
||||
RUN cd testnet/puppet-chain && cargo build --release
|
||||
|
||||
RUN cp target/release/stacks-node /out
|
||||
RUN cp target/release/puppet-chain /out
|
||||
|
||||
FROM debian:stretch-slim
|
||||
|
||||
RUN apt update && apt install -y netcat
|
||||
COPY --from=build /out/ /bin/
|
||||
|
||||
FROM --platform=${TARGETPLATFORM} debian:bullseye
|
||||
COPY --from=build /out/stacks-node /bin/
|
||||
CMD ["stacks-node", "mainnet"]
|
||||
1329
contrib/tools/puppet-chain/Cargo.lock
generated
Normal file
1329
contrib/tools/puppet-chain/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -14,3 +14,7 @@ serde_derive = "1"
|
||||
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
|
||||
toml = "0.5"
|
||||
rand = "0.7.2"
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
"."]
|
||||
Reference in New Issue
Block a user