Skip to content

chore: extract v1 random beacon to keep-core-v1 repo#3998

Open
piotr-roslaniec wants to merge 3 commits into
mainfrom
chore/extract-v1-to-keep-core-v1
Open

chore: extract v1 random beacon to keep-core-v1 repo#3998
piotr-roslaniec wants to merge 3 commits into
mainfrom
chore/extract-v1-to-keep-core-v1

Conversation

@piotr-roslaniec
Copy link
Copy Markdown
Collaborator

@piotr-roslaniec piotr-roslaniec commented May 24, 2026

Summary

  • Move docs-v1/ and solidity-v1/ out of this repo to the new dedicated
    archive threshold-network/keep-core-v1
    (history preserved via git filter-repo, solidity-v1/ renamed to
    solidity/ and docs-v1/ renamed to docs/ inside the archive).
  • Strip every live reference to the moved trees in CI, tooling, docs, and
    CODEOWNERS.
  • Remove dead Ropsten v1 testnet infrastructure (kube manifests, Cloud
    Function faucet, deployment artifacts, helper scripts, Terraform LB
    resources). Ropsten was deprecated by the Ethereum Foundation in Q4 2022
    and these surfaces have been non-functional ever since; they are tied to
    the v1 KEEP-token operator flow and have no v2 counterpart.

Net diff: ~+35 / ~−190,000 across ~320 file changes.

How the new repo was produced

git clone https://github.com/threshold-network/keep-core.git keep-core-v1
cd keep-core-v1
git filter-repo \
  --path docs-v1 --path solidity-v1 \
  --path-rename docs-v1/:docs/ \
  --path-rename solidity-v1/:solidity/
# + add top-level archive README and carry LICENSE from keep-core
git remote add origin git@github.com:threshold-network/keep-core-v1.git
git push -u origin main --tags

Result: 595 commits and 33 tags preserved in the new repo. Blame/log
inside the moved paths remain intact (SHAs differ due to the rewrite).

What changed in this repo

Removed — v1 source trees:

  • docs-v1/ (1.2 MB legacy v1 specs / RFCs)
  • solidity-v1/ (3.7 MB legacy v1 contracts)
  • scripts/install-v1.sh (only set up v1 truffle migrations)
  • crytic-config.json (only contained {\"cwd\": \"solidity-v1\"})

Removed — dead Ropsten v1 infrastructure:

  • infrastructure/eth-networks/keep-test/ropsten/ (3.1 MB of v1
    KeepToken / TokenStaking / KeepRandomBeaconOperator deployment
    JSONs plus 8 participant configs and keyfiles)
  • infrastructure/eth-networks/scripts/ (stake-accounts.js,
    fetch-contract-data.sh, prepare-participant-bundles.sh,
    create-eth-accounts.sh, and their package.json / package-lock.json
    pulling in @truffle/hdwallet-provider)
  • infrastructure/gcp/keep-test/google-functions/keep-faucet/ (Ropsten
    KEEP-token grant faucet Cloud Function targeting the
    long-deprecated nodejs10 runtime)
  • 11 Ropsten-specific Kubernetes manifests under
    infrastructure/kube/keep-dev/ (eth-miner-ropsten-*,
    eth-tx-ropsten-*, eth-network-ropsten-configmap)
  • Ropsten load-balancer resources, variables and outputs in
    infrastructure/terraform/keep-dev/

Preserved

  • docs-v1/development/go-guidelines.adoc moved to
    docs/development/go-guidelines.adoc -- it documents Go style for
    code that still lives in this repo, not in v1.

Updated references

  • CODEOWNERS -- dropped 33 /solidity-v1/... patterns.
  • .github/workflows/client.yml -- removed v1 entries from
    paths-ignore and the path-filter expression.
  • .pre-commit-config.yaml -- removed lint-js-v1, lint-sol-v1,
    format-dashboard, and lint-faucet-js hooks.
  • scripts/macos-setup.sh -- dropped the cd ../solidity-v1 && npm install
    step, kept generic brew install npm (v2 contracts still need it).
  • .dockerignore -- dropped solidity-v1/, the stale crytic-config.json
    exclusion (file deleted), and the dead !pkg/chain/gen allowlist (path
    doesn't exist; v2 bindings live under pkg/chain/ethereum/*/gen/).
  • README.adoc -- rewrote the "Moving to a new random beacon" and
    "dApp Developers" sections and the directory-structure tree to point
    at threshold-network/keep-core-v1; renumbered tree callouts.
  • docs/retired-components.md -- reworded to clarify that retired files
    (TokenStakingEscrow.sol, withdraw-old-rewards.js, dashboard/) appear
    only in the history of keep-core-v1, not in its current tree.
  • docs/development/README.adoc -- link now targets the local copy of
    go-guidelines.adoc.
  • solidity/random-beacon/README.adoc -- "Prior Work" link points at
    the new repo.

Intentionally left untouched

  • solidity/random-beacon/contracts/libraries/BytesLib.sol keeps a
    permalink-by-commit-SHA pointer to the original v1 BytesLib in
    keep-network/keep-core. That URL stays valid forever.
  • solidity/random-beacon/deployments/** and
    solidity/ecdsa/deployments/** JSONs contain embedded solc metadata
    mentioning solidity-v1 paths -- immutable deployment artifacts.
  • Go module path github.com/keep-network/keep-core (go.mod, all Go
    imports, Dockerfile workdir, GitHub Actions workdir): the GitHub-org
    rename doesn't force a module-path change and that's a separate
    decision out of scope for this PR.
  • npm package name @keep-network/keep-core referenced by v2 yarn.lock
    files -- registry name can't be renamed without republishing.
  • Pre-existing keep-network/keep-core/... URLs in badges, fork
    instructions, etc. -- they predate the org migration and are out of
    scope for this PR.

Out-of-scope follow-ups (NOT addressed here)

  • infrastructure/eth-networks/private-testnet/ is a Görli-era v2
    Staking-Provider bundle generator. Görli was also deprecated in
    early 2024, but the tree is v2-aware so deleting it belongs to a
    separate testnet-cleanup PR.
  • solidity/random-beacon/.hardhat/networks_TEMPLATE.ts still lists a
    Ropsten entry inside a v2 hardhat config template.

Test plan

  • pre-commit run --all-files passes (v1/faucet hooks removed; v2 +
    remaining hooks unchanged).
  • Client workflow path-filter still triggers correctly on a real
    Go-touching PR and skips on docs/solidity-only PRs.
  • Docker build still succeeds (.dockerignore correctness, dead
    !pkg/chain/gen allowlist removed).
  • README.adoc AsciiDoc renders cleanly (tree callouts renumbered).
  • terraform plan against infrastructure/terraform/keep-dev/ shows
    a delete of the two Ropsten google_compute_address resources and
    no other unexpected drift.

Move docs-v1/ and solidity-v1/ into a new dedicated repository
threshold-network/keep-core-v1 to reduce this repo's footprint and
remove dead-weight CI paths, CODEOWNERS noise, and pre-commit hooks
that target inert legacy code.

- Remove docs-v1/ and solidity-v1/ trees.
- Remove scripts/install-v1.sh (only set up v1 truffle migrations).
- Remove crytic-config.json (only pointed at solidity-v1).
- Preserve docs-v1/development/go-guidelines.adoc under
  docs/development/ since it documents Go code that still lives here.
- Strip v1 entries from CODEOWNERS, .dockerignore, paths-ignore /
  path-filter in client workflow, and v1-specific pre-commit hooks.
- Drop the v1 npm install from scripts/macos-setup.sh, keep the
  generic npm install (v2 contracts still need it).
- Repoint narrative links in README.adoc, docs/retired-components.md,
  docs/development/README.adoc and solidity/random-beacon/README.adoc
  at the new keep-core-v1 repository.

The historical solc-input deployment artifacts under
solidity/random-beacon/deployments/ and solidity/ecdsa/deployments/
still reference 'solidity-v1' inside frozen compiler metadata; those
are immutable build artifacts and are intentionally left untouched.

Likewise, solidity/random-beacon/contracts/libraries/BytesLib.sol
keeps a permalink-by-commit-SHA pointer to the original v1 source in
keep-network/keep-core; that link remains valid.
Second-pass cleanup of references missed in the first sweep:

- .dockerignore: remove the `crytic-config.json` exclusion (the file
  was deleted in the previous commit) and the dead `!pkg/chain/gen`
  allowlist (the directory does not exist anywhere in the tree; the
  current Go bindings live under pkg/chain/ethereum/*/gen/).
- docs/retired-components.md: restore the original v1-prefixed paths
  as historical references. The retired files (TokenStakingEscrow.sol,
  withdraw-old-rewards.js, dashboard/) were already removed in earlier
  PRs, so they do not exist in the current keep-core-v1 tree either --
  only the v1 history records them. The previous wording implied they
  were present in keep-core-v1, which was misleading.
Ropsten was deprecated by the Ethereum Foundation in Q4 2022. The
associated v1 testnet contract artifacts, kube manifests, GCP cloud
function, helper scripts, and Terraform resources have been
non-functional ever since. Removing them now alongside the docs-v1/
and solidity-v1/ extraction.

Removed:
- infrastructure/eth-networks/keep-test/ropsten/ (3.1 MB of v1
  KeepToken / TokenStaking / KeepRandomBeaconOperator deployment
  JSONs plus per-participant client configs and keyfiles for the
  Ropsten testnet beacon).
- infrastructure/eth-networks/scripts/ (stake-accounts.js,
  fetch-contract-data.sh, prepare-participant-bundles.sh and the
  truffle/hdwallet-provider package-lock.json that supported them;
  create-eth-accounts.sh was only useful in this Ropsten context).
- infrastructure/gcp/keep-test/google-functions/keep-faucet/ (KEEP
  token grant faucet Cloud Function targeting Ropsten via the
  long-deprecated nodejs10 runtime).
- 11 Kubernetes manifests under infrastructure/kube/keep-dev/ for
  eth-miner-ropsten and eth-tx-ropsten (statefulsets, services,
  storage class and config map).
- Ropsten load balancer Terraform resources, variables and outputs
  under infrastructure/terraform/keep-dev/.
- .pre-commit-config.yaml: dropped the lint-faucet-js hook that
  targeted the removed faucet.

Out of scope (left for separate review):
- infrastructure/eth-networks/private-testnet/ (Görli-era v2 bundle
  generator; Görli is also deprecated but the tree is v2-aware).
- solidity/random-beacon/.hardhat/networks_TEMPLATE.ts still includes
  a Ropsten entry in a v2 hardhat config template.
@piotr-roslaniec piotr-roslaniec marked this pull request as ready for review May 24, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant