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

[NO MERGE] Verkle trees #7890

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 36 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ orbs:
executors:
small_executor:
docker:
- image: cimg/openjdk:17.0.7
- image: cimg/openjdk:21.0.2
auth: &docker-auth
# Don't panic, throw away account to avoid Docker rate limits when downloading.
# Second reason we're doing this is so that forked PRs from external contributors works ie env vars aren't visible to forked PRs from within contexts
Expand All @@ -27,7 +27,7 @@ executors:

medium_executor:
docker:
- image: cimg/openjdk:17.0.7
- image: cimg/openjdk:21.0.2
auth:
<<: *docker-auth
resource_class: medium
Expand All @@ -39,7 +39,7 @@ executors:

medium_plus_executor:
docker:
- image: cimg/openjdk:17.0.7
- image: cimg/openjdk:21.0.2
auth:
<<: *docker-auth
resource_class: "medium+"
Expand All @@ -50,7 +50,7 @@ executors:

large_executor:
docker:
- image: cimg/openjdk:17.0.7
- image: cimg/openjdk:21.0.2
auth:
<<: *docker-auth
resource_class: large
Expand All @@ -61,7 +61,7 @@ executors:

machine_executor_amd64:
machine:
image: ubuntu-2204:2023.07.2 # https://circleci.com/developer/machine/image/ubuntu-2204
image: ubuntu-2204:2024.01.1 # https://circleci.com/developer/machine/image/ubuntu-2204
docker_layer_caching: true
working_directory: ~/project
environment:
Expand All @@ -70,7 +70,7 @@ executors:

machine_executor_arm64:
machine:
image: ubuntu-2204:2023.07.2 # https://circleci.com/developer/machine/image/ubuntu-2204
image: ubuntu-2204:2024.01.1 # https://circleci.com/developer/machine/image/ubuntu-2204
resource_class: arm.medium
environment:
architecture: "arm64"
Expand All @@ -83,6 +83,21 @@ executors:
<<: *docker-auth

commands:
install_java_21:
description: "Install Java 21"
steps:
- run:
name: "Install Java 21"
command: |
sudo apt update
sudo apt install -y openjdk-21-jdk
if [ "$(uname -m)" = "aarch64" ]; then
ARCH="arm64"
else
ARCH="amd64"
fi
sudo update-alternatives --set java /usr/lib/jvm/java-21-openjdk-$ARCH/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-21-openjdk-$ARCH/bin/javac
prepare:
description: "Prepare"
steps:
Expand Down Expand Up @@ -148,7 +163,7 @@ commands:
name: "Publish Docker Images"
command: |
docker login --username "${DOCKER_USER_RW}" --password "${DOCKER_PASSWORD_RW}"
./gradlew --no-daemon --parallel "-Pbranch=${CIRCLE_BRANCH}" uploadDocker
./gradlew --no-daemon --parallel -Pbranch=${CIRCLE_BRANCH} -PincludeCommitHashInDockerTag=<< pipeline.parameters.include_commit_hash_in_docker_tag >> uploadDocker

notify:
description: "Notify Slack"
Expand All @@ -157,6 +172,12 @@ commands:
mentions: "team-centaur"
fail_only: true
only_for_branches: 'master'

parameters:
include_commit_hash_in_docker_tag:
type: boolean
default: false

jobs:
assemble:
executor: large_executor
Expand Down Expand Up @@ -204,7 +225,7 @@ jobs:
no_output_timeout: 20m
command: |
$Env:JAVA_TOOL_OPTIONS = "-Xmx2g"
$Env:GRADLE_OPTS = "-Dorg.gradle.daemon=false -Dorg.gradle.parallel=true"
$Env:GRADLE_OPTS = "-Dorg.gradle.daemon=false -Dorg.gradle.parallel=true -Dorg.gradle.vfs.watch=false"
cmd.exe /c gradlew.bat --no-daemon --parallel --build-cache
- run:
name: "Gather test artifacts"
Expand Down Expand Up @@ -325,6 +346,7 @@ jobs:
parallelism: 5
executor: machine_executor_amd64
steps:
- install_java_21
- prepare
- attach_workspace:
at: ~/project
Expand Down Expand Up @@ -433,6 +455,7 @@ jobs:
publishDockerAmd64:
executor: machine_executor_amd64
steps:
- install_java_21
- prepare
- attach_workspace:
at: ~/project
Expand All @@ -443,6 +466,7 @@ jobs:
publishDockerArm64:
executor: machine_executor_arm64
steps:
- install_java_21
- prepare
- attach_workspace:
at: ~/project
Expand All @@ -458,7 +482,7 @@ jobs:
- run:
name: Create and publish docker manifest
command: |
./gradlew --no-daemon --parallel manifestDocker
./gradlew --no-daemon --parallel -PincludeCommitHashInDockerTag=<< pipeline.parameters.include_commit_hash_in_docker_tag >> manifestDocker
- notify

extractAPISpec:
Expand Down Expand Up @@ -497,7 +521,7 @@ jobs:
paths:
- .openapidoc/spec/teku.json

# longish story here: we store the openapi json spec in the `gh-pages` branch of teku on Github
# longish story here: we store the openapi json spec in the `gh-pages` branch of teku on Github
# The reason we don't use GHA and instead use Circle to push to GHA is:
# 1. We need assemble -> extractAPISpec -> publishAPISpec and this takes circa 10 mins to build in GHA,
# 2. We publish artifacts (openapi, docker, binaries etc) only after ALL tests and we can't check for all the jobs passing to kick this one off
Expand Down Expand Up @@ -543,6 +567,8 @@ workflows:
tags:
<<: *filters-release-tags
- windowsBuild:
requires:
- spotless
filters:
tags:
<<: *filters-release-tags
Expand Down
5 changes: 5 additions & 0 deletions .codespell/.codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,package-lock.json,LOG.old.*
count =
quiet-level = 3
ignore-words = ./.codespell/wordlist.txt
7 changes: 7 additions & 0 deletions .codespell/wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
afterall
errorprone
vertx
dout
interruptors
bu
socio-economic
33 changes: 18 additions & 15 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,47 +33,50 @@ jobs:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

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

- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
java-version: 21

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

#- run: |
# make bootstrap
# make release
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# A Github action that uses codespell to check spell.
# .codespell/.codespellrc is a config file.
# .codespell/wordlist.txt is a list of words that will ignore word checks.
# More details please check the following link:
# https://github.com/codespell-project/codespell

name: Codespell

on: pull_request

jobs:
codespell:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Install prerequisites
run: pip install codespell

- name: Spell check
run: codespell --config=./.codespell/.codespellrc
4 changes: 2 additions & 2 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ jobs:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
2 changes: 1 addition & 1 deletion .github/workflows/test-path-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ jobs:
name: "Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Check test paths
run: ./scripts/testcheck.sh
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,4 @@ eth-reference-tests/src/referenceTest/resources/consensus-spec-tests/
.jqwik-database

/teku.db
node_modules

/test-network/grafana/data
/test-network/grafana/logs
/test-network/grafana/provisioning/dashboards/teku-dashboard-grafana.json
/test-network/data/
node_modules
2 changes: 1 addition & 1 deletion .openapidoc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This directory contains NodeJS project which publishes Teku OpenAPI specificatio
[`gh-pages`](https://github.com/Consensys/teku/tree/gh-pages) branch via CI job after tests are green.
See `publishOpenApiSpec` job in `.circleci/config.yml`.

The actual up to date generated doc is available at https://consensys.github.io/teku/
The actual up-to-date generated doc is available at https://consensys.github.io/teku/

## Procedure

Expand Down
Loading