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

[AVAX] Merge Cortina 19 (v1.10.19) #320

Merged
merged 32 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
eb18036
`vms/platformvm`: Change `AdvanceTimeTo` to modify passed-in `parentS…
dhrubabasu Jan 18, 2024
4d16cc3
`vms/platformvm`: Remove `MempoolTxVerifier` (#2362)
dhrubabasu Jan 18, 2024
1a99a1e
Verify `SignedIP.Timestamp` from `PeerList` messages (#2587)
Jan 18, 2024
18cdb09
Fix metrics namespace (#2632)
StephenButtolph Jan 19, 2024
9b302a5
Add bloom filter metrics to the p2p sdk (#2612)
ceyonur Jan 19, 2024
a054afd
Replace `shutdownEnvironment` with `t.Cleanup()` (#2491)
dhrubabasu Jan 19, 2024
3d4feed
P-chain - Memo field zeroed post Durango (#2607)
abi87 Jan 19, 2024
7cea467
Refactor feature extensions out of VMManager (#2578)
joshua-kim Jan 19, 2024
1d5026d
Remove getter for router on chain manager (#2641)
joshua-kim Jan 22, 2024
e65fac7
Fix `require.ErrorIs` argument order (#2645)
StephenButtolph Jan 22, 2024
1753393
`api/admin`: Cleanup `SuccessResponseTests` (#2644)
dhrubabasu Jan 22, 2024
bd4b381
Allow calls to `Options` before `Verify` (#2363)
StephenButtolph Jan 22, 2024
7a309bc
Improve logging of unexpected proposer errors (#2646)
StephenButtolph Jan 22, 2024
e121dc0
Disable non-security related dependabot PRs (#2647)
StephenButtolph Jan 23, 2024
1f29ab5
Add historical fork times (#2649)
StephenButtolph Jan 23, 2024
de0887b
Cleanup warp signer tests (#2651)
dhrubabasu Jan 23, 2024
9a0a5eb
Reintroduce the upgrade test against v1.10.18 (#2652)
StephenButtolph Jan 23, 2024
13bb7e4
Cleanup database benchmarks (#2653)
dhrubabasu Jan 23, 2024
0b344bd
Cleanup database tests (#2654)
dhrubabasu Jan 23, 2024
ad516fc
`ci`: Add shellcheck step to lint job (#2650)
marun Jan 23, 2024
bb2357e
Replace `closeFn` with `t.Cleanup` (#2638)
dhrubabasu Jan 23, 2024
c0bc9f5
Fix TestExpiredBuildBlock (#2655)
StephenButtolph Jan 23, 2024
e991d24
Add admin.dbGet API (#2667)
StephenButtolph Jan 25, 2024
1302ed8
`ci`: Update shellcheck.sh to pass all args to shellcheck (#2657)
marun Jan 25, 2024
b73635e
`vms/platformvm`: Remove `NewAdvanceTimeTx` from `Builder` (#2668)
dhrubabasu Jan 25, 2024
5c2def7
Log error if database returns unsorted heights (#2670)
StephenButtolph Jan 26, 2024
b81b936
`vms/platformvm`: Move `vm.Shutdown` call in tests to `t.Cleanup` (#2…
dhrubabasu Jan 26, 2024
39bb11f
`e2e`: Add test of `platform.getValidatorsAt` across nodes (#2664)
marun Jan 26, 2024
68980eb
Fix P-chain validator set lookup race condition (#2672)
StephenButtolph Jan 28, 2024
4b56873
Update versions for v1.10.19 (#2648)
StephenButtolph Jan 29, 2024
fffa996
[AVAX] Intermediate Merge Cortina 19 (v1.10.19)
evlekht Mar 29, 2024
e3d54c1
[AVAX] Post Merge fixes for Cortina 19 (v1.10.19)
evlekht Apr 3, 2024
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
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 0 # Disable non-security version updates
24 changes: 12 additions & 12 deletions .github/workflows/build-deb-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ set -euo pipefail

DEBIAN_BASE_DIR=$PKG_ROOT/debian
AVALANCHE_BUILD_BIN_DIR=$DEBIAN_BASE_DIR/usr/local/bin
TEMPLATE=.github/workflows/debian/template
TEMPLATE=.github/workflows/debian/template
DEBIAN_CONF=$DEBIAN_BASE_DIR/DEBIAN

mkdir -p $DEBIAN_BASE_DIR
mkdir -p $DEBIAN_CONF
mkdir -p $AVALANCHE_BUILD_BIN_DIR
mkdir -p "$DEBIAN_BASE_DIR"
mkdir -p "$DEBIAN_CONF"
mkdir -p "$AVALANCHE_BUILD_BIN_DIR"

# Assume binaries are at default locations
OK=`cp ./build/avalanchego $AVALANCHE_BUILD_BIN_DIR`
OK=$(cp ./build/avalanchego "$AVALANCHE_BUILD_BIN_DIR")
if [[ $OK -ne 0 ]]; then
exit $OK;
exit "$OK";
fi

OK=`cp $TEMPLATE/control $DEBIAN_CONF/control`
OK=$(cp $TEMPLATE/control "$DEBIAN_CONF"/control)
if [[ $OK -ne 0 ]]; then
exit $OK;
exit "$OK";
fi

echo "Build debian package..."
cd $PKG_ROOT
cd "$PKG_ROOT"
echo "Tag: $TAG"
VER=$TAG
if [[ $TAG =~ ^v ]]; then
VER=$(echo $TAG | tr -d 'v')
VER=$(echo "$TAG" | tr -d 'v')
fi
NEW_VERSION_STRING="Version: $VER"
NEW_ARCH_STRING="Architecture: $ARCH"
sed -i "s/Version.*/$NEW_VERSION_STRING/g" debian/DEBIAN/control
sed -i "s/Architecture.*/$NEW_ARCH_STRING/g" debian/DEBIAN/control
dpkg-deb --build debian avalanchego-$TAG-$ARCH.deb
aws s3 cp avalanchego-$TAG-$ARCH.deb s3://${BUCKET}/linux/debs/ubuntu/$RELEASE/$ARCH/
dpkg-deb --build debian "avalanchego-$TAG-$ARCH.deb"
aws s3 cp "avalanchego-$TAG-$ARCH.deb" "s3://${BUCKET}/linux/debs/ubuntu/$RELEASE/$ARCH/"
12 changes: 6 additions & 6 deletions .github/workflows/build-tgz-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ set -euo pipefail

AVALANCHE_ROOT=$PKG_ROOT/avalanchego-$TAG

mkdir -p $AVALANCHE_ROOT
mkdir -p "$AVALANCHE_ROOT"

OK=`cp ./build/avalanchego $AVALANCHE_ROOT`
OK=$(cp ./build/avalanchego "$AVALANCHE_ROOT")
if [[ $OK -ne 0 ]]; then
exit $OK;
exit "$OK";
fi


echo "Build tgz package..."
cd $PKG_ROOT
cd "$PKG_ROOT"
echo "Tag: $TAG"
tar -czvf "avalanchego-linux-$ARCH-$TAG.tar.gz" avalanchego-$TAG
aws s3 cp avalanchego-linux-$ARCH-$TAG.tar.gz s3://$BUCKET/linux/binaries/ubuntu/$RELEASE/$ARCH/
tar -czvf "avalanchego-linux-$ARCH-$TAG.tar.gz" "avalanchego-$TAG"
aws s3 cp "avalanchego-linux-$ARCH-$TAG.tar.gz" "s3://$BUCKET/linux/binaries/ubuntu/$RELEASE/$ARCH/"
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
# with:
# go-version: ${{ env.go_version }}
# check-latest: true
# - name: Build caminogo Binary
# - name: Build caminogo binaries
# shell: bash
# run: ./scripts/build.sh
# - name: Run e2e tests
Expand All @@ -135,6 +135,9 @@ jobs:
- name: Run static analysis tests
shell: bash
run: scripts/lint.sh
- name: Run shellcheck
shell: bash
run: scripts/shellcheck.sh
buf-lint:
name: Protobuf Lint
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ source "$AVALANCHE_PATH"/scripts/build_image.sh -r

if [[ $current_branch == "master" ]]; then
echo "Tagging current avalanchego image as $avalanchego_dockerhub_repo:latest"
docker tag $avalanchego_dockerhub_repo:$current_branch $avalanchego_dockerhub_repo:latest
docker tag "$avalanchego_dockerhub_repo:$current_branch" "$avalanchego_dockerhub_repo:latest"
fi

echo "Pushing: $avalanchego_dockerhub_repo:$current_branch"

echo "$DOCKER_PASS" | docker login --username "$DOCKER_USERNAME" --password-stdin

## pushing image with tags
docker image push -a $avalanchego_dockerhub_repo
docker image push -a "$avalanchego_dockerhub_repo"
7 changes: 4 additions & 3 deletions .github/workflows/scripts/cleanup-net-outage-sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ set -euo pipefail
###
# cleanup removes the docker instance and the network
echo "Cleaning up..."
# shellcheck disable=SC2046
docker rm $(sudo docker stop $(sudo docker ps -a -q --filter ancestor=c4tplatform/camino-node:latest --format="{{.ID}}")) #if the filter returns nothing the command fails, so ignore errors
docker network rm controlled-net
rm /opt/mainnet-db-daily* 2>/dev/null
rm -rf /var/lib/caminogo 2>/dev/null
docker network rm controlled-net
rm /opt/mainnet-db-daily* 2>/dev/null
rm -rf /var/lib/caminogo 2>/dev/null
echo "Done cleaning up"
32 changes: 16 additions & 16 deletions .github/workflows/scripts/run-net-outage-sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ wait_until_healthy () {
# store the response code here
response=0
# while the endpoint doesn't return 200
while [ $response -ne 200 ]
while [ "$response" -ne 200 ]
do
echo "Checking if local node is healthy..."
# Ignore error in case of ephemeral failure to hit node's API
response=$(curl --write-out '%{http_code}' --silent --output /dev/null localhost:9650/ext/health)
echo "got status code $response from health endpoint"
# check that 3 hours haven't passed
now=$(date +%s)
if [ $now -ge $stop ];
then
if [ "$now" -ge "$stop" ];
then
# timeout: exit
SUCCESS=1
return
fi
fi
# no timeout yet, wait 30s until retry
sleep 30
done
Expand All @@ -44,20 +44,20 @@ echo "done existing database files"

#download latest mainnet DB backup
FILENAME="mainnet-db-daily-"
DATE=`date +'%m-%d-%Y'`
DATE=$(date +'%m-%d-%Y')
DB_FILE="$FILENAME$DATE"
echo "Copying database file $DB_FILE from S3 to local..."
aws s3 cp s3://camino-db-daily/ /opt/ --no-progress --recursive --exclude "*" --include "$DB_FILE*"
aws s3 cp s3://camino-db-daily/ /opt/ --no-progress --recursive --exclude "*" --include "$DB_FILE*"
echo "Done downloading database"

# extract DB
echo "Extracting database..."
mkdir -p /var/lib/caminogo/db
tar -zxf /opt/$DB_FILE*-tar.gz -C /var/lib/caminogo/db
mkdir -p /var/lib/caminogo/db
tar -zxf /opt/"$DB_FILE"*-tar.gz -C /var/lib/caminogo/db
echo "Done extracting database"

echo "Creating Docker network..."
docker network create controlled-net
docker network create controlled-net

echo "Starting Docker container..."
containerID=$(docker run --name="net_outage_simulation" --memory="12g" --memory-reservation="11g" --cpus="6.0" --net=controlled-net -p 9650:9650 -p 9651:9651 -v /var/lib/caminogo/db:/db -d c4tplatform/camino-node:latest /caminogo/build/caminogo --db-dir /db --http-host=0.0.0.0)
Expand All @@ -69,16 +69,16 @@ wait_until_healthy
if [ $SUCCESS -eq 1 ];
then
echo "Timed out waiting for node to become healthy; exiting."
exit 1
exit 1
fi

# To simulate internet outage, we will disable the docker network connection
# To simulate internet outage, we will disable the docker network connection
echo "Disconnecting node from internet..."
docker network disconnect controlled-net $containerID
docker network disconnect controlled-net "$containerID"
echo "Sleeping 60 minutes..."
sleep 3600
sleep 3600
echo "Reconnecting node to internet..."
docker network connect controlled-net $containerID
docker network connect controlled-net "$containerID"
echo "Reconnected to internet. Waiting until healthy..."

# now repeatedly check the node's health until it returns healthy
Expand All @@ -88,12 +88,12 @@ wait_until_healthy
if [ $SUCCESS -eq 1 ];
then
echo "Timed out waiting for node to become healthy after outage; exiting."
exit 1
exit 1
fi

# The node returned healthy, print how long it took
end=$(date +%s)

DELAY=$(($end - $start))
DELAY=$((end - start))
echo "Node became healthy again after complete outage after $DELAY seconds."
echo "Test completed"
Loading
Loading