diff --git a/.github/generate_change_log.sh b/.github/generate_change_log.sh new file mode 100755 index 000000000..f8e4077d3 --- /dev/null +++ b/.github/generate_change_log.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +change_log_file="./CHANGELOG.md" +version="## $@" +version_prefix="## v" +start=0 +CHANGE_LOG="" +while read line; do + if [[ $line == *"$version"* ]]; then + start=1 + continue + fi + if [[ $line == *"$version_prefix"* ]] && [ $start == 1 ]; then + break; + fi + if [ $start == 1 ]; then + CHANGE_LOG+="$line\n" + fi +done < ${change_log_file} + +OUTPUT=$(cat <<-END +${CHANGE_LOG} +END +) + +echo -e "${OUTPUT}" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b54c182e5..e71c66ded 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ on: env: REPO_NAME: ${{ github.repository_owner }}/reth OP_IMAGE_NAME: ${{ github.repository_owner }}/op-reth - IMAGE_NAME: ${{ github.repository_owner }}/reth + IMAGE_NAME: ${{ github.repository_owner }}/bsc-reth CARGO_TERM_COLOR: always TOOL_CHAIN: "1.79" @@ -49,8 +49,6 @@ jobs: os: ubuntu-20.04 profile: maxperf build: - - command: build - binary: reth - command: op-build binary: op-reth - command: bsc-build @@ -122,11 +120,13 @@ jobs: fetch-depth: 0 - name: Download artifacts uses: actions/download-artifact@v4 - - name: Generate full changelog - id: changelog + - name: Generate Summary + id: summary run: | - echo "CHANGELOG<> $GITHUB_OUTPUT - echo "$(git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 ${{ env.VERSION }}^)..${{ env.VERSION }})" >> $GITHUB_OUTPUT + chmod 755 ./.github/generate_change_log.sh + SUMMARY=$(./.github/generate_change_log.sh ${{ env.VERSION }}) + echo "SUMMARY<> $GITHUB_OUTPUT + echo "$SUMMARY" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - name: Create release draft env: @@ -138,42 +138,8 @@ jobs: body=$(cat <<- "ENDBODY" ![image](https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-prod.png) - ## Testing Checklist (DELETE ME) - - - [ ] Run on testnet for 1-3 days. - - [ ] Resync a mainnet node. - - [ ] Ensure all CI checks pass. - - ## Release Checklist (DELETE ME) - - - [ ] Ensure all crates have had their versions bumped. - - [ ] Write the summary. - - [ ] Fill out the update priority. - - [ ] Ensure all binaries have been added. - - [ ] Prepare release posts (Twitter, ...). - ## Summary - - Add a summary, including: - - - Critical bug fixes - - New features - - Any breaking changes (and what to expect) - - ## Update Priority - - This table provides priorities for which classes of users should update particular components. - - | User Class | Priority | - |----------------------|-----------------| - | Payload Builders | | - | Non-Payload Builders | | - - *See [Update Priorities](https://paradigmxyz.github.io/reth/installation/priorities.html) for more information about this table.* - - ## All Changes - - ${{ steps.changelog.outputs.CHANGELOG }} + ${{ steps.summary.outputs.SUMMARY }} ## Binaries @@ -183,14 +149,20 @@ jobs: | System | Architecture | Binary | PGP Signature | |:---:|:---:|:---:|:---| - | | x86_64 | [reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) | - | | aarch64 | [reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) | - | | x86_64 | [reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz.asc) | - | | x86_64 | [reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) | - | | aarch64 | [reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) | + | | x86_64 | [bsc-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) | + | | aarch64 | [bsc-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) | + | | x86_64 | [bsc-reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz.asc) | + | | x86_64 | [bsc-reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) | + | | aarch64 | [bsc-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/bsc-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) | + | | x86_64 | [op-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) | + | | aarch64 | [op-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) | + | | x86_64 | [op-reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-x86_64-pc-windows-gnu.tar.gz.asc) | + | | x86_64 | [op-reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) | + | | aarch64 | [op-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/op-reth-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz.asc) | | | | | | | **System** | **Option** | - | **Resource** | - | | Docker | | [${{ env.IMAGE_NAME }}](https://github.com/bnb-chain/reth/pkgs/container/reth) | + | | Docker | | [${{ env.IMAGE_NAME }}](https://github.com/bnb-chain/reth/pkgs/container/bsc-reth) | + | | Docker | | [${{ env.OP_IMAGE_NAME }}](https://github.com/bnb-chain/reth/pkgs/container/op-reth) | ENDBODY ) assets=() diff --git a/CHANGELOG.md b/CHANGELOG.md index ce92f8eff..f8977085a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## v1.0.0-rc.2 +This release is a release candidate for the v1.0.0 release. It includes a number of new features and bug fixes. + ### FEATURES * [\#49](https://github.com/bnb-chain/reth/pull/49) ci: specify rust toolchain version * [\#50](https://github.com/bnb-chain/reth/pull/50) chore: add bsc and docker commands to readme @@ -42,6 +44,7 @@ * [\#46](https://github.com/bnb-chain/reth/pull/46) fix: check header timestamp in parlia task ## v0.1.0-beta.3 + ### FEATURE * [\#33](https://github.com/bnb-chain/reth/pull/33) feat: enable Shanghai, Canyon, Cancun, Ecotone, Haber on opBNB mainnet @@ -55,5 +58,6 @@ * [\#17](https://github.com/bnb-chain/reth/pull/17) fix p2p incompatible forks for opbnb testnet and mainnet ## v0.1.0-beta.1 + ### FEATURE * [\#10](https://github.com/bnb-chain/reth/pull/10) feat: support opbnb network diff --git a/crates/storage/db/src/implementation/mdbx/mod.rs b/crates/storage/db/src/implementation/mdbx/mod.rs index cc9f055e9..b9dbb65da 100644 --- a/crates/storage/db/src/implementation/mdbx/mod.rs +++ b/crates/storage/db/src/implementation/mdbx/mod.rs @@ -280,8 +280,8 @@ impl DatabaseEnv { debug_assert!(Tables::ALL.len() <= 256, "number of tables exceed max dbs"); inner_env.set_max_dbs(256); inner_env.set_geometry(Geometry { - // Maximum database size of 4 terabytes - size: Some(0..(4 * TERABYTE)), + // Maximum database size of 8 terabytes + size: Some(0..(8 * TERABYTE)), // We grow the database in increments of 4 gigabytes growth_step: Some(4 * GIGABYTE as isize), // The database never shrinks diff --git a/crates/storage/provider/src/providers/database/metrics.rs b/crates/storage/provider/src/providers/database/metrics.rs index ba43298c3..559e2ae90 100644 --- a/crates/storage/provider/src/providers/database/metrics.rs +++ b/crates/storage/provider/src/providers/database/metrics.rs @@ -61,6 +61,7 @@ pub(crate) enum Action { InsertTransactions, InsertTransactionHashNumbers, InsertBlockWithdrawals, + InsertBlockSidecars, InsertBlockRequests, InsertBlockBodyIndices, InsertTransactionBlocks, @@ -106,6 +107,8 @@ struct DatabaseProviderMetrics { insert_tx_hash_numbers: Histogram, /// Duration of insert block withdrawals insert_block_withdrawals: Histogram, + /// Duration of insert block sidecars + insert_block_sidecars: Histogram, /// Duration of insert block requests insert_block_requests: Histogram, /// Duration of insert block body indices @@ -139,6 +142,7 @@ impl DatabaseProviderMetrics { Action::InsertTransactions => self.insert_transactions.record(duration), Action::InsertTransactionHashNumbers => self.insert_tx_hash_numbers.record(duration), Action::InsertBlockWithdrawals => self.insert_block_withdrawals.record(duration), + Action::InsertBlockSidecars => self.insert_block_sidecars.record(duration), Action::InsertBlockRequests => self.insert_block_requests.record(duration), Action::InsertBlockBodyIndices => self.insert_block_body_indices.record(duration), Action::InsertTransactionBlocks => self.insert_tx_blocks.record(duration), diff --git a/crates/storage/provider/src/providers/database/provider.rs b/crates/storage/provider/src/providers/database/provider.rs index b132d6416..1f6c757c4 100644 --- a/crates/storage/provider/src/providers/database/provider.rs +++ b/crates/storage/provider/src/providers/database/provider.rs @@ -2796,6 +2796,10 @@ impl BlockWriter for DatabaseProvider { } } + let sidecars = block.block.sidecars.unwrap_or_default(); + self.tx.put::(block_number, sidecars)?; + durations_recorder.record_relative(metrics::Action::InsertBlockSidecars); + let block_indices = StoredBlockBodyIndices { first_tx_num, tx_count }; self.tx.put::(block_number, block_indices.clone())?; durations_recorder.record_relative(metrics::Action::InsertBlockBodyIndices);