Skip to content

Commit

Permalink
Merge branch 'master' into remove_derivative
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienFT committed Feb 12, 2025
2 parents 38f45b7 + c206507 commit c6fa390
Show file tree
Hide file tree
Showing 71 changed files with 2,353 additions and 1,995 deletions.
120 changes: 120 additions & 0 deletions .github/workflows/update_readme_versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Update README Network Versions
on:
schedule:
- cron: '0 * * * *' # Runs every hour at the 0th minute
workflow_dispatch: # Allows manual triggering

jobs:
check-and-update:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Fetch current versions
id: get-versions
run: |
# Fetch versions from all networks
ignition_version=$(curl -s -X POST -H "Content-Type: application/json" --data '{"query":"query { nodeInfo { nodeVersion }}"}' https://mainnet.fuel.network/v1/graphql | jq -r '.data.nodeInfo.nodeVersion')
testnet_version=$(curl -s -X POST -H "Content-Type: application/json" --data '{"query":"query { nodeInfo { nodeVersion }}"}' https://testnet.fuel.network/v1/graphql | jq -r '.data.nodeInfo.nodeVersion')
devnet_version=$(curl -s -X POST -H "Content-Type: application/json" --data '{"query":"query { nodeInfo { nodeVersion }}"}' https://devnet.fuel.network/v1/graphql | jq -r '.data.nodeInfo.nodeVersion')
echo "ignition_version=$ignition_version" >> $GITHUB_OUTPUT
echo "testnet_version=$testnet_version" >> $GITHUB_OUTPUT
echo "devnet_version=$devnet_version" >> $GITHUB_OUTPUT
- name: Extract current README versions
id: readme-versions
run: |
# Extract versions from README.md
ignition_readme=$(grep -E '^\| Fuel Ignition' README.md | awk -F '|' '{gsub(/ /, "", $3); print $3}')
testnet_readme=$(grep -E '^\| Testnet' README.md | awk -F '|' '{gsub(/ /, "", $3); print $3}')
devnet_readme=$(grep -E '^\| Devnet' README.md | awk -F '|' '{gsub(/ /, "", $3); print $3}')
echo "ignition_readme=$ignition_readme" >> $GITHUB_OUTPUT
echo "testnet_readme=$testnet_readme" >> $GITHUB_OUTPUT
echo "devnet_readme=$devnet_readme" >> $GITHUB_OUTPUT
- name: Update README if needed
id: update-readme
run: |
echo "Comparing versions..."
needs_update=false
tmp_file=$(mktemp)
# Create sed command file
{
if [ "${{ steps.get-versions.outputs.ignition_version }}" != "${{ steps.readme-versions.outputs.ignition_readme }}" ]; then
echo "s/^\| *Fuel Ignition *\|.*\|/| Fuel Ignition | ${{ steps.get-versions.outputs.ignition_version }} |/"
needs_update=true
fi
if [ "${{ steps.get-versions.outputs.testnet_version }}" != "${{ steps.readme-versions.outputs.testnet_readme }}" ]; then
echo "s/^\| *Testnet *\|.*\|/| Testnet | ${{ steps.get-versions.outputs.testnet_version }} |/"
needs_update=true
fi
if [ "${{ steps.get-versions.outputs.devnet_version }}" != "${{ steps.readme-versions.outputs.devnet_readme }}" ]; then
echo "s/^\| *Devnet *\|.*\|/| Devnet | ${{ steps.get-versions.outputs.devnet_version }} |/"
needs_update=true
fi
} > sed_commands.txt
echo "Generated sed commands:"
cat sed_commands.txt
echo ""
if [ "$needs_update" = true ]; then
echo "Updating README.md..."
sed -E -f sed_commands.txt README.md > "$tmp_file"
mv "$tmp_file" README.md
echo "Updated README content:"
cat README.md
echo "UPDATED=true" >> $GITHUB_ENV
else
echo "No version changes detected"
echo "UPDATED=false" >> $GITHUB_ENV
fi
- name: Create Pull Request
if: env.UPDATED == 'true'
run: |
# Check for existing PRs with specific label
existing_prs=$(gh pr list --state open --search 'in:title "Update network versions on README"' --json number --jq 'length')
if [ "$existing_prs" -gt 0 ]; then
echo "Existing PR found, skipping PR creation"
exit 0
fi
# Proceed with PR creation
echo "Creating PR..."
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
branch_name="version-update-$(date +%s)"
git checkout -b "$branch_name"
git add README.md
git commit -m "Update network versions on README:
- Fuel Ignition: ${{ steps.get-versions.outputs.ignition_version }}
- Testnet: ${{ steps.get-versions.outputs.testnet_version }}
- Devnet: ${{ steps.get-versions.outputs.devnet_version }}"
git push origin "$branch_name"
gh pr create \
--title "Update network versions on README" \
--body "Automated version updates:
- Fuel Ignition: ${{ steps.get-versions.outputs.ignition_version }}
- Testnet: ${{ steps.get-versions.outputs.testnet_version }}
- Devnet: ${{ steps.get-versions.outputs.devnet_version }}" \
--reviewer FuelLabs/client \
--base master \
--head "$branch_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Breaking
- [2648](https://github.com/FuelLabs/fuel-core/pull/2648): Add feature-flagged field to block header `fault_proving_header` that contains a commitment to all transaction ids.
- [2678](https://github.com/FuelLabs/fuel-core/pull/2678): Removed public accessors for `BlockHeader` fields and replaced with methods instead, moved `tx_id_commitment` to the application header of `BlockHeaderV2`.

### Added
- [2150](https://github.com/FuelLabs/fuel-core/pull/2150): Upgraded `libp2p` to `0.54.1` and introduced `ConnectionLimiter` to limit pending incoming/outgoing connections.

- [2648](https://github.com/FuelLabs/fuel-core/pull/2648): Add feature-flagged field to block header `fault_proving_header` that contains a commitment to all transaction ids.
### Fixed
- [2646](https://github.com/FuelLabs/fuel-core/pull/2646): Improved performance of fetching block height by caching it when the view is created.

### Changed

- [2653](https://github.com/FuelLabs/fuel-core/pull/2653): Added cleaner error for wasm-executor upon failed deserialization.
- [2659](https://github.com/FuelLabs/fuel-core/pull/2659): Replace `derivative` crate with `educe` crate.


## [Version 0.41.6]
Expand All @@ -34,7 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- [2387](https://github.com/FuelLabs/fuel-core/pull/2387): Update description `tx-max-depth` flag.
- [2630](https://github.com/FuelLabs/fuel-core/pull/2630): Removed some noisy `tracing::info!` logs
- [2643](https://github.com/FuelLabs/fuel-core/pull/2643): Before this fix when tip is zero, transactions that use 30M have the same priority as transactions with 1M gas. Now they are correctly ordered.
- [2659](https://github.com/FuelLabs/fuel-core/pull/2659): Replace `derivative` crate with `educe` crate.
- [2645](https://github.com/FuelLabs/fuel-core/pull/2645): Refactored `cumulative_percent_change` for 90% perf gains and reduced duplication.

### Breaking
- [2661](https://github.com/FuelLabs/fuel-core/pull/2661): Dry run now supports running in past blocks. `dry_run_opt` method now takes block number as the last argument. To retain old behavior, simply pass in `None` for the last argument.
Expand Down
Loading

0 comments on commit c6fa390

Please sign in to comment.