Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/only track intrinsically bad blocks #100

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
674e779
TDD - add exceptional test cases, fix assertions
mbaxter Feb 28, 2024
ce2a9ea
Fix BlockValidator handling of bad blocks
mbaxter Feb 28, 2024
2e34005
Clean up BadBlockManager
mbaxter Feb 28, 2024
412de29
Revert "Acceptance tests to use bonsai (#6619)" (#6677)
RoboCopsGoneSock Mar 4, 2024
d07fe36
adjust help message for --genesis-file (#6654)
macfarla Mar 5, 2024
8909b7c
Add blobs to `eth_feeHistory` (#6679)
Gabriel-Trintinalia Mar 5, 2024
1695e55
Eth call with 4844 params (#6661)
macfarla Mar 5, 2024
a10ced7
[MINOR] Remove todo override genesis config (#6659)
macfarla Mar 5, 2024
39c15bc
Refactor and extend PluginTransactionPoolValidatorService (#6636)
fab-10 Mar 5, 2024
47f1a64
sets metaspace explicitly after gradle reset a la https://github.com/…
jflo Mar 1, 2024
8e3ee63
allow manual runs of accept-test workflow
jflo Mar 1, 2024
3155ee2
don't try to get prs that don't exist
jflo Mar 1, 2024
47b7534
make artifacts more snapshot friendly
jflo Mar 1, 2024
3c2cfb9
not javascript on those
jflo Mar 1, 2024
1994f06
something on the windows runner changed
jflo Mar 1, 2024
9686220
debugging stupid windows
jflo Mar 1, 2024
827c83a
guess its powershell
jflo Mar 1, 2024
28f27d7
avoid subdirs
jflo Mar 1, 2024
9480654
break out new workflows for snapshots, and a develop releease
jflo Mar 1, 2024
e183041
develop should be all we need
jflo Mar 1, 2024
b896487
only on main
jflo Mar 4, 2024
c0e7174
removes checking for approval, runs on pr update
jflo Mar 5, 2024
aa5f6d5
docker might need manual run
jflo Mar 5, 2024
b222169
Merge pull request #98 from jflo/gradleDaemonDisconnect
jflo Mar 5, 2024
754ac46
fixes job dependencies
jflo Mar 5, 2024
fad8fb1
Merge branch 'main' into gradleDaemonDisconnect
jflo Mar 5, 2024
efc7333
Merge pull request #99 from jflo/gradleDaemonDisconnect
jflo Mar 5, 2024
7291430
adds concurrency so updated refs cancel prior runs if still running
jflo Mar 5, 2024
9a9cfa2
Generate a more readable toString method
mbaxter Mar 5, 2024
a9590f7
explicitly disable caching on gradle setup tasks
jflo Mar 5, 2024
a9a6947
explicitly disable caching on gradle setup tasks
jflo Mar 5, 2024
fea2168
Merge branch 'main' into gradleDaemonDisconnect
jflo Mar 5, 2024
2a1b621
Merge pull request #101 from jflo/gradleDaemonDisconnect
jflo Mar 5, 2024
3da6596
Merge branch 'main' into bug/only-track-intrinsically-bad-blocks
jflo Mar 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 5 additions & 40 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,22 @@ on:
branches:
- main
- release-*
pull_request_review:
types: [submitted]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false"
total-runners: 16

jobs:
shouldRun:
name: checks to ensure we should run
# necessary because there is no single PR approved event, need to check all comments/approvals/denials
runs-on: ubuntu-22.04
outputs:
shouldRun: ${{steps.shouldRun.outputs.result}}
steps:
- name: required check
id: shouldRun
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
env:
# fun fact, this changes based on incoming event, it will be different when we run this on pushes to main
RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
with:
script: |
const { RELEVANT_SHA } = process.env;
const { data: { statuses } } = await github.rest.repos.getCombinedStatusForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: RELEVANT_SHA,
});
const acceptanceTested = statuses && statuses.filter(({ context }) => context === 'accepttests-passed');
const alreadyRun = acceptanceTested && acceptanceTested.find(({ state }) => state === 'success') > 0;
const { data: reviews } = await github.rest.pulls.listReviews({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
});
const approvingReviews = reviews && reviews.filter(review => review.state === 'APPROVED');
const shouldRun = !alreadyRun && github.actor != 'dependabot[bot]' && (approvingReviews.length > 0);

console.log("tests should be run = %j", shouldRun);
console.log("alreadyRun = %j", alreadyRun);
console.log("approvingReviews = %j", approvingReviews.length);

return shouldRun;
acceptanceTestEthereum:
runs-on: ubuntu-22.04
name: "Acceptance Runner"
needs: shouldRun
permissions:
statuses: write
checks: write
if: ${{ needs.shouldRun.outputs.shouldRun == 'true'}}
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -111,6 +75,7 @@ jobs:
report_paths: 'acceptance-tests/tests/build/test-results/**/TEST-*.xml'
annotate_only: true
accepttests-passed:
name: "accepttests-passed"
runs-on: ubuntu-22.04
needs: [ acceptanceTestEthereum ]
permissions:
Expand Down
40 changes: 25 additions & 15 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

name: artifacts
name: release artifacts

on:
workflow_dispatch:
release:
types:
- prereleased
Expand All @@ -22,7 +21,7 @@ jobs:
java-version: '17'
- name: setup gradle
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
- name: assemble distributions
- name: assemble release
run:
./gradlew -Prelease.releaseVersion=${{github.ref_name}} -Pversion=${{github.ref_name}} assemble -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
- name: hashes
Expand All @@ -43,16 +42,6 @@ jobs:
path: 'build/distributions/besu*.zip'
name: besu-${{ github.ref_name }}.zip
compression-level: 0
- name: Upload Release assets
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
append_body: true
files: |
build/distributions/besu*.tar.gz
build/distributions/besu*.zip
body: |
${{steps.hashes.outputs.tarSha}}
${{steps.hashes.outputs.zipSha}}
testWindows:
runs-on: windows-2022
needs: artifacts
Expand All @@ -67,13 +56,34 @@ jobs:
- name: Download zip
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe
with:
name: besu-${{ github.ref_name }}.zip
pattern: besu-*.zip
merge-multiple: true
- name: test Besu
run: |
dir
unzip besu-*.zip -d besu-tmp
cd besu-tmp
mv besu-* ../besu
cd ..
besu\bin\besu.bat --help
besu\bin\besu.bat --version

publish:
runs-on: ubuntu-22.04
needs: testWindows
steps:
- name: Download archives
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe
with:
pattern: besu-*
merge-multiple: true
path: 'build/distributions'
- name: Upload Release assets
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
append_body: true
files: |
build/distributions/besu*.tar.gz
build/distributions/besu*.zip
body: |
${{steps.hashes.outputs.tarSha}}
${{steps.hashes.outputs.zipSha}}
8 changes: 1 addition & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths-ignore:
- '**/*.json'
- '**/*.md'
- '**/*.properties'
- '**/*.txt'

jobs:
analyze:
name: Analyze
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

name: develop pre-release

on:
push:
-branches:
- main

jobs:
artifacts:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Set up JDK 17
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
with:
distribution: 'temurin'
java-version: '17'
- name: setup gradle
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
- name: assemble release
run:
./gradlew assemble -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
- name: upload tarball
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
path: 'build/distributions/besu*.tar.gz'
name: besu-${{ github.ref_name }}.tar.gz
compression-level: 0
- name: hashes
id: hashes
run: |
cd build/distributions
echo "zipSha=$(shasum -a 256 besu*.zip)" >> $GITHUB_OUTPUT
echo "tarSha=$(shasum -a 256 besu*.tar.gz)" >> $GITHUB_OUTPUT
- name: upload zipfile
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
with:
path: 'build/distributions/besu*.zip'
name: besu-${{ github.ref_name }}.zip
compression-level: 0
- name: Upload Release assets
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
with:
prerelease: true
name: develop
tag_name: develop
fail_on_unmatched_files: true
append_body: false
files: |
build/distributions/besu*.tar.gz
build/distributions/besu*.zip
body: |
This is an automated, bleeding edge build from the tip of ${{ github.ref_name }}. No promises. YOLO.

${{steps.hashes.outputs.tarSha}}
${{steps.hashes.outputs.zipSha}}
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: docker
on:
workflow_dispatch:
release:
types:
- prereleased
Expand Down
46 changes: 5 additions & 41 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,18 @@ on:
branches:
- main
- release-*
pull_request_review:
types:
- submitted

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false"

jobs:
shouldRun:
name: checks to ensure we should run
runs-on: ubuntu-22.04
outputs:
shouldRun: ${{steps.shouldRun.outputs.result}}
steps:
- name: required check
id: shouldRun
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
env:
# fun fact, this changes based on incoming event, it will be different when we run this on pushes to main
RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
with:
script: |
const { RELEVANT_SHA } = process.env;
const { data: { statuses } } = await github.rest.repos.getCombinedStatusForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: RELEVANT_SHA,
});

const intTested = statuses && statuses.filter(({ context }) => context === 'integration-tests');
const alreadyRun = intTested && intTested.find(({ state }) => state === 'success') > 0;
const { data: reviews } = await github.rest.pulls.listReviews({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
});
const approvingReviews = reviews && reviews.filter(review => review.state === 'APPROVED');
const shouldRun = !alreadyRun && github.actor != 'dependabot[bot]' && (approvingReviews.length > 0);

console.log("tests should be run = %j", shouldRun);
console.log("alreadyRun = %j", alreadyRun);
console.log("approvingReviews = %j", approvingReviews.length);

return shouldRun;
integration-tests:
name: "integration-passed"
runs-on: ubuntu-22.04
needs: shouldRun
if: ${{ needs.shouldRun.outputs.shouldRun == 'true' }}
permissions:
statuses: write
checks: write
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/pre-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
- main
- release-*

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true"

jobs:
repolint:
name: "Repository Linting"
Expand Down Expand Up @@ -41,8 +48,10 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
with:
cache-disabled: true
- name: run spotless
run: ./gradlew spotlessCheck -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
run: ./gradlew spotlessCheck
compile:
runs-on: ubuntu-22.04
timeout-minutes: 30
Expand All @@ -59,8 +68,10 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
with:
cache-disabled: true
- name: Gradle Compile
run: ./gradlew build -x test -x spotlessCheck -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
run: ./gradlew build -x test -x spotlessCheck
unitTests:
env:
GRADLEW_UNIT_TEST_ARGS: ${{matrix.gradle_args}}
Expand Down Expand Up @@ -92,16 +103,19 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
with:
cache-disabled: true
- name: run unit tests
id: unitTest
run: ./gradlew $GRADLEW_UNIT_TEST_ARGS -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
run: ./gradlew $GRADLEW_UNIT_TEST_ARGS
- name: Publish Test Report
uses: mikepenz/action-junit-report@5f47764eec0e1c1f19f40c8e60a5ba47e47015c5
if: success() || failure() # always run even if the build step fails
with:
report_paths: '**/test-results/**/TEST-*.xml'
annotate_only: true
unittests-passed:
name: "unittests-passed"
runs-on: ubuntu-22.04
needs: [unitTests]
permissions:
Expand Down
Loading
Loading