forked from parasitepool/para
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
164 lines (134 loc) · 3.34 KB
/
Copy pathjustfile
File metadata and controls
164 lines (134 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
set positional-arguments
watch +args='test':
cargo watch --clear --exec '{{args}}'
fmt:
cargo fmt --all
clippy:
cargo clippy --all --all-targets -- --deny warnings
ci: clippy
cargo fmt -- --check
cargo test --all
cargo test --all -- --ignored
outdated:
cargo outdated --root-deps-only --workspace
unused:
cargo +nightly udeps --workspace
doc:
cargo doc --workspace --open
test-without-ckpool:
cargo test --all -- --skip with_ckpool
miner stratum_endpoint='127.0.0.1:42069':
RUST_LOG=info cargo run --release -- miner \
{{stratum_endpoint}} \
--username bc1p4r54k6ju6h92x8rvucsumg06nhl4fmnr9ecg6dzw5nk24r45dzasde25r3.tick \
--password x
miner-signet:
RUST_LOG=info cargo run --release -- miner \
127.0.0.1:42069 \
--username tb1qkrrl75qekv9ree0g2qt49j8vdynsvlc4kuctrc.tick \
--password x
ping host='parasite.wtf':
cargo run ping {{host}}:42069
ping-auth host='parasite.wtf' username='bc1p4r54k6ju6h92x8rvucsumg06nhl4fmnr9ecg6dzw5nk24r45dzasde25r3.tick' password='x':
cargo run ping --username {{username}} --password {{password}} {{host}}:42069
pool:
RUST_LOG=info cargo run -- pool \
--chain signet \
--address 0.0.0.0 \
--bitcoin-rpc-username satoshi \
--bitcoin-rpc-password nakamoto
server:
RUST_LOG=info cargo run -- server \
--log-dir copr/logs \
--port 8080
build-docs:
mdbook build docs -d build
serve-docs: build-docs
python3 -m http.server --directory docs/build/html --bind 127.0.0.1 8080
init-mdbook-theme:
mdbook init --theme docs/tmp --force
install:
git submodule update --init
sudo apt-get install --yes \
autoconf \
automake \
build-essential \
capnproto \
clang-format \
cmake \
libboost-dev \
libcapnp-dev \
libevent-dev \
libpq-dev \
libsqlite3-dev \
libtool \
libzmq3-dev \
pkgconf \
python3 \
yasm \
build-bitcoind: install
#!/usr/bin/env bash
cd bitcoin
cmake -B build
cmake --build build -j 21
build-ckpool: install
#!/usr/bin/env bash
cd ckpool
./autogen.sh
./configure
make
build: build-bitcoind build-ckpool
bitcoind:
#!/usr/bin/env bash
./bitcoin/build/bin/bitcoind \
-datadir=copr \
-signet
mine:
./bin/mine
ckpool:
#!/usr/bin/env bash
cd ckpool
make
cd ..
./ckpool/src/ckpool \
-B \
-k \
--config copr/ckpool.conf \
--sockdir copr/tmp \
--loglevel 7 \
--log-shares \
--signet \
--log-txns
lint:
find ./ckpool/src -type f \( -name "*.c" -o -name "*.h" \) -not -path "**/jansson-2.14/*" -exec clang-format -i {} \;
test: lint
./bin/run_tests
psql:
./bin/postgres-init
psql-reset:
./bin/postgres-reset
prepare-release revision='master':
#!/usr/bin/env bash
set -euxo pipefail
git checkout {{ revision }}
git pull origin {{ revision }}
echo >> CHANGELOG.md
git log --pretty='format:- %s' >> CHANGELOG.md
$EDITOR CHANGELOG.md
$EDITOR Cargo.toml
version=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
cargo check
git checkout -b release-$version
git add -u
git commit -m "Release $version"
gh pr create --web
publish-release revision='master':
#!/usr/bin/env bash
set -euxo pipefail
rm -rf tmp/release
git clone git@github.com:parasitepool/para.git tmp/release
cd tmp/release
git checkout {{ revision }}
cargo publish
cd ../..
rm -rf tmp/release