From 3d30f68e43f85ba56d5d420374367655df920023 Mon Sep 17 00:00:00 2001 From: David Meister Date: Sun, 31 May 2026 15:34:59 +0000 Subject: [PATCH 1/3] ci: update rainix to latest (rainlanguage org) Point the flake input at github:rainlanguage/rainix (was the legacy rainprotocol org) and re-lock to the latest rainix. Drop the now-dead pkgs let-binding and the unused self arg (via ...) so the touched flake passes deadnix/nixfmt. All 55 receipt tests pass under the updated toolchain. Co-Authored-By: Claude Opus 4.8 --- flake.lock | 69 ++++++++++++++++++++---------------------------------- flake.nix | 20 +++++++--------- 2 files changed, 34 insertions(+), 55 deletions(-) diff --git a/flake.lock b/flake.lock index 6d95c8b4..2c7fa76e 100644 --- a/flake.lock +++ b/flake.lock @@ -91,11 +91,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1773213477, - "narHash": "sha256-Pv1Z3QqGkSGEUV+9pM5vYIiI7VJo7Tfm6ZmR+JSp1zo=", + "lastModified": 1778486972, + "narHash": "sha256-iuy/TbK9AbghEld2VSFuxyAF30LkOGUUdtrvixLfE7M=", "owner": "shazow", "repo": "foundry.nix", - "rev": "3c73daa86c823d706824fd9bbcb85aa23fd0f668", + "rev": "db117ae95a77b9ead24137c3ccb28896ae4fa4ec", "type": "github" }, "original": { @@ -111,11 +111,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1774104215, - "narHash": "sha256-EAtviqz0sEAxdHS4crqu7JGR5oI3BwaqG0mw7CmXkO8=", + "lastModified": 1778507602, + "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "f799ae951fde0627157f40aec28dec27b22076d0", + "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", "type": "github" }, "original": { @@ -160,22 +160,6 @@ "type": "indirect" } }, - "nixpkgs-old": { - "locked": { - "lastModified": 1749104371, - "narHash": "sha256-m2NmOPd6XgBiskmUq/BS9Xxuf3z0ebnGVfSKNAO5NEM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "48975d7f9b9960ed33c4e8561bcce20cc0c2de5b", - "type": "github" - } - }, "nixpkgs_2": { "locked": { "lastModified": 1770073757, @@ -194,11 +178,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1776017067, - "narHash": "sha256-oEp8fqJweZd5doqvH/aBAtc6NzZh+fh0tOhR09gQXck=", + "lastModified": 1778656924, + "narHash": "sha256-lKVrom9wOmpC3i7m+uBoGaBdW0PfH3QbLRG1XmuC6YA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a5a7cf16648d79134eb4da0e3354b08913917b2f", + "rev": "4ba039de0909446943c07e2b42bd2f0f4507072e", "type": "github" }, "original": { @@ -225,11 +209,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1771923393, - "narHash": "sha256-Fy0+UXELv9hOE8WjYhJt8fMDLYTU2Dqn3cX4BwoGBos=", + "lastModified": 1777641297, + "narHash": "sha256-WNGcmeOZ8Tr9dq6ztCspYbzWFswr2mPebM9LpsfGxPk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ea7f1f06811ce7fcc81d6c6fd4213150c23edcf2", + "rev": "c6d65881c5624c9cae5ea6cedef24699b0c0a4c0", "type": "github" }, "original": { @@ -245,20 +229,19 @@ "foundry": "foundry", "git-hooks-nix": "git-hooks-nix", "nixpkgs": "nixpkgs_3", - "nixpkgs-old": "nixpkgs-old", "rust-overlay": "rust-overlay", "solc": "solc" }, "locked": { - "lastModified": 1776019532, - "narHash": "sha256-0aMnHCZ2fR0+ZwuRHFouYYUQqYL/dSp5cOgka0m6vE4=", - "owner": "rainprotocol", + "lastModified": 1780154135, + "narHash": "sha256-dzfWTnq+80nLKHkwvbBcEIIJylABaxQShsok8nU0GLM=", + "owner": "rainlanguage", "repo": "rainix", - "rev": "9babaac787d1e1119609b0d89c33a6b42249c066", + "rev": "81c6e4e3556abcbad30f51ef46481d01a672adbf", "type": "github" }, "original": { - "owner": "rainprotocol", + "owner": "rainlanguage", "repo": "rainix", "type": "github" } @@ -274,11 +257,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1773216618, - "narHash": "sha256-iZlowevS+xKLGOXtZwpIrz3SWe7PtoGUfEeVZNib+WE=", + "lastModified": 1778642276, + "narHash": "sha256-bhk4lawR4ZnFhPtamB5WkCyvfgyZmsEUbWfT/3FRxFY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "07d7dc6fcc5eae76b4fb0e19d4afd939437bec97", + "rev": "77265d2dc1e61b2abfd3b1d6609dbb66fe75e0a5", "type": "github" }, "original": { @@ -294,11 +277,11 @@ "solc-macos-amd64-list-json": "solc-macos-amd64-list-json" }, "locked": { - "lastModified": 1772085240, - "narHash": "sha256-+NEcuhT2A0QQumVx9Ze6g2iuNicyuW028Jq/HUJHGh4=", + "lastModified": 1777817996, + "narHash": "sha256-iI71iUhD7THLibl3w1JcQEhHmTwZMxChi70RTe33BAo=", "owner": "hellwolf", "repo": "solc.nix", - "rev": "d3cc119973e484ea366f4b997b404bb00d7829ca", + "rev": "e3cf898cb804d5c0e5474b378a300fe8942e67d6", "type": "github" }, "original": { @@ -310,13 +293,13 @@ "solc-macos-amd64-list-json": { "flake": false, "locked": { - "narHash": "sha256-oEiXc95EghuYCudzkPA9XBFOnMdgWFfTO2/4XUfSTpc=", + "narHash": "sha256-zzwwHA2qPotv7yp8mK7+y9BZhm7ytuFeCJVvKBBdBn4=", "type": "file", - "url": "https://github.com/argotorg/solc-bin/raw/83cb756/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/902dfaf/macosx-amd64/list.json" }, "original": { "type": "file", - "url": "https://github.com/argotorg/solc-bin/raw/83cb756/macosx-amd64/list.json" + "url": "https://github.com/argotorg/solc-bin/raw/902dfaf/macosx-amd64/list.json" } }, "systems": { diff --git a/flake.nix b/flake.nix index 6666f8c1..cfe58fd7 100644 --- a/flake.nix +++ b/flake.nix @@ -2,18 +2,14 @@ description = "Flake for development workflows."; inputs = { - rainix.url = "github:rainprotocol/rainix"; + rainix.url = "github:rainlanguage/rainix"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = {self, flake-utils, rainix }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = rainix.pkgs.${system}; - in { - packages = rainix.packages.${system}; - devShells = rainix.devShells.${system}; - } - ); - -} \ No newline at end of file + outputs = + { flake-utils, rainix, ... }: + flake-utils.lib.eachDefaultSystem (system: { + packages = rainix.packages.${system}; + devShells = rainix.devShells.${system}; + }); +} From 48f038983c10ea214b5a274224e17c6cc04b57b7 Mon Sep 17 00:00:00 2001 From: David Meister Date: Sun, 31 May 2026 19:13:22 +0000 Subject: [PATCH 2/3] ci: remove vestigial manual-sol-artifacts workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rain.vats is a library — it has no deployments of its own (consumers like st0x and cyclo deploy the contracts). The workflow invoked rainix-sol-artifacts against a script/Deploy.sol that no longer exists, so it deployed nothing. The remaining workflows (rainix.yaml, publish-soldeer.yaml) already use rainix reusables. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/manual-sol-artifacts.yaml | 111 -------------------- 1 file changed, 111 deletions(-) delete mode 100644 .github/workflows/manual-sol-artifacts.yaml diff --git a/.github/workflows/manual-sol-artifacts.yaml b/.github/workflows/manual-sol-artifacts.yaml deleted file mode 100644 index ea554456..00000000 --- a/.github/workflows/manual-sol-artifacts.yaml +++ /dev/null @@ -1,111 +0,0 @@ -name: Manual sol artifacts -on: - workflow_dispatch: - inputs: - network: - description: 'Network to deploy to' - required: true - type: choice - options: - - arbitrum - - arbitrum_sepolia - - avalanche - - base - - base_sepolia - - bsc - - ethereum - - flare - - mumbai - - oasis_sapphire - - polygon - - sepolia - - songbird - - amoy - - epn - - suite: - description: 'Suite to deploy' - required: true - type: choice - options: - - ownable-oracle-vault - - sceptre-staked-flare-price-vault - - implementations - - receipt-vault-asset: - description: 'Asset that is deposited into deployed receipt vault.' - required: false - type: string - - receipt-vault-name: - description: 'Name of the share token for the deployed receipt vault.' - required: false - type: string - - receipt-vault-symbol: - description: 'Symbol of the share token for the deployed receipt vault.' - required: false - type: string - - owner: - description: 'Owner of any ownable contracts deployed.' - required: false - type: string - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - run: | - network=${{ inputs.network }} - echo "clone_factory_name=CI_DEPLOY_${network^^}_CLONE_FACTORY_ADDRESS" >> $GITHUB_ENV - echo "erc20_price_oracle_vault_implementation_name=CI_DEPLOY_${network^^}_ERC20_PRICE_ORACLE_VAULT_IMPLEMENTATION_ADDRESS" >> $GITHUB_ENV - - echo "etherscan_api_key_secret_name=CI_DEPLOY_${network^^}_ETHERSCAN_API_KEY" >> $GITHUB_ENV - echo "rpc_secret_name=CI_DEPLOY_${network^^}_RPC_URL" >> $GITHUB_ENV - echo "verify_secret_name=CI_DEPLOY_${network^^}_VERIFY" >> $GITHUB_ENV - echo "verifier_secret_name=CI_DEPLOY_${network^^}_VERIFIER" >> $GITHUB_ENV - echo "verifier_url_secret_name=CI_DEPLOY_${network^^}_VERIFIER_URL" >> $GITHUB_ENV - echo "metaboard_address_secret_name=CI_DEPLOY_${network^^}_METABOARD_ADDRESS" >> $GITHUB_ENV - - - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - - - uses: nixbuild/nix-quick-install-action@v30 - with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G - - - name: deploy to ${{ inputs.network }} - run: nix develop -c rainix-sol-artifacts - env: - DEPLOYMENT_SUITE: ${{ inputs.suite }} - RECEIPT_VAULT_ASSET: ${{ inputs.receipt-vault-asset || '' }} - RECEIPT_VAULT_NAME: ${{ inputs.receipt-vault-name || '' }} - RECEIPT_VAULT_SYMBOL: ${{ inputs.receipt-vault-symbol || '' }} - OWNER_ADDRESS: ${{ inputs.owner || '' }} - CLONE_FACTORY : ${{ vars[env.clone_factory_name] || '' }} - SCEPTRE_STAKED_FLR_ADDRESS: ${{ vars.SCEPTRE_STAKED_FLR_ADDRESS || '' }} - ERC20_PRICE_ORACLE_VAULT_IMPLEMENTATION: ${{ vars[env.erc20_price_oracle_vault_implementation_name] || '' }} - DEPLOY_BROADCAST: '1' - DEPLOYMENT_KEY: ${{ github.ref == 'refs/heads/main' && secrets.PRIVATE_KEY || secrets.PRIVATE_KEY_DEV }} - ETH_RPC_URL: ${{ secrets[env.rpc_secret_name] || vars[env.rpc_secret_name] || '' }} - ETHERSCAN_API_KEY: ${{ secrets[env.etherscan_api_key_secret_name] || vars[env.etherscan_api_key_secret_name] || ''}} - DEPLOY_VERIFY: ${{ secrets[env.verify_secret_name] || vars[env.verify_secret_name] || '' }} - DEPLOY_VERIFIER: ${{ secrets[env.verifier_secret_name] || vars[env.verifier_secret_name] || '' }} - DEPLOY_VERIFIER_URL: ${{ secrets[env.verifier_url_secret_name] || vars[env.verifier_url_secret_name] || '' }} - DEPLOY_METABOARD_ADDRESS: ${{ secrets[env.metaboard_address_secret_name] || vars[env.metaboard_address_secret_name] || '' }} From ad7a37b1096c524758b272663ec9956af8957ada Mon Sep 17 00:00:00 2001 From: David Meister Date: Sun, 31 May 2026 19:33:34 +0000 Subject: [PATCH 3/3] test: make Pyth prod test robust to oracle liveness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit testPythGetPriceNoOlderThan forked at latest with a 1h staleness window, so it reverted StalePrice whenever Pyth's pull-oracle BTC/USD price on Arbitrum hadn't been pushed within the hour — a pre-existing flake unrelated to the toolchain (an on-chain stored price; the forge version can't change it). The test only pins the live IPyth ABI / return decoding, not freshness, so widen the window to effectively unbounded. Pinning a fork block was rejected: it needs a full-archive RPC (public RPCs return 'missing trie node'). Co-Authored-By: Claude Opus 4.8 --- test/prod/PythInterfaceProd.t.sol | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/prod/PythInterfaceProd.t.sol b/test/prod/PythInterfaceProd.t.sol index 5e824cb7..270205be 100644 --- a/test/prod/PythInterfaceProd.t.sol +++ b/test/prod/PythInterfaceProd.t.sol @@ -21,10 +21,11 @@ contract PythInterfaceProdTest is Test { /// @dev BTC/USD price feed ID (Pyth canonical feed). bytes32 constant BTC_USD_FEED_ID = 0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43; - /// @dev Generous staleness window so the test is robust across pinned fork - /// blocks; the only thing under test is that the call returns plausible - /// values, not that the price is fresh. - uint256 constant STALE_AFTER = 1 hours; + /// @dev Effectively unbounded staleness window. The test pins the live + /// contract's ABI and return decoding, not price freshness — Pyth is a pull + /// oracle, so a tight window forking at latest reverts StalePrice whenever + /// BTC/USD hasn't been pushed recently. + uint256 constant STALE_AFTER = 36500 days; /// IPyth.getPriceNoOlderThan — the only IPyth method this repo invokes, /// via PythOracle.price().