Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
b16be5a
chore: disable nightly Docker cron (#26400)
decofe Jul 14, 2026
928ff1a
chore(txpool): remove unused pool test utilities (#26396)
decofe Jul 14, 2026
a47885f
refactor(trie): remove changed path tracking (#26403)
mediocregopher Jul 15, 2026
268efd6
perf(engine): skip proof worker cursor overlays in most cases (#25952)
mediocregopher Jul 15, 2026
4ed6aca
feat(download): make env public and add getter (#25285)
wlawt Jul 15, 2026
2bcf7ac
fix: terminate eyre bail invocations (#26416)
decofe Jul 16, 2026
0ac3d41
feat(net): serve real snap/2 account and storage range data (#26339)
lean-apple Jul 16, 2026
433a7bc
fix(rpc): fail invalid testing block transactions by default (#26372)
Soubhik-10 Jul 16, 2026
8ae521b
chore(deps): bump alloy core 1.6.1 (#26419)
decofe Jul 16, 2026
3ce0b4e
fix(trie): group proof targets by exact subtrie prefix (#26357)
mediocregopher Jul 16, 2026
091caca
fix(engine): avoid rewinding preserved sparse trie anchors (#26422)
mediocregopher Jul 17, 2026
2382a2b
feat(engine): pass parent header to post-execution hook (#26420)
0x00101010 Jul 17, 2026
234b353
chore: bump version to 2.4.1 (#26426)
decofe Jul 17, 2026
83d54cc
refactor(builder): lease resources (#26427)
pepyakin Jul 17, 2026
1cd853d
ci(bench): RPC replay mode (#26418)
shekhirin Jul 17, 2026
9ebad6c
ci: refresh Hive no-simulator-build patch (#26432)
Soubhik-10 Jul 18, 2026
362979d
feat(builder): pause jit while building payloads (#26429)
decofe Jul 18, 2026
1a2054a
fix(discv4): use provided rng in test utils instead of thread_rng (#2…
taranvd Jul 19, 2026
e6d13ab
chore: re-enable nightly Docker cron (#26440)
decofe Jul 19, 2026
e61333f
fix(rpc): align BAL lookup errors with spec (#26441)
Soubhik-10 Jul 19, 2026
6d02842
fix(rpc): add BAL debug method (#26438)
Soubhik-10 Jul 20, 2026
9d56213
test(net): add first snap e2e tests (#26368)
lean-apple Jul 20, 2026
92cf59e
feat(trie): expose payload state root receiver (#26431)
bitwiseguy Jul 20, 2026
9d2213b
chore(deps): bump the ci-weekly group with 3 updates (#26443)
dependabot[bot] Jul 20, 2026
d036a11
feat(stages): add partial persistence finish checkpoint (#26447)
mediocregopher Jul 20, 2026
f969bd4
fix(discv5): advertise fork ENR entry on custom chain ids (#26449)
MysticRyuujin Jul 20, 2026
01d3400
feat(engine): configure dev finality depth (#26451)
klkvr Jul 20, 2026
a04b780
perf(trie): remove sparse trie memory accounting (#26458)
mediocregopher Jul 21, 2026
9b0c17c
feat(metrics): engine thread resource usage (#26459)
pepyakin Jul 21, 2026
e382334
feat(trie): rebase partial proof roots (#26421)
mediocregopher Jul 21, 2026
197481f
perf(engine): keep 5 in-memory blocks by default (#26462)
mediocregopher Jul 21, 2026
f708b8b
perf(trie): parallelize pruning retention set calculation, remove LFU…
mediocregopher Jul 21, 2026
841ba4a
refactor: decouple evm references (#26463)
DaniPopes Jul 21, 2026
8bc6533
fix(bench): seed run summary with config (#26460)
decofe Jul 21, 2026
13d4710
chore(examples): remove precompile cache example (#26467)
onbjerg Jul 21, 2026
6441034
chore(docker): bump lighthouse v8.2.1 (#26469)
stevencartavia Jul 22, 2026
c4c17c2
feat(trie): add sparse trie pruning duration metric (#26470)
mediocregopher Jul 22, 2026
79c9402
feat(provider): support split persistence frontiers in overlays (#26457)
mediocregopher Jul 22, 2026
8a993c0
fix(provider): allow overlay anchors at prune checkpoint (#26475)
joshieDo Jul 22, 2026
c4a91de
fix(provider): account for storage history pruning (#26476)
joshieDo Jul 22, 2026
a99dd1e
feat(exex): let an `ExEx` catch up to the current head after a pause …
lean-apple Jul 22, 2026
f311e62
feat(cli): print modular download plans as JSON (#26480)
kuyziss Jul 22, 2026
48df75d
fix(rpc): align debug trace error codes (#26479)
Soubhik-10 Jul 22, 2026
ed2a670
chore(rpc): fix IPC server formatting (#26486)
decofe Jul 23, 2026
30b91cf
perf(provider): avoid range scan for first_transaction_num in remove_…
duyquang6 Jul 23, 2026
18b4b0f
feat(cli): add configurable dev defaults (#26488)
mattsse Jul 23, 2026
32de8f9
fix(trie): start partial proofs below known parent (#26471)
mediocregopher Jul 23, 2026
1c2942a
perf(engine): txpool prewarming (#26378)
shekhirin Jul 23, 2026
f3a9130
feat: enable txpool prewarm on nightly (#26493)
pepyakin Jul 24, 2026
84f4c98
feat(trie): prune sparse trie nodes by epoch (#26485)
mediocregopher Jul 24, 2026
75e4e62
refactor(storage): extract reth-storage-overlay crate (#26506)
mediocregopher Jul 27, 2026
d3ddd58
docs(engine): document sparse trie empty account invariant (#26508)
decofe Jul 27, 2026
fc3f7da
perf: share sender recovery cache across transaction paths (#26494)
pepyakin Jul 27, 2026
dff579b
chore(deps): update Alloy to 2.2.0 (#26517)
mattsse Jul 28, 2026
4f72933
fix: add missing dev-dependency features for standalone test builds (…
mattsse Jul 28, 2026
b8a214c
fix(net): reply to GetNodeData with empty payload (#26513)
Ayush7614 Jul 28, 2026
839b840
fix(refactor): skip transient selfdestruct storage wipes (#26433)
mediocregopher Jul 28, 2026
7987463
refactor(storage): consolidate overlay ownership (#26522)
mediocregopher Jul 28, 2026
71dddc8
chore(deps): bump the ci-weekly group with 4 updates (#26501)
dependabot[bot] Jul 29, 2026
b813f1f
refactor(engine): parse payload IDs directly (#26519)
mattsse Jul 29, 2026
97a10b1
fix(pruner): keep history checkpoint from rewinding on static file wa…
nekomoto911 Jul 29, 2026
ce46309
refactor(rpc): use Alloy gas limit validation (#26518)
mattsse Jul 29, 2026
c505ed2
feat(net): accept discv5 ENR bootnodes via CLI (#26448)
MysticRyuujin Jul 29, 2026
8617e42
fix(trie): avoid marking empty storage as deleted (#26526)
mediocregopher Jul 30, 2026
95909e8
feat(provider): support split-frontier save_blocks (#26521)
mediocregopher Jul 30, 2026
e430fd8
fix(net): keep ENR ports paired with their IP address (#26529)
mattsse Jul 30, 2026
c04c122
feat(provider): support trie-only save_blocks (#26535)
mediocregopher Jul 30, 2026
f2e2b5c
refactor(net): add NodeRecord::has_rlpx_endpoint helper (#26538)
mattsse Jul 30, 2026
9d25749
chore: update ruint to 1.20.0 (#26541)
lean-apple Jul 30, 2026
fd1c998
fix(rpc): cap implicit simulate gas limit (#26502)
Soubhik-10 Jul 31, 2026
d351966
feat(engine): configure state masking blocks (#26533)
mediocregopher Jul 31, 2026
e2563b7
feat: add -`-with-receipts` to `import-era` to store receipts (#26436)
lean-apple Jul 31, 2026
3aa6280
perf(rpc/ipc): O(N) `StreamCodec` via state-carry across `decode()` c…
jsousa-circle Jul 31, 2026
d2ede2c
chore: bump revm to 42.0.1 (#26490)
rakita Jul 31, 2026
d043d06
fix(trie): propagate proof worker startup failures (#26545)
mediocregopher Jul 31, 2026
0bba0c6
fix(net): recover partial header responses (#26482)
flcl42 Jul 31, 2026
8bfea20
fix(rpc): stop cancelled payload body range requests (#26546)
mattsse Jul 31, 2026
0450ea3
feat(rpc): add eth_getMultiProof (#26555)
rkrasiuk Aug 3, 2026
a5c244e
chore(deps): bump the ci-weekly group with 3 updates (#26556)
dependabot[bot] Aug 3, 2026
7a98a9c
chore(deps): update Alloy and Tokio Tungstenite (#26562)
mattsse Aug 3, 2026
10aa6a5
fix(rpc): include block numbers in pruned history error (#26550)
jihoon1125 Aug 3, 2026
fca7532
feat(config): add bootnodes to reth.toml (#26551)
MysticRyuujin Aug 3, 2026
71e5cc8
feat(txpool): track blob cell availability (#25463)
Soubhik-10 Aug 3, 2026
3e9b1cb
feat: make testing rpc handler generic over types (#26547)
debjit-bw Aug 4, 2026
7bcf5d0
fix(rpc): stop cancelled payload body hash requests (#26569)
Petre-Kharazashvili Aug 4, 2026
1eb0c9d
fix(rpc): accept BlockId for execution witness (#26572)
decofe Aug 4, 2026
9ea6d16
fix(engine): defer persistence handoff during payload builds (#26559)
mediocregopher Aug 4, 2026
0b0f7db
feat(stages): handle partial trie unwinds (#26543)
mediocregopher Aug 4, 2026
b3112af
feat(engine): build payloads on canonical ancestors above finality (#…
mattsse Aug 4, 2026
d56b198
feat(rpc): support network-specific log responses (#26491)
0x00101010 Aug 4, 2026
22583a0
feat(provider): return header with transaction metadata (#26571)
figtracer Aug 4, 2026
92855d2
test(engine): manage finality in e2e reorg flows (#26584)
mattsse Aug 4, 2026
3b4ee78
refactor(trie): no longer set wiped field of HashedPostState (#26524)
mediocregopher Aug 5, 2026
8104ed1
refactor(storage): remove ConsistentDbView (#26581)
decofe Aug 5, 2026
859e31a
refactor(provider): remove unused AccountReader bounds (#26591)
decofe Aug 5, 2026
ecfe7d3
fix(bench): show metrics in run config (#26461)
decofe Aug 5, 2026
eb36606
chore(net): share the snap/2 slim account codec between server and cl…
lean-apple Aug 5, 2026
47ac8d0
revert(provider): return header with transaction metadata (#26595)
mattsse Aug 5, 2026
a4e6baa
fix(rpc): restore optional receipt conversion (#26596)
mattsse Aug 5, 2026
b74a4f7
refactor(rpc): reuse optional receipt cache blocks (#26599)
decofe Aug 5, 2026
1b20c9b
fix(static-file): respect prune checkpoints in consistency check (#26…
mattsse Aug 5, 2026
995c55a
refactor(`eth_createAccessList`): unify env preparation (#26598)
klkvr Aug 5, 2026
db18362
fix(dns): rejoin TXT character-strings for EIP-1459 entries over 255 …
MysticRyuujin Aug 5, 2026
ff6e072
perf(engine): centralize overlay anchoring logic (#26580)
mediocregopher Aug 6, 2026
8e34c4b
chore(hive): add execute-blob tests in the hive workflow (#26606)
Soubhik-10 Aug 6, 2026
2125dc6
refactor(storage): move OverlayStateProvider and let it use a Provide…
mediocregopher Aug 6, 2026
b8f775a
fix(trie): support partial persistence in changeset cache (#26612)
mediocregopher Aug 6, 2026
9253c0f
fix(dns): skip unrelated TXT records (#26603)
mattsse Aug 6, 2026
d229be6
refactor: reuse evm for block-level tracing (#26614)
klkvr Aug 7, 2026
6cda1bf
fix(cli): download enough history when the final snapshot chunk is pa…
zexoverz Aug 7, 2026
9dd31ea
fix(net): preserve eth72 announcement cell masks (#26573)
Soubhik-10 Aug 7, 2026
c7d94e6
fix(ci): resolve nightly Clippy failures (#26625)
mattsse Aug 8, 2026
6646bb3
feat(snapshots): resolve base url for static files (#26576)
wlawt Aug 10, 2026
53ee0ac
fix(rpc): honor targetGasLimit in testing_buildBlockV1 (#26632)
MysticRyuujin Aug 10, 2026
64e6225
feat(storage): add rocksdb BAL store (#25476)
joshieDo Aug 10, 2026
ddb640b
ci: allow transitive bitmaps advisory (#26638)
mattsse Aug 10, 2026
1c6945c
fix(network): do check the ECIES id in hello (#26639)
pepyakin Aug 11, 2026
199387a
chore: expose blob cell availability on pooled transactions (#26642)
shekhirin Aug 11, 2026
62808bd
fix(txpool): allow senders with empty code hash (#26644)
mattsse Aug 11, 2026
905058c
fix(storage): roll back RocksDB BAL storage (#26646)
mattsse Aug 11, 2026
c733889
fix(storage): tolerate unknown RocksDB column families (#26647)
mattsse Aug 11, 2026
db9f641
feat(network): allow configuring no-op client version (#26652)
decofe Aug 11, 2026
f3e49cc
fix(engine): adjust payload validation (#26651)
mattsse Aug 11, 2026
3a83ccc
fix(eth-wire): reject out-of-range subprotocol message IDs (#26654)
pepyakin Aug 11, 2026
189c0df
chore: bump reth version to 2.5.0
emmajam Aug 12, 2026
ab93ecc
feat(payload): finalize pending build on resolve (#26759)
0x00101010 Aug 20, 2026
b682925
fix(provider): handle storage wipes in batched persistence (#26750)
decofe Aug 19, 2026
b7a801d
chore: bump versions
emmajam Aug 20, 2026
6dec1b9
chore: fix formatting regression
emmajam Aug 20, 2026
29aa4ae
fix(stages): log bad block hash (#26909)
mattsse Sep 1, 2026
60c1eb7
fix(rocksdb): better max_open_files config (#26812)
pepyakin Aug 25, 2026
8eacb19
feat(net): allow updating the fork filter at runtime (#26794)
refcell Aug 25, 2026
b5f0c4f
fix(exex): support sparse WAL file IDs (#26819)
mattsse Aug 26, 2026
f4b39f9
chore: bump version
emmajam Sep 2, 2026
5a6940e
chore: formatting
emmajam Sep 2, 2026
0b065f3
Add the op-reth-v2.4.2-fh3.2 changelog section
sduchesneau Sep 9, 2026
0eff482
fix(engine): keep messages responsive during pending handoff (#26708)
mattsse Aug 14, 2026
0fbe428
ci: run fork validation through CircleCI act
sebastianst Sep 15, 2026
4ca11e7
firehose: cap keccak preimages at 256 bytes
sduchesneau Sep 17, 2026
47ef2c0
Merge pull request #42 from streamingfast/feature/keccak-preimage-cap…
sduchesneau Sep 17, 2026
409e21b
Use firehose-tracer with the keccak preimage filter
sduchesneau Sep 28, 2026
82c39f1
Add changelog entry for the keccak preimage filter
sduchesneau Sep 28, 2026
ec4a4f8
Pick up the always-on keccak preimage filter
sduchesneau Sep 29, 2026
6389515
Point firehose-tracer at the merged keccak preimage filter
sduchesneau Sep 29, 2026
28c0c19
Use firehose-tracer 5.5.0
sduchesneau Sep 29, 2026
77e6cc5
Prepare op-reth-v2.4.2-fh3.1-3 release notes
sduchesneau Sep 29, 2026
410e113
Reword the keccak filter and call limit entries
sduchesneau Sep 29, 2026
bf6881e
Merge pull request #60 from streamingfast/firehose-keccak-filter/opti…
sduchesneau Sep 29, 2026
1253df7
Merge ethereum-optimism/reth 0fbe4285 into bump/op-reth-v2.6.1
sduchesneau Oct 22, 2026
dd5409c
Add the op-reth-v2.6.1-fh3.1 changelog section
sduchesneau Oct 22, 2026
e2428f7
Emit Firehose init and genesis without an ExEx
sduchesneau Oct 2, 2026
d4875c1
Merge pull request #81 from streamingfast/bump/op-reth-v2.6.1
sduchesneau Oct 22, 2026
6c16166
Merge remote-tracking branch 'origin/release/optimism-2.x' into bump/…
sduchesneau Oct 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
209 changes: 209 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
version: 2.1

# Runs this fork's validation workflows through pinned act because GitHub Actions is disabled.
# Pull requests and branch pushes run the PR checks; merge queues add stage.yml. Event metadata is
# generated once per CircleCI revision and shared by all shards.
#
# The read-only GitHub token is exposed to PR code, so its CircleCI context must remain
# restricted to trusted contributors. Keep CircleCI auto-cancellation enabled.
#
# The act binary, checksum, and runner image are pinned. Compiler caches are no-ops because
# act's local cache is not reusable across these machines; Pages plumbing is skipped after the
# validation build. Lint and unit jobs are distributed; other workflows run up to four jobs.
#
# Excluded: pr-title.yml, label-pr.yml, and the privileged cyclops-audit.yml integration.

jobs:
prepare-act-event:
machine:
image: ubuntu-2404:2025.09.1
resource_class: medium
steps:
- checkout
- run:
name: Snapshot GitHub event
command: |
mkdir -p /tmp/act-event
if ! .circleci/prepare-act-event.sh; then
echo "GitHub event preparation failed; act shards will report the failure" |
tee /tmp/act-event/failed
fi
- persist_to_workspace:
root: /tmp/act-event
paths:
- .

act:
parameters:
wf:
type: string
job:
type: string
default: ""
concurrent_jobs:
type: integer
default: 4
machine:
image: ubuntu-2404:2025.09.1
resource_class: xlarge
steps:
- checkout
- attach_workspace:
at: /tmp/act-event
- run:
name: Check event snapshot
command: |
if [ -f /tmp/act-event/failed ]; then
cat /tmp/act-event/failed >&2
exit 1
fi
- run:
name: Install pinned act
command: |
set -euo pipefail
readonly ACT_VERSION="0.2.89-action-cache-fix.1"
readonly ACT_RELEASE="v0.2.89-action-cache-fix.4"
readonly ACT_BINARY="act_Linux_x86_64"
readonly ACT_SHA256="28bfcf1502f59a834b14f2fb23c39e5b253c2234d875592b5aa0a175f9674dce"
curl --fail --silent --show-error --location \
"https://github.com/ethereum-optimism/act/releases/download/${ACT_RELEASE}/${ACT_BINARY}" \
--output "/tmp/${ACT_BINARY}"
echo "${ACT_SHA256} /tmp/${ACT_BINARY}" | sha256sum --check
sudo install -m 0755 "/tmp/${ACT_BINARY}" /usr/local/bin/act
test "$(act --version)" = "act version ${ACT_VERSION}"
- run:
name: Stub unsupported non-check actions
command: |
mkdir -p /tmp/noop-action
printf '%s\n' \
'name: noop' \
'description: disabled service plumbing under act' \
'inputs:' \
' cache-on-failure: {required: false}' \
' cache-targets: {required: false}' \
'runs:' \
' using: composite' \
' steps:' \
' - run: echo "Service plumbing disabled under act"' \
' shell: bash' \
> /tmp/noop-action/action.yml
- run:
name: Run << parameters.wf >> via act
no_output_timeout: 45m
command: |
set -euo pipefail
event_path=/tmp/act-event/github-event.json
event_name="$(jq -er 'if .pull_request then "pull_request" elif .merge_group then "merge_group" elif .ref and .after then "push" else error("unsupported event") end' "$event_path")"
base_ref="$(jq -r '(.pull_request.base.ref // .merge_group.base_ref // "") | sub("^refs/heads/"; "")' "$event_path")"
target_job="<< parameters.job >>"
# Validate documentation without entering Pages deployment on branch pushes.
if [ "<< parameters.wf >>" = "book.yml" ]; then
target_job=build
fi
act_job=()
if [ -n "$target_job" ]; then
case "$target_job" in
crate-checks-*)
partition="${target_job#crate-checks-}"
if [[ ! "$partition" =~ ^[1-9][0-9]*$ ]]; then
echo "invalid crate-checks partition: $partition" >&2
exit 1
fi
act_job=(-j crate-checks --matrix "partition:${partition}")
;;
*)
act_job=(-j "$target_job")
;;
esac
fi

act_env=(--env "RUSTC_WRAPPER=" --env "GITHUB_BASE_REF=${base_ref}")
if [ "<< parameters.wf >>" = "unit.yml" ] && [ "$target_job" = "state" ]; then
# EF tests use Rayon internally, so unrestricted nextest processes multiply
# runnable threads and starve valid_blocks past its upstream timeout.
act_env+=(--env "NEXTEST_TEST_THREADS=2")
fi
if [ "$event_name" != "pull_request" ]; then
act_env+=(
--env "GITHUB_REF=refs/heads/${CIRCLE_BRANCH}"
--env "GITHUB_SHA=${CIRCLE_SHA1}"
)
fi

act "$event_name" -W ".github/workflows/<< parameters.wf >>" \
"${act_job[@]}" \
--eventpath "$event_path" \
-P "ubuntu-latest=catthehacker/ubuntu@sha256:b839c14c4410998529ec18f951262bdf87a2b23bc1467304d07b491b9455e074" \
--concurrent-jobs << parameters.concurrent_jobs >> \
"${act_env[@]}" \
-s GITHUB_TOKEN="${MISE_GITHUB_TOKEN:?missing restricted read-only GitHub token}" \
--local-repository "mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696=/tmp/noop-action" \
--local-repository "Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4=/tmp/noop-action" \
--local-repository "actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d=/tmp/noop-action" \
--local-repository "actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9=/tmp/noop-action"

workflows:
reth-act:
jobs:
- prepare-act-event:
context:
- circleci-repo-readonly-authenticated-github-token
- act:
context:
- circleci-repo-readonly-authenticated-github-token
name: "act-<< matrix.wf >>"
requires:
- prepare-act-event
matrix:
parameters:
wf:
- book.yml
- compact.yml
- e2e.yml
- grafana.yml
- integration.yml
- lint-actions.yml
- stage.yml
- act:
wf: lint.yml
concurrent_jobs: 1
context:
- circleci-repo-readonly-authenticated-github-token
name: "act-lint-<< matrix.job >>"
requires:
- prepare-act-event
matrix:
parameters:
job:
- clippy-binaries
- clippy
- wasm
- riscv
- crate-checks-1
- crate-checks-2
- crate-checks-3
- msrv
- docs
- fmt
- udeps
- book
- typos
- check-toml
- grafana
- no-test-deps
- feature-propagation
- deny
- act:
wf: unit.yml
concurrent_jobs: 1
context:
- circleci-repo-readonly-authenticated-github-token
name: "act-unit-<< matrix.job >>"
requires:
- prepare-act-event
matrix:
parameters:
job:
- test
- state
- doc
102 changes: 102 additions & 0 deletions .circleci/prepare-act-event.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#!/usr/bin/env bash
set -euo pipefail

readonly OUTPUT_DIR="${ACT_EVENT_OUTPUT_DIR:-/tmp/act-event}"
readonly EVENT_PATH="${OUTPUT_DIR}/github-event.json"

mkdir -p "$OUTPUT_DIR"
rm -f "$EVENT_PATH"

: "${CIRCLE_SHA1:?missing CircleCI revision}"
: "${CIRCLE_PROJECT_USERNAME:?missing CircleCI project owner}"
: "${CIRCLE_PROJECT_REPONAME:?missing CircleCI project repository}"

repository="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"

if [[ "${CIRCLE_BRANCH:-}" == gh-readonly-queue/* ]]; then
event_name="merge_group"
elif [[ -n "${CIRCLE_PULL_REQUEST:-}" ]]; then
event_name="pull_request"
else
event_name="push"
fi

case "$event_name" in
pull_request)
: "${CIRCLE_PULL_REQUEST:?pull-request trigger must provide CIRCLE_PULL_REQUEST}"
pr_number="${CIRCLE_PULL_REQUEST##*/}"
if [[ ! "$pr_number" =~ ^[1-9][0-9]*$ ]]; then
echo "invalid pull-request URL: ${CIRCLE_PULL_REQUEST}" >&2
exit 1
fi

pull_request_path="${OUTPUT_DIR}/pull-request.json"
curl --fail --silent --show-error --location \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${MISE_GITHUB_TOKEN:?missing restricted read-only GitHub token}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${repository}/pulls/${pr_number}" > "$pull_request_path"

event_head_sha="$(jq -er '.head.sha' "$pull_request_path")"
if [[ "$event_head_sha" != "$CIRCLE_SHA1" ]]; then
echo "PR head does not match CircleCI revision: ${CIRCLE_SHA1} != ${event_head_sha}" >&2
exit 1
fi

jq '{
action: "synchronize",
number: .number,
pull_request: .,
repository: .base.repo,
sender: .user
}' "$pull_request_path" > "$EVENT_PATH"
base_ref="$(jq -er '.base.ref | select(length > 0)' "$pull_request_path")"
head_ref="$(jq -er '.head.ref | select(length > 0)' "$pull_request_path")"
echo "act event: pull_request #${pr_number}, ${head_ref} -> ${base_ref}"
;;
push)
: "${CIRCLE_BRANCH:?push trigger must provide CIRCLE_BRANCH}"
jq -n \
--arg ref "refs/heads/${CIRCLE_BRANCH}" \
--arg after "$CIRCLE_SHA1" \
'{ref: $ref, after: $after}' > "$EVENT_PATH"
echo "act event: push ${CIRCLE_BRANCH} at ${CIRCLE_SHA1}"
;;
merge_group)
: "${CIRCLE_BRANCH:?merge-queue trigger must provide CIRCLE_BRANCH}"
if [[ ! "$CIRCLE_BRANCH" =~ ^gh-readonly-queue/(.+)/pr-([1-9][0-9]*)-[^/]+$ ]]; then
echo "merge_group requires a gh-readonly-queue/<base>/pr-<number>-<suffix> branch, got: ${CIRCLE_BRANCH}" >&2
exit 1
fi
base_ref="${BASH_REMATCH[1]}"

if ! base_sha="$(git rev-parse "${CIRCLE_SHA1}^1" 2>/dev/null)"; then
git fetch --no-tags --depth=2 origin "$CIRCLE_SHA1"
base_sha="$(git rev-parse "${CIRCLE_SHA1}^1")"
fi

jq -n \
--arg head_sha "$CIRCLE_SHA1" \
--arg head_ref "refs/heads/${CIRCLE_BRANCH}" \
--arg base_sha "$base_sha" \
--arg base_ref "refs/heads/${base_ref}" \
--arg repository "$repository" \
--arg repository_name "$CIRCLE_PROJECT_REPONAME" \
--arg repository_owner "$CIRCLE_PROJECT_USERNAME" \
'{
action: "checks_requested",
merge_group: {
head_sha: $head_sha,
head_ref: $head_ref,
base_sha: $base_sha,
base_ref: $base_ref
},
repository: {
full_name: $repository,
name: $repository_name,
owner: {login: $repository_owner}
}
}' > "$EVENT_PATH"
echo "act event: merge_group ${CIRCLE_BRANCH} -> ${base_ref} at ${base_sha}"
;;
esac
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ crates/storage/libmdbx-rs/ @shekhirin
crates/storage/nippy-jar/ @joshieDo @shekhirin
crates/storage/provider/ @joshieDo @shekhirin
crates/storage/storage-api/ @joshieDo
crates/storage/storage-overlay/ @joshieDo @shekhirin @mediocregopher
crates/tasks/ @mattsse @DaniPopes
crates/tokio-util/ @mattsse
crates/tracing/ @mattsse @shekhirin
Expand Down
Loading
Loading