-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rampup' into fix/wrap-circuit-features
- Loading branch information
Showing
165 changed files
with
2,789 additions
and
1,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
if [[ $# -ne 3 ]]; then | ||
echo "Usage: $0 '<testnet-name>' '<wait-between-polling-graphql>''<wait-after-final-check>'" | ||
exit 1 | ||
fi | ||
|
||
TESTNET_VERSION_NAME="berkeley" | ||
TESTNET_NAME=$1 | ||
WAIT_BETWEEN_POLLING_GRAPHQL=$2 | ||
WAIT_AFTER_FINAL_CHECK=$3 | ||
|
||
case "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" in | ||
rampup|berkeley|release/2.0.0|develop) | ||
;; | ||
*) | ||
echo "Not pulling against rampup, not running the connect test" | ||
exit 0 ;; | ||
esac | ||
|
||
# Don't prompt for answers during apt-get install | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
apt-get update | ||
apt-get install -y git apt-transport-https ca-certificates tzdata curl | ||
|
||
git config --global --add safe.directory /workdir | ||
|
||
source buildkite/scripts/export-git-env-vars.sh | ||
|
||
echo "Installing mina daemon package: mina-${TESTNET_VERSION_NAME}=${MINA_DEB_VERSION}" | ||
echo "deb [trusted=yes] http://packages.o1test.net $MINA_DEB_CODENAME $MINA_DEB_RELEASE" | tee /etc/apt/sources.list.d/mina.list | ||
apt-get update | ||
apt-get install --allow-downgrades -y "mina-${TESTNET_VERSION_NAME}=${MINA_DEB_VERSION}" | ||
|
||
# Remove lockfile if present | ||
rm ~/.mina-config/.mina-lock ||: | ||
|
||
mkdir -p /root/libp2p-keys/ | ||
# Pre-generated random password for this quick test | ||
export MINA_LIBP2P_PASS=eithohShieshichoh8uaJ5iefo1reiRudaekohG7AeCeib4XuneDet2uGhu7lahf | ||
mina libp2p generate-keypair --privkey-path /root/libp2p-keys/key | ||
# Set permissions on the keypair so the daemon doesn't complain | ||
chmod -R 0700 /root/libp2p-keys/ | ||
|
||
# Restart in the background | ||
mina daemon \ | ||
--peer-list-url "https://storage.googleapis.com/seed-lists/${TESTNET_NAME}_seeds.txt" \ | ||
--libp2p-keypair "/root/libp2p-keys/key" \ | ||
& # -background | ||
|
||
# Attempt to connect to the GraphQL client every 10s for up to 8 minutes | ||
num_status_retries=24 | ||
for ((i=1;i<=$num_status_retries;i++)); do | ||
sleep $WAIT_BETWEEN_POLLING_GRAPHQL | ||
set +e | ||
mina client status | ||
status_exit_code=$? | ||
set -e | ||
if [ $status_exit_code -eq 0 ]; then | ||
break | ||
elif [ $i -eq $num_status_retries ]; then | ||
exit $status_exit_code | ||
fi | ||
done | ||
|
||
# Check that the daemon has connected to peers and is still up after 2 mins | ||
sleep $WAIT_AFTER_FINAL_CHECK | ||
mina client status | ||
if [ $(mina advanced get-peers | wc -l) -gt 0 ]; then | ||
echo "Found some peers" | ||
else | ||
echo "No peers found" | ||
exit 1 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
export MINA_REPO="https://github.com/MinaProtocol/mina.git" | ||
|
||
if [ "${BUILDKITE_REPO}" == ${MINA_REPO} ]; then | ||
echo "This is not a Forked repo, skipping..." | ||
export REMOTE="origin" | ||
export FORK=0 | ||
else | ||
git remote add mina ${MINA_REPO} || true | ||
git fetch mina | ||
export REMOTE="mina" | ||
export FORK=1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,21 +4,23 @@ BRANCH=$1 | |
CURRENT=$(git branch --show-current) | ||
echo 'Testing for conflicts between the current branch `'"${CURRENT}"'` and `'"${BRANCH}"'`...' | ||
|
||
|
||
# Adapted from this stackoverflow answer: https://stackoverflow.com/a/10856937 | ||
# The git merge-tree command shows the content of a 3-way merge without | ||
# touching the index, which we can then search for conflict markers. | ||
|
||
# Tell git where to find ssl certs | ||
git config --global http.sslCAInfo /etc/ssl/certs/ca-bundle.crt | ||
# Fetch a fresh copy of the repo | ||
git fetch origin | ||
|
||
source buildkite/scripts/handle-fork.sh | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "It's me, CI" | ||
# Check mergeability. We use flags so that | ||
# * `--no-commit` stops us from updating the index with a merge commit, | ||
# * `--no-ff` stops us from updating the index to the HEAD, if the merge is a | ||
# straightforward fast-forward | ||
git merge --no-commit --no-ff origin/$BRANCH | ||
git merge --no-commit --no-ff ${REMOTE}/$BRANCH | ||
|
||
RET=$? | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
source ./buildkite/scripts/handle-fork.sh | ||
git fetch ${REMOTE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.