-
Notifications
You must be signed in to change notification settings - Fork 370
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
feat(foundry): publish L2 state in @celo/devchain-anvil
#11107
feat(foundry): publish L2 state in @celo/devchain-anvil
#11107
Commits on Jul 3, 2024
-
refactor(scripts/foundry): moves
run_e2e_tests...sh
fileSmall house-keeping change to keep Foundry-related bash scripts organised in a single directory. This script doesn't seem to be called from anywhere, and doesn't have a yarn command in `package.json` so it was fine to move it without any changes in other files.
Configuration menu - View commit details
-
Copy full SHA for 17dc558 - Browse repository at this point
Copy the full SHA 17dc558View commit details -
feat(package.json): adds yarn commands for e2e and integration tests
Two helper commands to run two Foundry-related bash scripts during local development.
Configuration menu - View commit details
-
Copy full SHA for 7ec412e - Browse repository at this point
Copy the full SHA 7ec412eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ccb8962 - Browse repository at this point
Copy the full SHA ccb8962View commit details -
feat(scripts/foundry): adds MVP L2 migration script
Successfully deploys bytecode to `proxyAdminAddress`. Does not yet dump state correctly, or call functions to active L2 correctly.
Configuration menu - View commit details
-
Copy full SHA for d772383 - Browse repository at this point
Copy the full SHA d772383View commit details -
feat(package.json): adds two helper yarn commands
1. `anvil-devchain:start-L2`: which creates and migrates an L2 devchain 2. `anvil-devchain:check-is-running`: which can be used to check that an anvil instance is running locally and serving at localhost:8546
Configuration menu - View commit details
-
Copy full SHA for 4a6b28a - Browse repository at this point
Copy the full SHA 4a6b28aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 884523e - Browse repository at this point
Copy the full SHA 884523eView commit details
Commits on Jul 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6c50678 - Browse repository at this point
Copy the full SHA 6c50678View commit details -
feat(scripts/foundry): activates CeloDistributionSchedule
Now successfully activates CeloDistributionSchedule. Does not yet dump state correctly
Configuration menu - View commit details
-
Copy full SHA for 651c9b7 - Browse repository at this point
Copy the full SHA 651c9b7View commit details -
refactor(scripts/foundry): moves variables to
constants.sh
Simplifies maintenance and readability of scripts.
Configuration menu - View commit details
-
Copy full SHA for 1b90853 - Browse repository at this point
Copy the full SHA 1b90853View commit details -
refactor(scripts/foundry): moves more variables to
constants.sh
Simplifies maintenance and readability of scripts.
Configuration menu - View commit details
-
Copy full SHA for 4a7606b - Browse repository at this point
Copy the full SHA 4a7606bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2fc22ef - Browse repository at this point
Copy the full SHA 2fc22efView commit details -
chore(scripts/foundry): adds TODO comment
At this point, the migration works as intended and the L2 is activated. But, I haven't yet saved the devchain state file. I'll need to refactor the way the L1 and L2 move the state file around.
Configuration menu - View commit details
-
Copy full SHA for 7315121 - Browse repository at this point
Copy the full SHA 7315121View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ea0477 - Browse repository at this point
Copy the full SHA 3ea0477View commit details
Commits on Jul 5, 2024
-
refactor(scripts/foundry): rename to `create_and_migrate_anvil_l2_dev…
…chain.sh` To keep it consistent with the L1 script
Configuration menu - View commit details
-
Copy full SHA for 563ec74 - Browse repository at this point
Copy the full SHA 563ec74View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5c8bf0 - Browse repository at this point
Copy the full SHA a5c8bf0View commit details -
Configuration menu - View commit details
-
Copy full SHA for fca75d4 - Browse repository at this point
Copy the full SHA fca75d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 209ca83 - Browse repository at this point
Copy the full SHA 209ca83View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4671eb - Browse repository at this point
Copy the full SHA e4671ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 92c1dd8 - Browse repository at this point
Copy the full SHA 92c1dd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed9a6c0 - Browse repository at this point
Copy the full SHA ed9a6c0View commit details -
fix(constants): adds
$PWD
to prevent errors on CIOn CI it seems like `jq` doesn't find the artifacts without an explicit path ```sh ./scripts/foundry/create_and_migrate_anvil_devchain.sh shell: /usr/bin/bash -e {0} env: FOUNDRY_CACHE_KEY: 2 SUPPORTED_FOUNDRY_VERSION: nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9 ANVIL_PORT: 8546 jq: error: Could not open file build/contracts/Registry.json: No such file or directory jq: error: Could not open file build/contracts/Proxy.json: No such file or directory ``` Source: https://github.com/celo-org/celo-monorepo/actions/runs/9808280627/job/27083755032#step:18:9
Configuration menu - View commit details
-
Copy full SHA for 9e04ad9 - Browse repository at this point
Copy the full SHA 9e04ad9View commit details -
chore(workflows): debugging
jq
error on CICan't find build artifacts on CI, so trying to work out what might be wrong.
Configuration menu - View commit details
-
Copy full SHA for ad5d1ba - Browse repository at this point
Copy the full SHA ad5d1baView commit details -
fix(constants): moves bytecode operation back into scripts
Since the constants are read before any foundry compilation occured, the constants can't read from the Foundry artifacts. Locally, I missed this because I had existing artifacts from previous compilations.
Configuration menu - View commit details
-
Copy full SHA for 9215e50 - Browse repository at this point
Copy the full SHA 9215e50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 05f3532 - Browse repository at this point
Copy the full SHA 05f3532View commit details -
fix(scripts/foundry): uses Foundry
out/
directoryMistakenly read artifacts from Truffle's `build/` directory. Took a while to remember that Foundry write artifacts to `out/`. Source: https://book.getfoundry.sh/reference/forge/forge-build#build-modes
Configuration menu - View commit details
-
Copy full SHA for 95d5a6d - Browse repository at this point
Copy the full SHA 95d5a6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for dea18dd - Browse repository at this point
Copy the full SHA dea18ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e60f18 - Browse repository at this point
Copy the full SHA 5e60f18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 05579f6 - Browse repository at this point
Copy the full SHA 05579f6View commit details -
chore(workflows): add back NPM install step
Not confident enough to remove it in this PR.
Configuration menu - View commit details
-
Copy full SHA for c505eba - Browse repository at this point
Copy the full SHA c505ebaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 276b569 - Browse repository at this point
Copy the full SHA 276b569View commit details -
feat(workflows): publishes L1 and L2 state
Also updates integration test to explicitly run against L1 devchain, and not L2 devchain.
Configuration menu - View commit details
-
Copy full SHA for 1e4cc56 - Browse repository at this point
Copy the full SHA 1e4cc56View commit details -
fix(scripts/foundry): remove unnecessary
stop_anvil
callCI doesn't like `lsof` command in `stop_anvil.sh` ```sh /runner/_work/celo-monorepo/celo-monorepo/packages/protocol/scripts/foundry/stop_anvil.sh: line 10: lsof: command not found kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] ``` Source: https://github.com/celo-org/celo-monorepo/actions/runs/9811181588/job/27092901761?pr=11107#step:19:7073
Configuration menu - View commit details
-
Copy full SHA for 6311800 - Browse repository at this point
Copy the full SHA 6311800View commit details -
refactor(workflows): replace CI env with variable from
constants.sh
Simplifies code and makes it easier to update ports in a single place.
Configuration menu - View commit details
-
Copy full SHA for ec192f3 - Browse repository at this point
Copy the full SHA ec192f3View commit details -
fix(workflows): adds back
stop_anvil.sh
and installslsof
explicitlyCI fails if I don't explicitly kill an existing anvil server, so I decided to install `lsof` which is used by `stop_anvil.sh` to kill processes. ```sh error binding to 127.0.0.1:8546: error creating server listener: Address already in use (os error 98) ``` Source: https://github.com/celo-org/celo-monorepo/actions/runs/9811346558/job/27093342967?pr=11107#step:20:30
Configuration menu - View commit details
-
Copy full SHA for 58a1fd0 - Browse repository at this point
Copy the full SHA 58a1fd0View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa243ca - Browse repository at this point
Copy the full SHA fa243caView commit details
Commits on Jul 8, 2024
-
fix(workflows): install
lsof
in the same stepNot sure if that's the bug, but the last run where the installation and use was in different steps didn't work.
Configuration menu - View commit details
-
Copy full SHA for ab7f5d0 - Browse repository at this point
Copy the full SHA ab7f5d0View commit details -
fix(workflows): hacky fix to run L2 anvil
I'm struggling to terminate the previous anvil server and re-start a new anvil server at the same address (local host 8546). I tried to work around cumbersome CI environment issues (`lsof` which we use to identify the process is not available on CI). For now, as a quick fix, I'll start anvil at an arbitrary different port 8547 and run the test against that localhost 8547. I'll need to refactor this better.
Configuration menu - View commit details
-
Copy full SHA for 28464b6 - Browse repository at this point
Copy the full SHA 28464b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d29b220 - Browse repository at this point
Copy the full SHA d29b220View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd6ca05 - Browse repository at this point
Copy the full SHA cd6ca05View commit details -
fix(workflows): hacky workaround to prevent Anvil bug when loading state
Starting L1 from scratch instead of JSON state to circumvent this Anvil bug foundry-rs/foundry#7502.
Configuration menu - View commit details
-
Copy full SHA for a906048 - Browse repository at this point
Copy the full SHA a906048View commit details
Commits on Jul 12, 2024
-
Update .github/workflows/protocol-devchain-anvil.yml
Co-authored-by: soloseng <102702451+soloseng@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for b88b337 - Browse repository at this point
Copy the full SHA b88b337View commit details -
Update .github/workflows/protocol-devchain-anvil.yml
Co-authored-by: soloseng <102702451+soloseng@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for ff291e0 - Browse repository at this point
Copy the full SHA ff291e0View commit details -
feat(constants): set CeloDistributionSchedule initial balance to 700M…
… CELO Arbitrary amount chosen to be approximately equal to `GoldToken.totalSupply()` on the L1 Mainnet (695,313,643 CELO as of this commit). During the real L2 genesis, the VM will calculate and set an appropriate balance. ```sh # Get address of GoldToken $ cast call \ 0x000000000000000000000000000000000000ce10 \ "getAddressForStringOrDie(string calldata identifier)(address)" \ "GoldToken" \ --rpc-url https://forno.celo.org 0x471EcE3750Da237f93B8E339c536989b8978a438 # Call `totalSupply()` on `GoldToken.sol` $ cast call \ 0x471EcE3750Da237f93B8E339c536989b8978a438 \ "totalSupply()(uint256)" \ --rpc-url https://forno.celo.org 695313643195035937058427065 [6.953e26] # Convert units from wei to ether $ cast to-unit 695313643195035937058427065 ether 695313643.195035937058427065 ```
Configuration menu - View commit details
-
Copy full SHA for 06e7fe7 - Browse repository at this point
Copy the full SHA 06e7fe7View commit details -
More context, examples, background, files in the package.
Configuration menu - View commit details
-
Copy full SHA for 85895b5 - Browse repository at this point
Copy the full SHA 85895b5View commit details