Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New gossip_net backend using libp2p #3988

Merged
merged 220 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
4370744
rip out haskell
Nov 7, 2019
004a5be
remove kademlia-haskell
Nov 7, 2019
a08a30f
remove dune mentions of kademlia
Nov 7, 2019
0b2ab10
remove build system kademlia remnants
Nov 7, 2019
097c3a7
some node_addrs_and_ports shuffling
Nov 8, 2019
481894c
missing dune/opam files
Nov 8, 2019
d06c577
rework peer id location
Nov 14, 2019
4ce324c
Logger.spam for annoying libp2p logs
Nov 16, 2019
59c995f
paint the rest of the owl
emberian Nov 25, 2019
c3ff0ff
remove vestigial peers_by_ip
emberian Nov 25, 2019
6c3e219
initial peers replaceme'd
emberian Nov 25, 2019
4e9f2e8
reformat
emberian Nov 25, 2019
f82a2db
list and find peers
emberian Nov 25, 2019
0264bad
makefile: don't build libp2p_helper
emberian Nov 26, 2019
cdfe4c9
replace node_addrs_and_ports field as intended
emberian Nov 26, 2019
adf8113
logproc spam
emberian Nov 26, 2019
fb70c3e
implement subscribe_encode
Nov 26, 2019
75cd8c6
update some go deps
Nov 26, 2019
25664fd
ban notification pipe, not hooked up to anything
Nov 26, 2019
c75660a
ban/unban IPs
Dec 6, 2019
d7f38ac
remove dead var
Dec 6, 2019
695a659
Clock.at
Dec 6, 2019
8bffd5e
replaceme last todo
Dec 6, 2019
306ab6d
libp2p keypair management in secrets
Dec 6, 2019
b211d20
remove old peer cli, use json peers for libp2p and not kademlia
Dec 6, 2019
d8f7f1f
only non-seed peers die when there are no initial connections
Dec 6, 2019
7a0f3da
Wait 5 seconds before doing the first DHT discovery
Dec 6, 2019
23f46e9
bind-ip doc string tweak
Dec 6, 2019
fa413bb
add missing keypair files
Dec 6, 2019
f1b4c6c
Merge remote-tracking branch 'origin/develop' into feature/net2
Dec 7, 2019
760ab37
try adding ourselves to the peer table
Dec 7, 2019
03609c6
update haskell toolchain
Dec 7, 2019
4357f9e
new toolchain for real?
Dec 7, 2019
54b08e0
don't conflict with #4033
Dec 9, 2019
57ec24d
rename haskell toolchain
Dec 9, 2019
a30ba56
use locally build deb for toolchain, instead of repo one
Dec 9, 2019
ef1f42d
new toolchain, replace ad-hoc discovery deb fetch
Dec 9, 2019
1f798dd
new toolchain, with manually published discovery deb
Dec 9, 2019
3d393c0
replace no-cache
Dec 9, 2019
e563142
Coda_net2.list_peers: filter out bogus entries
Dec 9, 2019
58b9c75
put child_subprocesses back
Dec 9, 2019
d95cba0
fix helper<->daemon mismatches, fake_network bugs
Dec 10, 2019
95dd7c6
fully implement Logger.Spam
Dec 10, 2019
9e4cb9f
bind IP is for both listen and outbound
Dec 17, 2019
cdaf7e9
don't mention libp2p in cli help
Dec 17, 2019
41f22b4
small sleep between checking node readiness
Dec 17, 2019
69eb766
move bootstrapping/advertisement before FindPeers loop
Dec 17, 2019
56ca844
use /32 as netmask
Dec 17, 2019
dd3f0b9
put bootstrap controller trust actions back
Dec 17, 2019
a5cec72
use Data.t in more places
Dec 17, 2019
33cdb4a
filter out pubsub from ourself
Dec 17, 2019
fdeff15
include header in bin_dump, expected by read_bin_prot
Dec 17, 2019
967ad28
remove current_peers, no longer used
Dec 17, 2019
06d9d64
reformat
Dec 17, 2019
ba349d7
downgrade log from info
Dec 17, 2019
ecf2db3
apply trust action on pubsub decode failure
Dec 17, 2019
442fbc3
remove stray comment
Dec 17, 2019
4bf7063
bump timeout?
Dec 17, 2019
7209022
remove Get_chain_id
Dec 17, 2019
6b457fe
add issue number for ban notifications
Dec 17, 2019
e932519
move peers comment
Dec 17, 2019
960e51b
Deferred.ignore
Dec 17, 2019
809b060
trust action for rpc_peer_then_random outgoing calls
Dec 17, 2019
601cd25
ban banned peers on startup
Dec 17, 2019
71d4f3e
timeout a bit higher?
Dec 17, 2019
a983941
bump daemon_expiry
jkrauska Dec 17, 2019
4cd9c2d
don't suppress generate-libp2p-keypair logs
Dec 17, 2019
05252cb
Merge remote-tracking branch 'origin/develop' into feature/net2
Dec 17, 2019
1ca9ef8
fix transition router post merge
Dec 17, 2019
3067b30
drain ban notification pipe
Jan 2, 2020
ba71407
Merge remote-tracking branch 'origin/develop' into feature/net2
Jan 2, 2020
fb7c350
new toolchain
Jan 3, 2020
22583ff
reformat
Jan 3, 2020
ee21ebe
don't reset the stream when it fails to be created
Jan 3, 2020
108f6f4
libp2p_helper: format some logs correctly, add bt
Jan 6, 2020
9d01558
ci: snark worker wait longer between work request
Jan 6, 2020
4d201b7
go fmt
Jan 6, 2020
e603be8
new container, updated helper
Jan 6, 2020
eed94f4
spam is the least important variant, not most
Jan 6, 2020
dad41ef
logger mli agrees
Jan 6, 2020
779fcc6
put rpc handler back (where did this go?)
Jan 7, 2020
9a4e5c6
less fatal stream invariant checking
emberian Jan 7, 2020
c436651
show, not to_string
Jan 7, 2020
575c3bc
use show correctly
Jan 7, 2020
358e44e
go back and fix this commit, cmr
Jan 8, 2020
7c4a6ff
extra bit of debug
emberian Jan 8, 2020
36170e0
remove debug, don't half-close streams, wait for rpc
Jan 9, 2020
d63d8b0
bubble up messages from validation as 'published'
Jan 10, 2020
681f387
DO log gossip in CI
Jan 10, 2020
c5f414d
Merge remote-tracking branch 'origin/develop' into feature/net2
Jan 10, 2020
a18fd9d
source is an option now
emberian Jan 10, 2020
94aee62
Merge remote-tracking branch 'origin/develop' into feature/net2
emberian Jan 10, 2020
59a9d6b
patch up all merge mistakes
emberian Jan 10, 2020
e00c34e
Fix #4097: thread a validation callback to the resource pool
Jan 11, 2020
6a0bc55
fix nil deref
Jan 11, 2020
b768626
patch leaks in subscription and stream table
Jan 11, 2020
191fbb1
update toolchain
Jan 11, 2020
8c1f39c
some debugging to tests
Jan 14, 2020
9bb1dca
Merge branch 'develop' into feature/net2
Jan 14, 2020
7c3ba27
don't bother with envelope sender for CI
emberian Jan 14, 2020
dd77ffc
new container, updated helper
Jan 14, 2020
a3b1ff5
Merge remote-tracking branch 'origin/develop' into feature/net2
Jan 14, 2020
9aaa302
Fix changes to src/app/website/static
bkase Jan 14, 2020
31f89ce
unsafe_no_trust_ip more thoroughly, remover stray debug
emberian Jan 15, 2020
ee0410a
Merge branch 'feature/net2' of github.com:codaprotocol/coda into feat…
emberian Jan 15, 2020
a9ea37a
new container, updated helper
Jan 15, 2020
d8662fc
longer validation timeout
emberian Jan 15, 2020
0c05f30
Merge remote-tracking branch 'origin/develop' into feature/net2
emberian Jan 15, 2020
9519a32
Merge branch 'feature/net2' of github.com:codaprotocol/coda into feat…
emberian Jan 15, 2020
03cd20a
libp2p helper sig
emberian Jan 15, 2020
7639532
err != nil
emberian Jan 15, 2020
4f3cfaa
WIP docker
bkase Jan 15, 2020
a8315ef
Update deps container
bkase Jan 16, 2020
58b8d79
Revert "WIP docker"
bkase Jan 16, 2020
6b626ff
Merge branch 'develop' into feature/net2
bkase Jan 16, 2020
90d2f16
only care about ports in coda peers test
emberian Jan 16, 2020
5ae9138
[WIP] validate locally-generated/redundant gossip
emberian Jan 16, 2020
63dccdf
downgrade Violated_protocol to Outgoing_connection_error
emberian Jan 16, 2020
989d0ea
bypass gossip validation for now
emberian Jan 16, 2020
5698531
avoid infinifte resource pool spin
emberian Jan 16, 2020
26f3c08
reformat
emberian Jan 16, 2020
950ba4d
new container, new helper
Jan 16, 2020
f5d1476
don't block that goroutine
emberian Jan 16, 2020
7fa0e9a
don't block forever writing validation
Jan 16, 2020
5d9150a
new container, new helper
Jan 16, 2020
b05851b
Merge branch 'feature/net2' of github.com:codaprotocol/coda into feat…
emberian Jan 16, 2020
1d78580
don't reingest outgoing validation messages
emberian Jan 16, 2020
26c10ed
reformat
emberian Jan 16, 2020
c5d4326
Merge remote-tracking branch 'origin/develop' into feature/net2
emberian Jan 16, 2020
f8b4a53
earlier validation completion
Jan 16, 2020
5a0423f
new container etc
Jan 16, 2020
b2ad32f
time helper rpc durations
emberian Jan 16, 2020
e86d4a3
Merge branch 'feature/net2' of github.com:codaprotocol/coda into feat…
emberian Jan 16, 2020
6ca80a1
don't crash when shutting down helper
emberian Jan 16, 2020
bece7a4
DO ingest messages from ourselves
emberian Jan 16, 2020
4503d56
WIP docker
bkase Jan 15, 2020
ce59f1c
Update deps
bkase Jan 16, 2020
e157be8
Revert "WIP docker"
bkase Jan 16, 2020
46d1754
fix ban_ip message
emberian Jan 17, 2020
ba0b2c7
push validation callback deeper into transitions
emberian Jan 17, 2020
af4ef5f
coda_net2 unit test self recv
Jan 17, 2020
b693404
new container, updated helper
Jan 17, 2020
9214f9e
Merge branch 'feature/net2' of github.com:codaprotocol/coda into feat…
emberian Jan 17, 2020
788e04d
fix unban ip
emberian Jan 17, 2020
c85c5cf
make sure new transitions get broadcast
emberian Jan 17, 2020
043aed3
turn up bootstrap block window
emberian Jan 18, 2020
48a0187
make normal logs quiet
emberian Jan 18, 2020
fbafb31
Switch to base64 in helper protocol, log more
Jan 23, 2020
bfe47f6
new container for the container gods
Jan 25, 2020
995ed8a
remove test that base58_check is linear time
emberian Jan 25, 2020
8f4cae7
fork mplex to set a custom max message size
emberian Jan 27, 2020
1e27491
tweak base58_check long encoding warning
emberian Jan 27, 2020
8d7c17d
remove some spare debugging
emberian Jan 27, 2020
fcdd9fe
reformat
emberian Jan 27, 2020
f1fb8a7
rename real to forward
emberian Jan 27, 2020
0f39061
tag proposed transitions with correct validation callback
emberian Jan 27, 2020
c7cdd86
add synchronization around Validators map
emberian Jan 27, 2020
b17f0e3
new container
Jan 27, 2020
e3a16c2
only throw exception if helper does OUTSIDE of normal flow
Jan 28, 2020
b08a6c2
downgrade warn to trace
Jan 28, 2020
88ebacb
more robust helper termination handling
Jan 28, 2020
383a62e
downgrade Violated_protocol to Outgoing_connection_error more
emberian Jan 28, 2020
03ff083
don't broadcast bad blocks, it gets us banned
emberian Jan 28, 2020
4e53629
don't exit 0 in the helper, we don't want stdin to close
emberian Jan 28, 2020
0fb45a0
let i/o pipes drain before closing ocaml i/o objects
Jan 28, 2020
3085573
remove unnecessary ok_exn
Jan 29, 2020
64c4f68
larger scanner buffer
Jan 29, 2020
3da4d4a
seqno 0 for special messages
Jan 29, 2020
01a7053
remove concurrency limit (default is sufficient)
Jan 29, 2020
0b8e99f
new container, last one?
Jan 29, 2020
abfe4d1
replace sleep with trace log
Jan 29, 2020
ba1fcc9
Merge branch 'feature/net2' of github.com:codaprotocol/coda into feat…
emberian Jan 30, 2020
b37d75e
more time to drain...
emberian Jan 30, 2020
f6f75a9
tweak child_processes writer shutdown logic
Feb 3, 2020
644db45
build helper in CI
Feb 3, 2020
217dd85
container sans helper
Feb 3, 2020
9b0a3ef
log helper stuff to a separate file for now
Feb 3, 2020
a9ac1ef
new container with nix
Feb 3, 2020
be5b8a6
install cachix where needed
Feb 3, 2020
25a371b
render circleci
Feb 3, 2020
49aa149
render again with more cachix
Feb 3, 2020
7cc1c6a
undo some staging changes
Feb 3, 2020
1f03464
load nix.sh before installing cachix
Feb 4, 2020
c89c98b
set USER env var for nix.sh
Feb 4, 2020
c105cd9
new container for USER
Feb 4, 2020
e1f19bc
print cmr in lint-opt
Feb 4, 2020
c2eaa60
USER=opam since apparently the container isn't good enough
Feb 4, 2020
78be315
try turning sandboxing off to prevent sethostname failure?
Feb 4, 2020
c4775c3
fix build-artifacts USER=opam
Feb 4, 2020
7bacf51
mkdir /tmp/artifacts in helper
Feb 4, 2020
481a29e
nix --option sandbox false everywhere
Feb 4, 2020
96c2649
fix makefile indentation
Feb 4, 2020
24b4d92
why isn't get_project_root starting in the right place?
Feb 4, 2020
634f779
reformat
Feb 4, 2020
5dbceff
thread peers through to local config correctly
Feb 5, 2020
7a8a1d1
cli help text grammar
Feb 5, 2020
7c8ce2a
4095 fix comments
Feb 5, 2020
fad9f0c
tests type error
emberian Feb 5, 2020
889665e
remove helper binary
emberian Feb 5, 2020
98324f6
working_dir in -background mode too
emberian Feb 6, 2020
4f7bb24
integration tests pregenerate peer ids
emberian Feb 6, 2020
23b0551
cleanup working_dir leftovers
emberian Feb 6, 2020
6166c79
small cleanups i noticed in review
emberian Feb 6, 2020
3d8d8ef
Merge remote-tracking branch 'origin/develop' into feature/net2
emberian Feb 6, 2020
6728e84
remove useless USER=opam
emberian Feb 6, 2020
6e7173a
temporarily remove limit-concurrent-connections arg
emberian Feb 6, 2020
36ea2b8
fix merge errors
emberian Feb 6, 2020
690ed16
new container
emberian Feb 6, 2020
d6c2c5f
don't not broadcast local works?
emberian Feb 6, 2020
4abd827
synchronous message pipe in gossip net
Feb 7, 2020
91c6782
support old-format discovery-keypair args
Feb 7, 2020
0d44ca5
reformat
Feb 7, 2020
e3f2bc0
Merge remote-tracking branch 'origin/develop' into feature/net2
Feb 7, 2020
9a295b7
obliterate coda-discovery
Feb 7, 2020
1798af9
fix build-auxiliary
Feb 7, 2020
e885bd7
conflict new coda-daemon deb with old coda-discovery deb
Feb 7, 2020
5df14d2
don't mention SCRIPTPATH?
Feb 7, 2020
5c0a06f
remove build-auxiliary from required tests
Feb 7, 2020
0d6789f
c'mon deb!
Feb 7, 2020
1a4885c
update mergify config
Feb 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
427 changes: 348 additions & 79 deletions .circleci/config.yml

Large diffs are not rendered by default.

157 changes: 93 additions & 64 deletions .circleci/config.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
build-archive:
resource_class: xlarge
docker:
- image: codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e
- image: codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9
environment:
CODA_DOCKER: true
HASURA_PORT: 8080
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
command: ./scripts/archive/build-release-archives.sh
lint:
docker:
- image: codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e
- image: codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9
steps:
- checkout
- run:
Expand Down Expand Up @@ -127,9 +127,12 @@ jobs:
command: ./scripts/require-ppx-coda.py
lint-opt:
docker:
- image: codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e
- image: codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9
steps:
- checkout
- run:
name: Show USER
command: echo $USER
- run:
name: Update Submodules
command: git submodule sync && git submodule update --init --recursive
Expand All @@ -151,59 +154,6 @@ jobs:
name: Update branch protection rule from test configuration
command: ./scripts/test.py required-status >required_status && cat required_status && ./scripts/update_branch_rule.py required_status

build-auxiliary:
docker:
- image: nixos/nix
steps:
- checkout
- run:
name: Install tools
command: apk add patchelf dpkg tar
- run:
name: Install cachix
command: nix-env -iA cachix -f https://cachix.org/api/v1/install
- run:
name: Build libp2p_helper using cachix
command: |
cachix use codaprotocol
cd src/app/libp2p_helper

if [ -z ${CACHIX_SIGNING_KEY+x} ]; then
echo "CACHIX_SIGNING_KEY is not set"
nix-build default.nix
else
nix-build default.nix | cachix push codaprotocol
fi
- run:
name: Create package dir
command: mkdir -p package
- run:
name: Collect and strip binary
command: |
cp src/app/libp2p_helper/result/bin/libp2p_helper package/coda-libp2p_helper
chmod +w package/coda-libp2p_helper
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 package/coda-libp2p_helper
- run:
name: Create deb
command: |
mkdir -p package/deb/usr/local/sbin
cp package/coda-libp2p_helper package/deb/usr/local/sbin/.
mkdir -p package/deb/DEBIAN
cp src/app/libp2p_helper/build/DEBIAN/control package/deb/DEBIAN/control
DATE=$(date +%Y-%m-%d)
sed -i "s/DATE/${DATE}/" package/deb/DEBIAN/control
find src/app/libp2p_helper -type f -print0 | xargs -0 sha1sum | sort | sha1sum | cut -f 1 -d ' ' > /tmp/sha1sig
HASH=$(cat /tmp/sha1sig)
sed -i "s/HASH/${HASH}/" package/deb/DEBIAN/control
echo "------------------------------------"
cat package/deb/DEBIAN/control
echo "------------------------------------"
find package/deb/
echo "------------------------------------"
dpkg-deb -v --build package/deb/ package/coda-discovery-${HASH}.deb
- store_artifacts:
path: package

build-macos:
macos:
xcode: "10.2.1"
Expand Down Expand Up @@ -287,9 +237,9 @@ jobs:
cd src/app/libp2p_helper
if [ -z ${CACHIX_SIGNING_KEY+x} ]; then
echo "CACHIX_SIGNING_KEY is not set"
nix-build default.nix
nix-build --option sandbox false default.nix
else
nix-build default.nix | cachix push codaprotocol
nix-build --option sandbox false default.nix | cachix push codaprotocol
fi

### dune
Expand Down Expand Up @@ -353,7 +303,7 @@ jobs:
build-artifacts--{{profile}}:
resource_class: xlarge
docker:
- image: codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e
- image: codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9
steps:
- checkout
- run:
Expand All @@ -366,6 +316,22 @@ jobs:
- run:
name: Pin external packages
command: ./scripts/pin-external-packages.sh
- run:
name: Install cachix
command: USER=opam . ~/.nix-profile/etc/profile.d/nix.sh && nix-env --option sandbox false -iA cachix -f https://cachix.org/api/v1/install
- run:
name: Build libp2p_helper using cachix
command: |
export USER=opam
. ~/.nix-profile/etc/profile.d/nix.sh
cachix use codaprotocol
cd src/app/libp2p_helper
if [ -z ${CACHIX_SIGNING_KEY+x} ]; then
echo "CACHIX_SIGNING_KEY is not set"
nix-build --option sandbox false default.nix
else
nix-build --option sandbox false default.nix | cachix push codaprotocol
fi
- run:
name: Build OCaml
command: ./scripts/skip_if_only_frontend.sh bash -c 'eval `opam config env` && make build 2>&1 | tee /tmp/artifacts/buildocaml.log'
Expand Down Expand Up @@ -434,7 +400,7 @@ jobs:
test-unit--{{profile}}:
resource_class: xlarge
docker:
- image: codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e
- image: codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9
steps:
- checkout
- run: ulimit -c unlimited
Expand Down Expand Up @@ -463,6 +429,22 @@ jobs:
#chmod -R 777 src/app/libp2p_helper
#Do the build
#sudo -H -u nix bash -c '. ~/.nix-profile/etc/profile.d/nix.sh && cachix use codaprotocol && cd src/app/libp2p_helper && nix-build default.nix'
- run:
name: Install cachix
command: USER=opam . ~/.nix-profile/etc/profile.d/nix.sh && nix-env --option sandbox false -iA cachix -f https://cachix.org/api/v1/install
- run:
name: Build libp2p_helper using cachix
command: |
export USER=opam
. ~/.nix-profile/etc/profile.d/nix.sh
cachix use codaprotocol
cd src/app/libp2p_helper
if [ -z ${CACHIX_SIGNING_KEY+x} ]; then
echo "CACHIX_SIGNING_KEY is not set"
nix-build --option sandbox false default.nix
else
nix-build --option sandbox false default.nix | cachix push codaprotocol
fi
- run:
name: Run unit tests
command: ./scripts/skip_if_only_frontend.sh bash -c 'source ~/.profile && dune build --profile={{profile}} -j8 && (dune runtest src/lib --profile={{profile}} -j8 || (./scripts/link-coredumps.sh && false))'
Expand All @@ -475,13 +457,29 @@ jobs:
test-unit--{{profile}}:
resource_class: xlarge
docker:
- image: codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e
- image: codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9
steps:
- checkout
- run: ulimit -c unlimited
- run:
name: Update OPAM
command: ./scripts/update-opam-in-docker.sh
- run:
name: Install cachix
command: USER=opam . ~/.nix-profile/etc/profile.d/nix.sh && nix-env --option sandbox false -iA cachix -f https://cachix.org/api/v1/install
- run:
name: Build libp2p_helper using cachix
command: |
export USER=opam
. ~/.nix-profile/etc/profile.d/nix.sh
cachix use codaprotocol
cd src/app/libp2p_helper
if [ -z ${CACHIX_SIGNING_KEY+x} ]; then
echo "CACHIX_SIGNING_KEY is not set"
nix-build --option sandbox false default.nix
else
nix-build --option sandbox false default.nix | cachix push codaprotocol
fi
- run:
name: Run unit tests
command: ./scripts/skip_if_only_frontend.sh bash -c 'source ~/.profile && dune build --profile={{profile}} -j8 && (dune runtest src/lib --profile={{profile}} -j8 || (./scripts/link-coredumps.sh && false))'
Expand All @@ -494,12 +492,28 @@ jobs:
test--{{profile}}:
resource_class: large
docker:
- image: codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e
- image: codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9
steps:
- checkout
- run:
name: Update OPAM
command: ./scripts/update-opam-in-docker.sh
- run:
name: Install cachix
command: USER=opam . ~/.nix-profile/etc/profile.d/nix.sh && nix-env --option sandbox false -iA cachix -f https://cachix.org/api/v1/install
- run:
name: Build libp2p_helper using cachix
command: |
export USER=opam
. ~/.nix-profile/etc/profile.d/nix.sh
cachix use codaprotocol
cd src/app/libp2p_helper
if [ -z ${CACHIX_SIGNING_KEY+x} ]; then
echo "CACHIX_SIGNING_KEY is not set"
nix-build --option sandbox false default.nix
else
nix-build --option sandbox false default.nix | cachix push codaprotocol
fi
{%- for test in small_curves_tests[profile] %}
- run:
name: Running test -- {{profile}}:{{test}}
Expand All @@ -513,12 +527,28 @@ jobs:
test--{{profile}}:
resource_class: xlarge
docker:
- image: codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e
- image: codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9
steps:
- checkout
- run:
name: Update OPAM
command: ./scripts/update-opam-in-docker.sh
- run:
name: Install cachix
command: USER=opam . ~/.nix-profile/etc/profile.d/nix.sh && nix-env --option sandbox false -iA cachix -f https://cachix.org/api/v1/install
- run:
name: Build libp2p_helper using cachix
command: |
export USER=opam
. ~/.nix-profile/etc/profile.d/nix.sh
cachix use codaprotocol
cd src/app/libp2p_helper
if [ -z ${CACHIX_SIGNING_KEY+x} ]; then
echo "CACHIX_SIGNING_KEY is not set"
nix-build --option sandbox false default.nix
else
nix-build --option sandbox false default.nix | cachix push codaprotocol
fi
{%- for test in medium_curves_and_other_tests[profile] %}
- run:
name: Running test -- {{profile}}:{{test}}
Expand All @@ -537,7 +567,6 @@ workflows:
jobs:
- lint
- lint-opt
- build-auxiliary
- update-branch-protection:
filters:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*
!src/opam.export
!coda.deb
!coda-discovery.deb
!src/external/**/*
!src/app/kademlia-haskell
!src/app/libp2p_helper
!src/app/trace-tool
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ frontend/website/static/presskit.zip filter=lfs diff=lfs merge=lfs -text
*.woff filter=lfs diff=lfs merge=lfs -text
*.woff2 filter=lfs diff=lfs merge=lfs -text
frontend/website/static/*.bc.js filter=lfs diff=lfs merge=lfs -text
src/app/kademlia-haskell/packages.nix linguist-generated=true
src/app/archive/archive_graphql_schema.json linguist-generated=true
docs/res/block_production_fsm.dot.png filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .github/labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"color": "#9791a0"
},
{
"name": "area-kademlia",
"name": "area-libp2p",
"color": "#9791a0"
},
{
Expand Down
1 change: 0 additions & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pull_request_rules:
- name: automatically merge approved PRs with the ready-to-merge label
conditions:
- "status-success=ci/circleci: build-artifacts--testnet_postake_medium_curves"
- "status-success=ci/circleci: build-auxiliary"
- "status-success=ci/circleci: build-wallet"
- "status-success=ci/circleci: lint"
- "status-success=ci/circleci: test--fake_hash"
Expand Down
2 changes: 0 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
/src/app/cli/src/tests @emberian @bkase @ghost-not-in-the-shell @deepthiskumar
/src/app/cli/src/coda.ml @nholland94 @bkase @emberian @imeckler
/src/app/cli/src/init @nholland94 @bkase @emberian @imeckler
/src/app/kademlia-haskell/ @bkase @emberian @psteckler
/src/app/libp2p_helper @emberian @bkase @nholland94
/src/app/reformat/ @bkase
/src/app/trace-tool/ @emberian @mrmr1993
Expand Down Expand Up @@ -50,7 +49,6 @@
/src/lib/group_map/ @rbkhmrcr @vanishreerao @imeckler
/src/lib/hash_prefixes/ @rbkhmrcr @vanishreerao @imeckler
/src/lib/interruptible/ @bkase @nholland94
/src/lib/kademlia @bkase @emberian @psteckler
/src/lib/key_value_database/ @bkase @nholland94 @psteckler
/src/lib/keys_lib/ @emberian @mrmr1993 @imeckler
/src/lib/ledger_catchup/ @nholland94 @ghost-not-in-the-shell
Expand Down
22 changes: 3 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ GITLONGHASH = $(shell git rev-parse HEAD)
MYUID = $(shell id -u)
DOCKERNAME = codabuilder-$(MYUID)

# Unique signature of kademlia code tree
KADEMLIA_SIG = $(shell cd src/app/kademlia-haskell ; find . -type f -print0 | xargs -0 sha1sum | sort | sha1sum | cut -f 1 -d ' ')
# Unique signature of libp2p code tree
LIBP2P_HELPER_SIG = $(shell cd src/app/libp2p_helper ; find . -type f -print0 | xargs -0 sha1sum | sort | sha1sum | cut -f 1 -d ' ')

ifeq ($(DUNE_PROFILE),)
Expand Down Expand Up @@ -61,15 +60,9 @@ clean:
@rm -rf _build
@rm -rf src/$(COVERAGE_DIR)

kademlia:
@# FIXME: Bash wrap here is awkward but required to get nix-env
bash -c "source ~/.profile && cd src/app/kademlia-haskell && nix-build release2.nix"

libp2p_helper:
bash -c "source ~/.profile && cd src/app/libp2p_helper && nix-build default.nix"

# Alias
dht: kademlia libp2p_helper

GENESIS_DIR := $(TMPDIR)/coda_cache_dir

Expand Down Expand Up @@ -105,7 +98,7 @@ update-opam:
macos-portable:
@rm -rf _build/coda-daemon-macos/
@rm -rf _build/coda-daemon-macos.zip
@./scripts/macos-portable.sh src/_build/default/src/app/cli/src/coda.exe src/app/kademlia-haskell/result/bin/kademlia _build/coda-daemon-macos
@./scripts/macos-portable.sh src/_build/default/src/app/cli/src/coda.exe _build/coda-daemon-macos
@zip -r _build/coda-daemon-macos.zip _build/coda-daemon-macos/
@echo Find coda-daemon-macos.zip inside _build/

Expand Down Expand Up @@ -177,15 +170,6 @@ docker-toolchain-rust:
echo "Repo has uncommited changes, commit first to set hash." ;\
fi

# All in one step to build toolchain and binary for kademlia
# TODO: Rename to docker-toolchain-discovery
docker-toolchain-haskell:
@echo "Building codaprotocol/coda:toolchain-haskell-$(KADEMLIA_SIG)" ;\
docker build --file dockerfiles/Dockerfile-toolchain-haskell --tag codaprotocol/coda:toolchain-haskell-$(KADEMLIA_SIG) . ;\
echo 'Extracting deb package' ;\
mkdir -p _build ;\
docker run --rm --entrypoint cat codaprotocol/coda:toolchain-haskell-$(KADEMLIA_SIG) /src/coda-discovery.deb > _build/coda-discovery.deb

update-deps:
./scripts/update-toolchain-references.sh $(GITLONGHASH)
make render-circleci
Expand Down Expand Up @@ -316,4 +300,4 @@ ml-docs:
# unless there is a reason not to.
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
# HACK: cat Makefile | egrep '^\w.*' | sed 's/:/ /' | awk '{print $1}' | grep -v myprocs | sort | xargs
.PHONY: all base-docker base-googlecloud base-minikube build check-format ci-base-docker clean codaslim containerstart deb dev codabuilder kademlia coda-docker coda-googlecloud coda-minikube ocaml407-googlecloud pull-ocaml407-googlecloud reformat test test-all test-coda-block-production-sig test-coda-block-production-stake test-codapeers-sig test-codapeers-stake test-full-sig test-full-stake test-runtest test-transaction-snark-profiler-sig test-transaction-snark-profiler-stake update-deps render-circleci check-render-circleci docker-toolchain-rust toolchains doc_diagrams ml-docs macos-setup macos-setup-download macos-setup-compile
.PHONY: all base-docker base-googlecloud base-minikube build check-format ci-base-docker clean codaslim containerstart deb dev codabuilder coda-docker coda-googlecloud coda-minikube ocaml407-googlecloud pull-ocaml407-googlecloud reformat test test-all test-coda-block-production-sig test-coda-block-production-stake test-codapeers-sig test-codapeers-stake test-full-sig test-full-stake test-runtest test-transaction-snark-profiler-sig test-transaction-snark-profiler-stake update-deps render-circleci check-render-circleci docker-toolchain-rust toolchains doc_diagrams ml-docs macos-setup macos-setup-download macos-setup-compile libp2p_helper
4 changes: 2 additions & 2 deletions README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ of the repo.

* Pull down developer container image (~2GB download, go stretch your legs)

`docker pull codaprotocol/coda:toolchain-54430467ba429af285ea937d1c1da7d4b4cbde3e`
`docker pull codaprotocol/coda:toolchain-6728e849d78ccb9ca7c53d1b82609c8dd49b40f9`

* Create local builder image

Expand Down Expand Up @@ -128,12 +128,12 @@ You should probably use `USEDOCKER=TRUE` unless you've done the [building withou

These are the most important `make` targets:

* `libp2p_helper`: build the libp2p helper
* `build`: build everything
* `docker`: build the container
* `container`: restart the development container (or start it if it's not yet)
* `dev`: does `docker`, `container`, and `build`
* `test`: run the tests
* `libp2p_helper`: build the libp2p helper
* `web`: build the website, including the state explorer

We use the [dune](https://github.com/ocaml/dune/) buildsystem for our OCaml code.
Expand Down
Loading