Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit cbc662a
Merge: 3787211 70e9dbc
Author: geoknee <[email protected]>
Date:   Fri Aug 30 16:18:49 2024 +0100

    Merge remote-tracking branch 'origin/main' into gk/gen-val-met

commit 3787211
Author: George Knee <[email protected]>
Date:   Fri Aug 30 15:40:42 2024 +0100

    remove temporarily added chains (#535)

    * git restore --source=main -- superchain

    * just codegen

    * just lint-all

    * lint

    * typo

commit 7d3ed21
Author: George Knee <[email protected]>
Date:   Fri Aug 30 15:06:02 2024 +0100

    use dynamic config building in CI (#534)

    * use dynamic config building in CI

    This works by having a small workflow run, compute the list of chain ids to run genesis validation checks on, and then modify a subsequent config file which circleci then runs.

    * add comment

    * fan in

    * fix

    * fix script

    * Update .circleci/continue_config.yml

    Co-authored-by: Vinod Damle <[email protected]>

    ---------

    Co-authored-by: Vinod Damle <[email protected]>

commit c7e50fe
Author: geoknee <[email protected]>
Date:   Fri Aug 30 11:24:10 2024 +0100

    add testGenesisAllocsMetadata

commit fa01d6b
Author: geoknee <[email protected]>
Date:   Fri Aug 30 11:01:45 2024 +0100

    rename commands

commit b8ba6a4
Author: geoknee <[email protected]>
Date:   Fri Aug 30 11:00:37 2024 +0100

    rename test

commit 6fafbe4
Author: geoknee <[email protected]>
Date:   Thu Aug 29 23:11:24 2024 +0100

    tidy up test script

commit b3fcdb2
Author: geoknee <[email protected]>
Date:   Thu Aug 29 22:57:02 2024 +0100

    remove temporary directory after tests run

commit 4cbf389
Author: geoknee <[email protected]>
Date:   Thu Aug 29 22:50:08 2024 +0100

    dedupe perChainTestName

commit 4ebaafc
Author: geoknee <[email protected]>
Date:   Thu Aug 29 22:28:25 2024 +0100

    improve naming of ci steps

commit 732260c
Author: geoknee <[email protected]>
Date:   Thu Aug 29 18:39:19 2024 +0100

    harmonize op-geth version

commit ae24ca1
Author: geoknee <[email protected]>
Date:   Thu Aug 29 18:36:42 2024 +0100

    just tidy-all

commit 46c9ec1
Merge: b01525b 936d40b
Author: geoknee <[email protected]>
Date:   Thu Aug 29 18:36:21 2024 +0100

    Merge remote-tracking branch 'origin/main' into gk/gen-val-met

commit b01525b
Author: George Knee <[email protected]>
Date:   Thu Aug 29 18:33:39 2024 +0100

    Get genesis validation checks to run on CI (#529)

    * switch to cimg/go:1.22.6-node docker image for genesis validation

    * remove set -e

    (nvm.sh exits with code 3, we can apparently just ignore that)

    * use bash instead of sh

    * use . instead of source

    * install pnpm

    * move optimism-temporary out from under superchain-registry

    this seems to make go module resolution work as expected

    * do not allow validate-genesis to timeout

    * improve pipefail behaviour

    we allow the scripts which load nvm and gvm to fail

    * just lint-all

    * remove all set -e behaviour

    gives highest chance that validation can succeed

    * stream output from test

    helps with debugging, prevents timeouts on circleci

    * try running as a matrix

    * add base and base sepolia to genesis validation list (#530)

    * add base sepolia to genesis validation list

    * add base mainnet to genesis validation list

    * Add validation metadata for Lisk mainnet + testnet (#531)

    * temp:  gk/genadd lisk mainnet (revertme)

    * add lisk metadata for genesis validation

    * temp: add lisk sepolia (revertme)

    * add genesis validation metadata for lisk sepolia

    * Update .circleci/config.yml

    * add comment

commit 1365e25
Author: George Knee <[email protected]>
Date:   Wed Aug 28 12:19:48 2024 +0100

    use localised, gitignored optimism-temporary directory for genesis validation purposes (#507)

commit 6793309
Author: George Knee <[email protected]>
Date:   Sat Aug 24 17:32:53 2024 +0100

    Enhance `add-chain` tool to capture deploy config and monorep commit information  (#504)

    * add-chain: ingest and store deploy-config and genesis-creation commit

    * remove genesis-system-configs dir

    we no longer use this

    * add test data for deploy-config

    * check errs properly

    * link validation to add-chain

    * fix up add-chain e2e tests

    * simplify test side effect handling

    * don't bother cleaning up -test genesis validation inputs

    (They now don't end up bound into the validation package)

    * tweak spacing

    * prefer os.ModePerm over 0o777

    * typo

    * typo

    * remove unused params

    * use commented constants for metadata defaults

    * fix clean-add-chain cmd

commit bae89c0
Author: George Knee <[email protected]>
Date:   Thu Aug 22 13:35:38 2024 +0100

    Get mode, metal and zora genesis.allocs validation working (#496)

    * introduce node_version

    need to reexamine writeDeploymentsLegacy

    * fix bug in writeDeploymentsLegacy

    * fix declaration of legacy deployments and add note

    * improve diff

    * use hardhat Deployment type to pad data and avoid unmarshaling errors

    e.g. on mode

    * fix writeDeploymentsLegacy, mode now validates!

    * remove note

    * introduce  GenesisCreationCommand mapping

    allows metadata file to choose from a list and have chainId automatically injected into command

    * introduce BuilldCommand mapping

    * op sepolia validates

    * remove UseLegacyDeploymentsFormat

    * remove op mainnet metadata for now

    * remove op sepolia (it doesn't validate yet)

    * echo nvm version

    * just codegen

    * load nvm

    * fix

    * try installing nvm in a step

    * require node_version to be set

    * just lint-all

    * attempt to patch genesis creation source code

     to make validation work at a wider range of commits

    * adds metal metadata -- validates!

    * add zora metadata -- validates!

commit 11982b8
Author: geoknee <[email protected]>
Date:   Tue Aug 20 13:33:49 2024 +0100

    introduce boolean switch for using legacy deployments format

commit 96b1810
Author: geoknee <[email protected]>
Date:   Tue Aug 20 13:29:39 2024 +0100

    linting

commit 6dbc88e
Author: geoknee <[email protected]>
Date:   Tue Aug 20 13:28:14 2024 +0100

    no need to install just

commit e28ca59
Author: geoknee <[email protected]>
Date:   Tue Aug 20 13:26:47 2024 +0100

    install nvm

commit ab4ceba
Author: geoknee <[email protected]>
Date:   Tue Aug 20 13:22:38 2024 +0100

    try removing source command

commit f5de7e7
Author: geoknee <[email protected]>
Date:   Tue Aug 20 13:14:32 2024 +0100

    introduce monorepoBuildCommand artifact

commit 0516b9e
Author: geoknee <[email protected]>
Date:   Tue Aug 20 13:03:17 2024 +0100

    4801 passes

commit d1fbbaa
Author: geoknee <[email protected]>
Date:   Tue Aug 20 13:01:19 2024 +0100

    add nvm

commit ab1b6e8
Author: geoknee <[email protected]>
Date:   Tue Aug 20 12:46:50 2024 +0100

    change format of genesis creation command

commit ccbe3da
Author: geoknee <[email protected]>
Date:   Tue Aug 20 12:00:38 2024 +0100

    some small fixes

    chain 480 passes!

commit 65a80dd
Author: geoknee <[email protected]>
Date:   Tue Aug 20 11:38:47 2024 +0100

    add worldchain

commit d1aa945
Author: geoknee <[email protected]>
Date:   Tue Aug 20 11:29:17 2024 +0100

    add sepolia/worldcoin

commit 4b4ab94
Author: geoknee <[email protected]>
Date:   Tue Aug 20 11:24:05 2024 +0100

    fix ci config

commit 858d754
Author: geoknee <[email protected]>
Date:   Mon Aug 19 19:27:47 2024 +0100

    undo accidental changes

commit f99b396
Author: geoknee <[email protected]>
Date:   Mon Aug 19 19:21:40 2024 +0100

    add genesis predeploy test, validation metadata for chains 10,34443 and wire up

commit 5ec1a6f
Author: geoknee <[email protected]>
Date:   Mon Aug 19 17:49:46 2024 +0100

    fix go.work version declaration
  • Loading branch information
geoknee committed Sep 2, 2024
1 parent 0263489 commit 3e63a47
Show file tree
Hide file tree
Showing 44 changed files with 1,618 additions and 236 deletions.
235 changes: 16 additions & 219 deletions .circleci/continue-config.yml
Original file line number Diff line number Diff line change
@@ -1,230 +1,27 @@
version: 2.1

orbs:
go: circleci/[email protected]
node: circleci/[email protected]
slack: circleci/[email protected]

commands:
notify-failures-on-main:
description: "Notify Slack for CI job failures"
parameters:
channel:
type: string
steps:
- slack/notify:
channel: << parameters.channel >>
event: fail
template: basic_fail_1
branch_pattern: main
install-just:
description: "Install just"
steps:
- run:
name: "Install just"
command: |
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update
sudo apt install just
install-foundry:
description: "Installs foundry"
steps:
- run:
# need foundry to execute 'cast call' within add-chain script
name: Install foundry
command: |
echo "SHELL=$SHELL"
# Set up directory structure
mkdir -p $HOME/.foundry/bin
echo 'export PATH="$HOME/.foundry/bin:$PATH"' >> $BASH_ENV
source $BASH_ENV
# Download foundryup and make it executable
curl -sSL "https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup" -o $HOME/.foundry/bin/foundryup
chmod +x $HOME/.foundry/bin/foundryup
# this allows us to use CircleCI's dynamic configuration feature
setup: true

$HOME/.foundry/bin/foundryup
forge --version
orbs:
continuation: circleci/[email protected]

jobs:
golang-lint:
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- install-just
- run: just lint-all
- run:
name: check git tree is clean
command: git diff --exit-code
golang-modules-tidy:
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- install-just
- run: just tidy-all
- run:
name: check git tree is clean
command: git diff --exit-code
golang-test:
shell: /bin/bash -eo pipefail
executor:
name: go/default # is based on cimg/go
tag: '1.21'
setup-genesis-allocs-validation:
macos:
xcode: 14.2.0
resource_class: macos.m1.medium.gen1
steps:
- checkout
- install-just
- install-foundry
- run:
name: run superchain module unit tests
command: just test-superchain
- run:
name: run validation module unit tests
command: just test-validation
- run:
name: run add-chain module unit tests
command: just test-add-chain
- notify-failures-on-main:
channel: C03N11M0BBN # to slack channel `notify-ci-failures`
golang-validate-modified:
shell: /bin/bash -eo pipefail
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- install-just
- install-foundry
- run:
name: run validation checks
command: just validate-modified-chains main # TODO ideally this is the base branch
golang-validate-all:
shell: /bin/bash -eo pipefail
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- install-just
- install-foundry
- run:
name: run validation checks on all chains
command: just validate "*"
- notify-failures-on-main:
channel: C07GQQZDW1G # to slack channel `notify-superchain-validation-failures`
golang-promotion-test:
shell: /bin/bash -eo pipefail
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- install-just
- install-foundry
- run:
name: run validation checks
command: just promotion-test
- slack/notify:
event: always
custom: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":control_knobs: The daily report on standard candidate chains is ready!"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "👀 View Report",
"emoji": true
},
"url": "${CIRCLE_BUILD_URL}"
}
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Click the link to see what validation checks would fail if all candidate chains were promoted to standard (and exclusions removed)."
}
]
}
]
}
channel: C07GZVCCUS0 # to slack channel `notify-superchain-promotion-failures`
publish-bot:
environment:
NODE_AUTH_TOKEN: $NPM_TOKEN # Use NPM_TOKEN as the auth token
docker:
- image: cimg/node:18 # Use Node.js 18
steps:
- checkout
- run:
name: Set deployment token
command: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
- env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run:
name: Build and publish package on NPM 📦
command: pnpm release
check-codegen:
executor:
name: go/default # is based on cimg/go
tag: '1.21'
steps:
- checkout
- install-just
- run:
name: Run codegen
command: just codegen
- run:
name: check git tree is clean
command: git diff --exit-code
name: Generate list of chainids and insert into continue_config.yml file
command: |
bash validation/genesis/validation-inputs/generate-test-config.sh
- continuation/continue:
configuration_path: .circleci/continue_config.yml
parameters: '{}'

workflows:
hourly:
jobs:
- golang-validate-all:
context:
- slack
- golang-test:
context:
- slack
triggers:
- schedule:
cron: "0 * * * *"
filters:
branches:
only:
- main
nightly:
jobs:
- golang-promotion-test:
context:
- slack
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- main
pr-checks:
setup:
jobs:
- golang-lint
- golang-modules-tidy
- golang-test
- golang-validate-modified
- check-codegen
- setup-genesis-allocs-validation
Loading

0 comments on commit 3e63a47

Please sign in to comment.