Skip to content
Merged
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
9 changes: 1 addition & 8 deletions .github/workflows/git-clean.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Git is clean
on: [push]

concurrency:
group: ${{ github.ref }}-git-clean
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
git-clean:
runs-on: ubuntu-latest
Expand All @@ -13,7 +11,6 @@ jobs:
with:
submodules: recursive
fetch-depth: 0

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
Expand All @@ -30,15 +27,11 @@ jobs:
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G

# Build metas etc. required to do a correct pointer build.
- run: nix develop -c i9r-prelude

- run: nix develop -c rainlang-prelude
- run: nix develop -c forge script ./script/BuildPointers.sol

# Format the repo after generating pointers so that the pointer files are
# formatted too.
- run: nix develop -c forge fmt

# Check if the repo is clean after generating pointers and formatting.
- run: git diff --exit-code
9 changes: 2 additions & 7 deletions .github/workflows/manual-sol-artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- interpreter
- expression-deployer
- rainlang

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -21,7 +20,6 @@ jobs:
with:
submodules: recursive
fetch-depth: 0

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
Expand All @@ -38,24 +36,21 @@ jobs:
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G

- run: nix develop --command rainix-sol-prelude
- run: nix develop --command rainix-rs-prelude
- run: nix develop --command i9r-prelude
- run: nix develop --command rainlang-prelude
- run: nix develop -c forge selectors up --all
- run: nix develop -c forge script script/Deploy.sol:Deploy -vvvvv --slow --broadcast --verify
env:
DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }}
DEPLOYMENT_SUITE: ${{ inputs.suite }}

CI_DEPLOY_ARBITRUM_RPC_URL: ${{ secrets.CI_DEPLOY_ARBITRUM_RPC_URL || vars.CI_DEPLOY_ARBITRUM_RPC_URL || '' }}
CI_DEPLOY_BASE_RPC_URL: ${{ secrets.CI_DEPLOY_BASE_RPC_URL || vars.CI_DEPLOY_BASE_RPC_URL || '' }}
CI_DEPLOY_BASE_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_BASE_SEPOLIA_RPC_URL || vars.CI_DEPLOY_BASE_SEPOLIA_RPC_URL || '' }}
CI_DEPLOY_FLARE_RPC_URL: ${{ secrets.CI_DEPLOY_FLARE_RPC_URL || vars.CI_DEPLOY_FLARE_RPC_URL || '' }}
CI_DEPLOY_POLYGON_RPC_URL: ${{ secrets.CI_DEPLOY_POLYGON_RPC_URL || vars.CI_DEPLOY_POLYGON_RPC_URL || '' }}

CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY || vars.CI_DEPLOY_ARBITRUM_ETHERSCAN_API_KEY || '' }}
CI_DEPLOY_BASE_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_BASE_ETHERSCAN_API_KEY || vars.CI_DEPLOY_BASE_ETHERSCAN_API_KEY || '' }}
CI_DEPLOY_BASE_SEPOLIA_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_BASE_SEPOLIA_ETHERSCAN_API_KEY || vars.CI_DEPLOY_BASE_SEPOLIA_ETHERSCAN_API_KEY || '' }}
CI_DEPLOY_FLARE_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_FLARE_ETHERSCAN_API_KEY || vars.CI_DEPLOY_FLARE_ETHERSCAN_API_KEY || '' }}
CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY || vars.CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY || '' }}
CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY: ${{ secrets.CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY || vars.CI_DEPLOY_POLYGON_ETHERSCAN_API_KEY || '' }}
6 changes: 1 addition & 5 deletions .github/workflows/rainix.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Rainix CI
on: [push]

concurrency:
group: ${{ github.ref }}-rainix
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
rainix:
strategy:
Expand Down Expand Up @@ -32,7 +30,6 @@ jobs:
with:
submodules: recursive
fetch-depth: 0

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
Expand All @@ -49,10 +46,9 @@ jobs:
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G

- run: nix develop -c rainix-sol-prelude
- run: nix develop -c rainix-rs-prelude
- run: nix develop -c i9r-prelude
- run: nix develop -c rainlang-prelude
- name: Run ${{ matrix.task }}
env:
ETH_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }}
Expand Down
9 changes: 5 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ the nix shell via direnv.
```bash
nix develop -c rainix-sol-prelude
nix develop -c rainix-rs-prelude
nix develop -c i9r-prelude
nix develop -c rainlang-prelude
```

`i9r-prelude` generates metadata files needed by the Solidity build (runs
`rainlang-prelude` generates metadata files needed by the Solidity build (runs
`BuildAuthoringMeta.sol`, then `rain meta build` to produce CBOR-encoded
deflated meta).

Expand Down Expand Up @@ -52,7 +52,7 @@ nix develop -c cargo doc # Rust docs
### Build Pipeline

1. `BuildAuthoringMeta.sol` exports raw ABI-encoded authoring meta to `meta/`
2. `i9r-prelude` runs `rain meta build` to CBOR-encode and deflate the meta
2. `rainlang-prelude` runs `rain meta build` to CBOR-encode and deflate the meta
3. `nix develop -c forge script --silent ./script/BuildPointers.sol` deploys
contracts in local EVM, extracts function pointer tables, and writes
`src/generated/*.pointers.sol`
Expand All @@ -65,7 +65,8 @@ The `src/generated/` directory contains build-time generated constants (bytecode
hashes, function pointer tables, parse meta). These are regenerated by
`BuildPointers.sol`.

After any source change affecting bytecode: run `nix develop -c i9r-prelude` →
After any source change affecting bytecode: run
`nix develop -c rainlang-prelude` →
`nix develop -c forge script --silent ./script/BuildPointers.sol` →
`nix develop -c forge fmt`, then run `LibInterpreterDeployTest` to get new
deploy addresses/codehashes. Update `LibInterpreterDeploy.sol` and repeat until
Expand Down
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
in
rec {
packages = rec {
i9r-prelude = rainix.mkTask.${system} {
name = "i9r-prelude";
rainlang-prelude = rainix.mkTask.${system} {
name = "rainlang-prelude";
body = ''
set -euxo pipefail

Expand Down Expand Up @@ -66,7 +66,7 @@
devShells.default = pkgs.mkShell {
inherit (rainix.devShells.${system}.default) shellHook;
packages = [
packages.i9r-prelude
packages.rainlang-prelude
packages.test-wasm-build
];
inputsFrom = [ rainix.devShells.${system}.default ];
Expand Down
4 changes: 2 additions & 2 deletions script/BuildAuthoringMeta.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import {LibRainlangReferenceExtern} from "../src/concrete/extern/RainlangReferen

/// @title BuildAuthoringMeta
/// @notice Forge script that writes raw ABI-encoded AuthoringMeta bytes to
/// disk for each parser. The output files are consumed by the `i9r-prelude`
/// disk for each parser. The output files are consumed by the `rainlang-prelude`
/// meta build pipeline which deflates and cbor-encodes them.
contract BuildAuthoringMeta is Script {
/// Writes raw ABI-encoded authoring meta bytes to disk for both the
/// standard ops and the reference extern. The output files are consumed
/// by the `i9r-prelude` meta build pipeline to produce the final
/// by the `rainlang-prelude` meta build pipeline to produce the final
/// deflated/cbor-encoded meta.
function run() external {
vm.writeFileBinary("meta/AuthoringMeta.rain.meta", LibAllStandardOps.authoringMetaV2());
Expand Down
Loading