Skip to content

Commit

Permalink
Merge branch 'main' into akaladarshi/add-delegated-address
Browse files Browse the repository at this point in the history
  • Loading branch information
akaladarshi authored Feb 5, 2025
2 parents eec7c20 + b0295e4 commit c8a12e4
Show file tree
Hide file tree
Showing 26 changed files with 53 additions and 1,008 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
checkpoint_issue:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: JasonEtco/create-an-issue@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-latest-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
tag-docker-image:
name: Retag image and push to GHCR
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- name: Login to Github Packages
uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerfile-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
docker-check:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
update-docs:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Run update script
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
jobs:
docs-check:
name: Check
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
defaults:
run:
working-directory: ./docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ permissions:
jobs:
docs-deploy:
name: Deploy to Cloudflare Pages
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
defaults:
run:
working-directory: ./docs
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/docs-required-override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# We need this because merge groups dont support path filters
# https://github.com/community/community/discussions/45899
changes-docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
outputs:
changesFound: ${{ steps.filter.outputs.changesFound }}
steps:
Expand All @@ -42,7 +42,7 @@ jobs:
- '**.md'
- '.github/workflows/docs-*.yml'
changes-not-docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
outputs:
otherChangesFound: ${{ steps.filter.outputs.otherChangesFound }}
steps:
Expand All @@ -60,7 +60,7 @@ jobs:
override_integration_tests:
name: Integration tests status
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
needs:
- changes-docs
- changes-not-docs
Expand All @@ -70,7 +70,7 @@ jobs:

override_unit_tests:
name: tests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
needs:
- changes-docs
- changes-not-docs
Expand All @@ -80,7 +80,7 @@ jobs:

override_unit_tests_release:
name: tests-release
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
needs:
- changes-docs
- changes-not-docs
Expand All @@ -90,7 +90,7 @@ jobs:

override_docker_build:
name: Build images and push to GHCR
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
needs:
- changes-docs
- changes-not-docs
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/forest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,26 +344,6 @@ jobs:
- name: Database migration checks
run: ./scripts/tests/calibnet_db_migration.sh
timeout-minutes: '${{ fromJSON(env.SCRIPT_TIMEOUT_MINUTES) }}'
db-migration-checks-car-db:
needs:
- build-ubuntu
runs-on: ubuntu-24.04
steps:
- uses: actions/cache@v4
with:
path: '${{ env.FIL_PROOFS_PARAMETER_CACHE }}'
key: proof-params-keys
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: 'forest-${{ runner.os }}'
path: ~/.cargo/bin
- name: Set permissions
run: |
chmod +x ~/.cargo/bin/forest*
- name: Database migration checks with car_db folder
run: ./scripts/tests/calibnet_db_migration_car_db.sh
timeout-minutes: '${{ fromJSON(env.SCRIPT_TIMEOUT_MINUTES) }}'
local-devnet-check:
name: Devnet checks
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -585,7 +565,6 @@ jobs:
- calibnet-kademlia-checks
- calibnet-eth-mapping-check
- db-migration-checks
- db-migration-checks-car-db
- local-devnet-check
# - local-devnet-curio-check
- calibnet-rpc-checks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
jobs:
link-check:
name: Link Check
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
permissions:
contents: read
issues: write
Expand All @@ -48,4 +48,4 @@ jobs:

- name: Fail job on error
if: env.lychee_exit_code != 0 && github.event_name != 'schedule'
run: exit 1
run: exit 1
2 changes: 1 addition & 1 deletion .github/workflows/lotus-api-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
update-lotus:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Update dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rpc_test_repeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
x: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
y: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
name: Calibnet RPC checks
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Run api compare tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

dependencies-check:
name: Check cargo files
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scripts-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
env:
SHELLCHECK_OPTS: --external-sources --source-path=SCRIPTDIR
rubocop:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
Expand All @@ -37,7 +37,7 @@ jobs:
rubocop scripts/
python-lint:
if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') }}
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -50,7 +50,7 @@ jobs:
black: true
flake8: true
docker-lint:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: validate compose file
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ env:

jobs:
tests:
runs-on: buildjet-8vcpu-ubuntu-2204
runs-on: ubuntu-24.04-arm
# Run the job only if the PR is not a draft.
# This is done to limit the runner cost.
if: github.event.pull_request.draft == false
timeout-minutes: 30
timeout-minutes: 45
steps:
- name: Checkout Sources
uses: actions/checkout@v4
Expand All @@ -55,11 +55,9 @@ jobs:
uses: taiki-e/install-action@nextest
- run: make test
tests-release:
runs-on: buildjet-8vcpu-ubuntu-2204
# Run the job only if the PR is not a draft.
# This is done to limit the runner cost.
if: github.event.pull_request.draft == false
timeout-minutes: 30
runs-on: ubuntu-24.04-arm
# Run the job only on `main` to reduce the runner cost.
if: github.ref == 'refs/heads/main'
steps:
# find the nearest S3 space for storing cache files
- name: Show IP
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

### Breaking

- [#5236](https://github.com/ChainSafe/forest/pull/5236) Dropped support for migrating from ancient versions of Forest. The latest supported version for migration is [v0.19.2](https://github.com/ChainSafe/forest/releases/tag/v0.19.2).

### Added

- [#4708](https://github.com/ChainSafe/forest/issues/4708) Add support for the
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ install-lint-tools-ci:

cargo binstall --no-confirm taplo-cli cargo-spellcheck cargo-deny

install-lint-tools-ci-arm:
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-aarch64-unknown-linux-musl.tgz
tar xzf cargo-binstall-aarch64-unknown-linux-musl.tgz
cp cargo-binstall ~/.cargo/bin/cargo-binstall

cargo binstall --no-confirm taplo-cli cargo-spellcheck cargo-deny

clean:
cargo clean

Expand Down
3 changes: 3 additions & 0 deletions build/bootstrap/mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
/dns/bootstrap-mainnet-0.chainsafe-fil.io/tcp/34000/p2p/12D3KooWKKkCZbcigsWTEu1cgNetNbZJqeNtysRtFpq7DTqw3eqH
/dns/bootstrap-mainnet-1.chainsafe-fil.io/tcp/34000/p2p/12D3KooWGnkd9GQKo3apkShQDaq1d6cKJJmsVe6KiQkacUk1T8oZ
/dns/bootstrap-mainnet-2.chainsafe-fil.io/tcp/34000/p2p/12D3KooWHQRSDFv4FvAjtU32shQ7znz7oRbLBryXzZ9NMK2feyyH
/dns/n1.mainnet.fil.devtty.eu/udp/443/quic-v1/p2p/12D3KooWAke3M2ji7tGNKx3BQkTHCyxVhtV1CN68z6Fkrpmfr37F
/dns/n1.mainnet.fil.devtty.eu/tcp/443/p2p/12D3KooWAke3M2ji7tGNKx3BQkTHCyxVhtV1CN68z6Fkrpmfr37F
/dns/n1.mainnet.fil.devtty.eu/udp/443/quic-v1/webtransport/certhash/uEiAWlgd8EqbNhYLv86OdRvXHMosaUWFFDbhgGZgCkcmKnQ/certhash/uEiAvtq6tvZOZf_sIuityDDTyAXDJPfXSRRDK2xy9UVPsqA/p2p/12D3KooWAke3M2ji7tGNKx3BQkTHCyxVhtV1CN68z6Fkrpmfr37F
26 changes: 11 additions & 15 deletions scripts/tests/calibnet_db_migration.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -euxo pipefail

# This script tests the migration(s) from Forest 0.12.0 to the current version.
# This script tests the migration(s) from Forest 0.19.2 to the current version.
# As simple as it is, it will detect regressions in the migration process and breaking changes.

source "$(dirname "$0")/harness.sh"
Expand All @@ -11,33 +11,29 @@ mkdir -p "${DATA_DIR}"

chmod -R 777 "${DATA_DIR}"

# Run Forest 0.12.0 with mounted db so that we can re-use it later.
# NOTE: We aren't using '--auto-download-snapshot', because of a bug in
# forest-0.12.0 that's related to `Content-Disposition` parsing.
docker run --init --rm --name forest-0.12.0 \
FOREST_INIT_VERSION="0.19.2"

# Run Forest 0.19.2 with mounted db so that we can re-use it later.
docker run --init --rm --name forest-${FOREST_INIT_VERSION} \
--volume "${DATA_DIR}":/home/forest/.local/share/forest \
ghcr.io/chainsafe/forest:v0.12.0 \
ghcr.io/chainsafe/forest:v${FOREST_INIT_VERSION} \
--chain calibnet \
--encrypt-keystore false \
--import-snapshot=https://forest-archive.chainsafe.dev/latest/calibnet/ \
--auto-download-snapshot \
--halt-after-import

# Assert the database is looking as expected.
if [ ! -d "${DATA_DIR}/calibnet/paritydb" ]; then
if [ ! -d "${DATA_DIR}/calibnet/${FOREST_INIT_VERSION}" ]; then
echo "Database directory not found"
exit 1
fi

# If can't access due to permissions, try changing ownership to the current user.
# This is needed for GHA which runs under a particular user.
if [ ! -w "${DATA_DIR}/calibnet/paritydb" ]; then
if [ ! -w "${DATA_DIR}/calibnet/${FOREST_INIT_VERSION}" ]; then
sudo chown -R "$(id -u):$(id -g)" "${DATA_DIR}/"
fi

# Note that for Forest 0.12.0, a seamless migration is not really possible given that there is no notion of versioning.
# We **know** here that Forest was at 0.12.0 so we manually change the directory name to reflect that. This should not be required in the future.
mv "${DATA_DIR}/calibnet/paritydb" "${DATA_DIR}/calibnet/0.12.0"

CONFIG_FILE="${TMP_DIR}/config.toml"

# Create config file to point to the old database
Expand All @@ -60,8 +56,8 @@ export FULLNODE_API_INFO
forest_wait_for_sync
forest_check_db_stats

# Assert there is no "0.12.0" directory in the database directory. This and a successful sync indicate that the database was successfully migrated.
if [ -d "${DATA_DIR}/calibnet/0.12.0" ]; then
# Assert there is no "0.19.2" directory in the database directory. This and a successful sync indicate that the database was successfully migrated.
if [ -d "${DATA_DIR}/calibnet/${FOREST_INIT_VERSION}" ]; then
echo "Database directory not migrated"
exit 1
fi
Expand Down
Loading

0 comments on commit c8a12e4

Please sign in to comment.