Change Freeze stops de-peering at exchanges

Snubs (refused and torn-down sessions at exchanges) are part of the market
rule now, so Change Freeze and puzzles have none; On-call is unchanged.
This commit is contained in:
Frederic Jung 2026-10-29 09:55:35 +01:00
parent 9b7b1c150c
commit e17ddc247b
No known key found for this signature in database
12 changed files with 34 additions and 15 deletions

View file

@ -7,7 +7,7 @@ const RULE_DEF={clock:true,chaos:'normal',lead:'real',market:true,inbox:true,mon
const RULE_OK={clock:[true,false],chaos:['none','calm','normal','spicy'],lead:['real','quick'],market:[true,false],inbox:[true,false],money:['normal','infinite'],gates:['ladder','open']};
// i: icon, n: name, d: the one-line joke, x: what is different, in small print.
const PRESETS={
freeze:{i:'🧊',n:tr('rules.change_freeze'),d:tr('rules.nobody_touches_prod_even_the_backhoes'),x:tr('rules.fewer_outages_pnis_and_builds_in'),clock:true,chaos:'calm',lead:'quick',market:false,inbox:false,money:'normal',gates:'ladder'},
freeze:{i:'🧊',n:tr('rules.change_freeze'),d:tr('rules.nobody_touches_prod_even_the_backhoes'),x:tr('rules.a_third_of_the_outages_no_ddos'),clock:true,chaos:'calm',lead:'quick',market:false,inbox:false,money:'normal',gates:'ladder'},
oncall:{i:'📟',n:tr('rules.on_call'),d:tr('rules.the_real_thing_your_pager_has'),x:tr('rules.real_lead_times_real_outages_a'),clock:true,chaos:'normal',lead:'real',market:true,inbox:true,money:'normal',gates:'ladder'},
bgp:{i:'🔥',n:tr('rules.bgp_at_3_a_m'),d:tr('rules.everything_is_on_fire_and_it'),x:tr('rules.more_and_longer_outages_more_ddos'),clock:true,chaos:'spicy',lead:'real',market:true,inbox:true,money:'normal',gates:'ladder'},
sandbox:{i:'🏖️',n:tr('common.sandbox'),d:tr('rules.a_billion_dollars_every_unlock_your'),x:tr('rules.infinite_money_everything_unlocked_quick'),clock:true,chaos:'none',lead:'quick',market:true,inbox:true,money:'infinite',gates:'open'},

View file

@ -1,12 +1,13 @@
/* Big networks sometimes refuse to peer in a particular city, for a while. Each (network, city)
pair gets a stable verdict per window, derived from a hash, so asking again does not reroll it. */
pair gets a stable verdict per window, derived from a hash, so asking again does not reroll it.
It is part of the market: without one (Change Freeze, puzzles), nobody refuses or drops a session. */
const SNUB_WIN=150,SNUB_P=0.22;
const SNUB_IX=[tr('peering_policy.only_peers_over_pnis_in_this'),tr('peering_policy.their_ix_port_here_is_full'),tr('peering_policy.moved_everything_in_this_city_to'),tr('peering_policy.the_peering_coordinator_for_this'),tr('peering_policy.their_policy_here_says_ix_peering')];
const SNUB_ALL=[tr('peering_policy.not_accepting_new_peers_in_this'),tr('peering_policy.region_frozen_while_they_renegotiate'),tr('peering_policy.their_routers_in_this_city_are'),tr('peering_policy.already_reach_you_through_your'),tr('peering_policy.their_lawyers_are_reviewing_every'),tr('peering_policy.a_new_vp_wants_to_monetise')];
function hstr(t){let h=2166136261;for(let i=0;i<t.length;i++){h^=t.charCodeAt(i);h=Math.imul(h,16777619);}return h>>>0;}
function bigPeer(n){return !!n&&n.pol==='selective'&&n.share>=0.03;}
function snub(id,c){
const n=NET[id];if(!c||!bigPeer(n)||!S||S.myIx[c])return null;
const n=NET[id];if(!c||!bigPeer(n)||!S||S.myIx[c]||!rule('market'))return null;
const off=hstr(id+c)%SNUB_WIN,ep=Math.floor((S.day+off)/SNUB_WIN),h=hstr(S.asn+'|'+id+'|'+c+'|'+ep);
if(h%1000>=SNUB_P*1000)return null;
const all=(h>>>10)%5<2,list=all?SNUB_ALL:SNUB_IX;

View file

@ -3242,6 +3242,7 @@
"routing_and_routers.unplug_something_first_used_ports":"<b>Unplug something first.</b><br>{used} ports are in use, and one router fewer only has {max}.",
"rules.a_billion_dollars_every_unlock_your":"A billion dollars, every unlock, your own subsea cable.",
"rules.a_cut_now_and_then":"A cut now and then.",
"rules.a_third_of_the_outages_no_ddos":"A third of the outages, no DDoS. PNIs and builds in days. No inbox, no shortages, no sold-out routes, no de-peering.",
"rules.bgp_at_3_a_m":"BGP at 3 a.m.",
"rules.change_freeze":"Change Freeze",
"rules.chaos_calm":"Calm",
@ -3249,7 +3250,6 @@
"rules.chaos_normal":"Normal",
"rules.chaos_spicy":"Spicy",
"rules.everything_is_on_fire_and_it":"Everything is on fire, and it's your turn.",
"rules.fewer_outages_pnis_and_builds_in":"A third of the outages, no DDoS. PNIs and builds in days. No inbox, no shortages, no sold-out routes.",
"rules.infinite_money_everything_unlocked_quick":"Endless money, everything unlocked, quick lead times. No badges.",
"rules.like_the_real_game":"Like the real game.",
"rules.more_and_longer_outages_more_ddos":"Almost twice the outages, half as long again, twice the DDoS. Everything on.",