Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
69d4493
checkpoint(tss-rotation): Month-1 containment M1.1a+M1.2+M1.3 (brick …
Jul 7, 2026
c26f683
harden(tss-rotation): M1.3 council fixes — split-brain guard, gate-of…
Jul 7, 2026
e30ff31
feat(tss-rotation): M1.4 dormant share-zeroization (defence-in-depth)
Jul 7, 2026
fb53692
harden(tss-rotation): Month-1 pruned-methodology fixes (7-lens audit)
Jul 7, 2026
94bf20e
feat(tss-rotation): S3 NN#1 node output-scoped retiring-key signing +…
Jul 8, 2026
483c5e5
fix(tss-rotation): S3 council — fail-CLOSED on a corrupt vault regist…
Jul 8, 2026
f50d7c3
fix(tss-rotation): S3 methodology — reject duplicate-generation regis…
Jul 8, 2026
fb3a487
docs(tss-rotation): S3 methodology — record deploy-ordering precondit…
Jul 8, 2026
8c25f71
docs(tss-rotation): brick council — lock the permanent-loss preventer…
Jul 8, 2026
dd356f5
fix(tss-rotation): brick council BRK-5/8 — freeze deprecation under s…
Jul 8, 2026
9bc6fd3
docs(tss-rotation): brick-fix methodology — deploy-ordering (k) + mar…
Jul 8, 2026
9bb00ad
S2 BRK-1 deploy-gate: mark precondition (f) DONE, add (l) dust-escape…
Jul 8, 2026
6f1d4e8
feat(tss-rotation): BRK-2 check-SIGNATURE-before-activate (Option A',…
Jul 8, 2026
ff30193
fix(tss-rotation): BRK-2 council L-1 — gate WithVaultRotationV2 in th…
Jul 8, 2026
15aee81
feat(tss-rotation): BRK-3 / V-A — bond-locked retiring-gen signing el…
Jul 8, 2026
78fd39a
fix(tss-rotation): BRK-3 / V-A council — A3 DoS-amplification + comme…
Jul 8, 2026
0444706
feat(tss-rotation): #11 bond-lock-until-drained (consensus unstake ga…
Jul 9, 2026
e26d6ed
fix(tss-rotation): #11 council — F1 dead-gate namespace fix + F2 fork…
Jul 9, 2026
d390b51
fix(tss-rotation): #11 F2 — fail-STOP the bond-lock consensus reads (…
Jul 9, 2026
f0506e8
feat(tss-rotation): #11 F4 — hold a front-run unstake's payout until …
Jul 9, 2026
c1368fb
fix(btcvault): mirror contract VaultEntrySize 87→91 (S5 InactiveHeigh…
Jul 9, 2026
089efac
feat(tss): M1.1b node side — mirror the contract theft-halt flag into…
Jul 9, 2026
605444e
fix(tss): 2 latent determinism/correctness bugs in the blame/ban mech…
Jul 9, 2026
f78ecac
harden vault-rotation-v2: close FULL-PRUNED findings (L1-L10, council…
Jul 9, 2026
47ad0c5
test(tss): BTC vault-rotation-v2 devnet harness + genesis-activation fix
Jul 10, 2026
6e375f9
feat(mapping-bot): drive the BTC vault-rotation migration lifecycle
tibfox Jul 14, 2026
b6c627a
test(devnet): vault-rotation drain, operator, writeOffDust, redrive +…
tibfox Jul 14, 2026
e000984
feat(mapping-bot): auto re-drive a stuck migration sweep
tibfox Jul 14, 2026
0e941b5
test(devnet): adversarial operator bounds — a compromised operator ca…
tibfox Jul 14, 2026
d6bfe5e
test(devnet): bond-lock consensus-unstake gate (#11)
tibfox Jul 14, 2026
b48beca
test(devnet): emergency tss_halt op plumbing + fix countHaltFlag coll…
tibfox Jul 14, 2026
c21610f
fix(tss-rotation): never reshare a PURGED (retired) vault key
tibfox Jul 14, 2026
0167c6b
feat(poa): seat registry + consensus-version gates (S0-S2)
Jul 20, 2026
c53bb56
feat(poa): seat gate, flat seat-weight, churn cap, exit-halt (S3,S5,S…
Jul 20, 2026
1021f8e
feat(poa): vsc.admit_vote — seat admission by 2/3 of seats (S4)
Jul 20, 2026
02c3e17
fix(poa): eight defects found by the PRUNED pass on this build
Jul 20, 2026
a318259
fix(poa): two more silent bson/query mismatches — the halt never armed
Jul 20, 2026
c06cf55
fix(poa): normalise account case before stripping the hive: prefix
Jul 20, 2026
a83ebae
fix(poa): batch was permanently dead code; churn cap could stall the …
Jul 20, 2026
f48ff97
audit(poa): retract the inflated threshold finding; add the miner har…
Jul 20, 2026
8afb3bf
refactor(poa): code-quality pass — typed dup errors, drop dead return
Jul 20, 2026
fbebeb3
test(poa): failure-state suite + RG-1 characterization
Jul 20, 2026
6638da1
fix(poa): close RG-1 — arm the collateral exit-halt from admission
Jul 21, 2026
44db718
fix(poa): complete RG-1 close — hold the bond while the operator is e…
Jul 21, 2026
0f86c60
fix(poa): close RG-1c — hold on recent witness activity, not just poi…
lordbutterfly-hive Jul 23, 2026
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: 9 additions & 0 deletions cmd/contract-deployer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ func main() {
p2pConf := p2pInterface.NewConfig(args.dataDir)
sysConfig := systemconfig.FromNetwork(args.network)
if args.sysconfigPath != "" {
// L8-03 (FULL-PRUNED 2026-07-09): a -sysconfig override rewrites ConsensusParams/
// OracleParams, which the node repo requires to be network-baked and identical on
// every node (params.go:118-129). Restrict it to devnet/mocknet — the SAME guard as
// cmd/vsc-node/main.go — so a production -sysconfig can't silently redirect a deploy
// to the wrong contract id / gateway.
if args.network != "devnet" && args.network != "mocknet" {
fmt.Println("Error: sysconfig overrides only allowed on devnet/mocknet, not", args.network)
os.Exit(1)
}
if err := sysConfig.LoadOverrides(args.sysconfigPath); err != nil {
fmt.Println("Error loading sysconfig overrides:", err)
os.Exit(1)
Expand Down
9 changes: 9 additions & 0 deletions cmd/genesis-elector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ func main() {
electionDb := elections.New(vscDb)
sysConfig := systemconfig.FromNetwork(args.network)
if args.sysconfigPath != "" {
// L8-03 (FULL-PRUNED 2026-07-09): a -sysconfig override rewrites ConsensusParams/
// OracleParams, which the node repo requires to be network-baked and identical on
// every node (params.go:118-129). Restrict it to devnet/mocknet — the SAME guard as
// cmd/vsc-node/main.go — so a production -sysconfig can't silently fork this binary's
// view of consensus params off the network.
if args.network != "devnet" && args.network != "mocknet" {
fmt.Println("Error: sysconfig overrides only allowed on devnet/mocknet, not", args.network)
os.Exit(1)
}
if err := sysConfig.LoadOverrides(args.sysconfigPath); err != nil {
fmt.Println("Error loading sysconfig overrides:", err)
os.Exit(1)
Expand Down
18 changes: 18 additions & 0 deletions cmd/mapping-bot/contract-interface/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,21 @@ const LastHeightKey = "h"

const PrimaryPublicKeyStateKey = "pubkey"
const BackupPublicKeyStateKey = "backupkey"

// ---------------------------------------------------------------------------
// BTC vault-rotation-v2 (must stay byte-identical to the contract's
// btc-mapping-contract/contract/constants: a mismatch silently reads the wrong
// state key and the rotation driver goes blind).
// ---------------------------------------------------------------------------

// VaultRegistryKey holds the packed vault-generation registry (the "v" list).
// Absent/empty on a non-vault contract and on a pre-rotation deploy — the
// rotation driver treats both as "nothing to do".
const VaultRegistryKey = "v"

// MigrationSweepPrefix keys the per-sweep migration record ("ms-<txid>"). Its
// presence means a migration sweep is in flight and not yet settled.
const MigrationSweepPrefix = "ms" + DirPathDelimiter

// PendingUnmapPrefix keys the per-unmap record ("us-<txid>", delete-at-confirm).
const PendingUnmapPrefix = "us" + DirPathDelimiter
15 changes: 15 additions & 0 deletions cmd/mapping-bot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ func main() {

sysConfig := systemconfig.FromNetwork(args.network)
if args.sysconfigPath != "" {
// L8-03 (FULL-PRUNED 2026-07-09): a -sysconfig override rewrites ConsensusParams/
// OracleParams, which the node repo requires to be network-baked and identical on
// every node (params.go:118-129). Restrict it to devnet/mocknet — the SAME guard as
// cmd/vsc-node/main.go — so a production -sysconfig can't silently misdirect this
// privileged oracle binary (its BTC L1 endpoint / target contract id).
if args.network != "devnet" && args.network != "mocknet" {
fmt.Println("Error: sysconfig overrides only allowed on devnet/mocknet, not", args.network)
os.Exit(1)
}
if err := sysConfig.LoadOverrides(args.sysconfigPath); err != nil {
fmt.Println("Error loading sysconfig overrides:", err)
os.Exit(1)
Expand Down Expand Up @@ -187,6 +196,7 @@ func main() {
// At head — still run unmap/confirmations, then sleep before checking again
bot.HandleUnmap()
bot.HandleConfirmations()
bot.HandleVaultRotation()
releaseBlockLease(bot, blockHeight, instanceID)
time.Sleep(chainCfg.SleepInterval)
cancel()
Expand Down Expand Up @@ -219,6 +229,11 @@ func main() {
defer wg.Done()
bot.HandleUnmap()
bot.HandleConfirmations()
// Drive the vault-rotation lifecycle (build the next migration tranche /
// write off an un-sweepable residual / advance retire→purge). Runs after
// confirmations so a sweep that just settled is seen as settled. No-op on a
// contract with no vault registry, and internally rate-limited.
bot.HandleVaultRotation()
}()
wg.Wait()
releaseBlockLease(bot, blockHeight, instanceID)
Expand Down
4 changes: 3 additions & 1 deletion cmd/mapping-bot/mapper/call_contract_l2.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ func (b *Bot) callContractL2(
return "", fmt.Errorf("fetch L2 nonce: %w", err)
}

rcLimit := b.BotConfig.RcLimit()
// Per-action: the vault-rotation ops need a far higher ceiling than the bot's
// configured default, which every other action keeps unchanged (see rcLimitFor).
rcLimit := b.rcLimitFor(action)
call := &transactionpool.VscContractCall{
ContractId: b.BotConfig.ContractId(),
Action: action,
Expand Down
Loading
Loading