diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ffcb861ded9..4326c228a7b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -39,3 +39,14 @@ updates: open-pull-requests-limit: 1 schedule: interval: "weekly" + + - package-ecosystem: "npm" + directory: "/docs" # Location of package manifests + open-pull-requests-limit: 1 + schedule: + interval: "weekly" + # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups + groups: + patch-versions: + update-types: + - "patch" \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d385e863a33..c0358962f2e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -54,7 +54,7 @@ jobs: - name: Checkout Sources uses: actions/checkout@v4 - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.7 timeout-minutes: '${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}' continue-on-error: true - uses: actions/setup-go@v5 @@ -98,7 +98,7 @@ jobs: uses: actions/checkout@v4 if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.7 if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') timeout-minutes: '${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}' continue-on-error: true diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml new file mode 100644 index 00000000000..25978487d6b --- /dev/null +++ b/.github/workflows/docs-deploy.yml @@ -0,0 +1,47 @@ +name: Docs Deploy + +on: + push: + branches: + - main + paths: + - '/docs' + - '.github/workflows/docs-deploy.yml' + merge_group: + pull_request: + branches: + - main + paths: + - '/docs' + - '.github/workflows/docs-deploy.yml' + +permissions: + contents: read + deployments: write + pull-requests: write + +jobs: + docs-deploy: + name: Deploy to Cloudflare Pages + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./docs + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "18" + # See https://github.com/actions/setup-node/issues/1027 + # cache: yarn + - run: corepack enable + - run: yarn install --frozen-lockfile + - run: yarn run build + + - name: Deploy + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT_ID }} + command: pages deploy ./docs/build --project-name=forest-docs + gitHubToken: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/forest.yml b/.github/workflows/forest.yml index d40ba94967a..11057c7f9f8 100644 --- a/.github/workflows/forest.yml +++ b/.github/workflows/forest.yml @@ -46,7 +46,7 @@ jobs: - name: Checkout Sources uses: actions/checkout@v4 - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.7 timeout-minutes: '${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}' continue-on-error: true - uses: actions/setup-go@v5 @@ -73,7 +73,7 @@ jobs: - name: Checkout Sources uses: actions/checkout@v4 - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.7 timeout-minutes: '${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}' continue-on-error: true - uses: actions/setup-go@v5 @@ -96,7 +96,7 @@ jobs: - name: Checkout Sources uses: actions/checkout@v4 - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.7 timeout-minutes: '${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}' continue-on-error: true - name: Install Apt Dependencies diff --git a/.github/workflows/rust-lint.yml b/.github/workflows/rust-lint.yml index e0407a29014..fc6b3e74e5a 100644 --- a/.github/workflows/rust-lint.yml +++ b/.github/workflows/rust-lint.yml @@ -49,7 +49,7 @@ jobs: - name: Checkout Sources uses: actions/checkout@v4 - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.7 timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} continue-on-error: true - name: Apt Dependencies diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 6c2b735799d..b5297a1307d 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -45,7 +45,7 @@ jobs: - name: Checkout Sources uses: actions/checkout@v4 - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.7 timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} continue-on-error: true - uses: actions/setup-go@v5 @@ -70,7 +70,7 @@ jobs: - name: Checkout Sources uses: actions/checkout@v4 - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.6 + uses: mozilla-actions/sccache-action@v0.0.7 timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} continue-on-error: true - uses: actions/setup-go@v5 diff --git a/scripts/tests/api_compare/filter-list b/scripts/tests/api_compare/filter-list index 81ae2ea45ec..231e30d975e 100644 --- a/scripts/tests/api_compare/filter-list +++ b/scripts/tests/api_compare/filter-list @@ -6,8 +6,6 @@ !Filecoin.StateReplay # TODO(elmattic): https://github.com/ChainSafe/forest/issues/4851 !Filecoin.EthGetLogs -# TODO: https://github.com/ChainSafe/forest/issues/4968 -!Filecoin.StateCirculatingSupply # TODO: https://github.com/ChainSafe/forest/issues/4996 !Filecoin.EthGetTransactionReceipt !Filecoin.EthGetTransactionReceiptLimited diff --git a/scripts/tests/api_compare/filter-list-offline b/scripts/tests/api_compare/filter-list-offline index d1ddba7338d..ce5125318fd 100644 --- a/scripts/tests/api_compare/filter-list-offline +++ b/scripts/tests/api_compare/filter-list-offline @@ -36,8 +36,6 @@ !Filecoin.ChainSetHead # TODO(elmattic): https://github.com/ChainSafe/forest/issues/4759 !Filecoin.EthGetLogs -# TODO: https://github.com/ChainSafe/forest/issues/4968 -!Filecoin.StateCirculatingSupply # TODO: https://github.com/ChainSafe/forest/issues/4996 !Filecoin.EthGetTransactionReceipt !Filecoin.EthGetTransactionReceiptLimited diff --git a/src/rpc/methods/state.rs b/src/rpc/methods/state.rs index 6d054360702..9c8da95cd5c 100644 --- a/src/rpc/methods/state.rs +++ b/src/rpc/methods/state.rs @@ -1542,7 +1542,8 @@ impl RpcMethod<1> for StateCirculatingSupply { let height = ts.epoch(); let root = ts.parent_state(); let genesis_info = GenesisInfo::from_chain_config(ctx.chain_config().clone()); - let supply = genesis_info.get_state_circulating_supply(height, &ctx.store_owned(), root)?; + let supply = + genesis_info.get_state_circulating_supply(height - 1, &ctx.store_owned(), root)?; Ok(supply) } }