Commit graph

12 commits

Author SHA1 Message Date
Christopher Hawker
eb78d7104e Prefer keeps the say at its own POP only, and the direct ranks stop slowing the game day
Review of #205:

- Prefer no longer switches the carrier-direct rule off for the whole network.
  A POP with a Prefer-marked transit port keeps what Prefer says; every other
  POP keeps the rule. compute(), traceroute and the reference loop in the tests
  all use the same per-POP rule, and a new test covers it (New York and Chicago,
  Prefer on one POP's Tell-Ya port).
- dayTick() cost. The harness is neutral (the same page on both sides differs by
  1%), but the cost was real: the four extra rank passes inside compute()'s main
  loop made V8 deoptimise compute() 954 times in 30 game days against 46 on main.
  The direct ranks now run in a small function of their own, in the plain way the
  reference loop does (their lists are one carrier's ports), so the main loop is
  the one main has, and the setup moved out of compute(). 61 deopts instead of 954.
- Italian: "Porta qui" read as "port here" next to "Porta più vicina"; it is
  "Instrada qui" now, and "Ogni POP instrada il traffico..." matches.
- Help text: says that real BGP carries the traffic from every POP (the shorter
  AS path beats IGP distance), that Carry here does that here, and that Nearest
  port is the default. All six languages.
2026-11-01 20:07:23 +11:00
Christopher Hawker
d9868a3757 Restore what the merge from main dropped from the carrier's own transit port
The merge kept main's version of compute(), the link actions and panels, the
traceroute exit list and the CHANGELOG, so the city panel called a carryCtl()
that no longer existed and routing never ranked a carrier's own port. Put the
ranking back into compute() on top of the current rank lists and island split,
along with setCarry, carryCtl, the traceroute carry flag, the reference loop in
the routing test and the CHANGELOG bullet. Drop a stale label main had removed
and sort the dictionaries.

The tests follow main too: saves are read from their slot, RouteScript needs
the core to run, Not That Telecom stands in for Cogentle (whose share is now
small), and the flood test uses a smaller sacrificial PNI and IX flood because
a carrier's own traffic now takes its share of the one transit port first.
2026-10-31 23:28:30 +11:00
thesysadmindev
296de1d946
Merge branch 'main' into own-carrier-egress 2026-10-31 22:16:55 +11:00
Frederic Jung
928d6f0111
Routing reference skips exits behind a full path too; #210 test checks the answer; CHANGELOG for players
The reference loop now states the rule #225 adds to compute(): without Auto-TE an exit whose shortest path is already full fits nothing, like a full exit. With the same rule both match bit for bit; before, only float rounding differed (at most 3.6e-14 relative), because the ECMP split no longer counts a dead exit's room.
2026-10-31 07:10:27 +01:00
Christopher Hawker
ac5928d41d A carrier's own transit port takes its traffic, with a Carry here switch for other POPs
Transit ports at a POP shared load by free capacity whatever the traffic
was for, so Level Tree's own traffic went out of a Tell-Ya port about
half the time. Traffic bound for a carrier, or for a network that buys
transit from it, now goes out of that carrier's port at the same POP
first (the shorter AS path). Each such port is still an ordinary transit
exit, so POPs without one use it when nothing nearer has room.

A new switch on each transit port, Carry here, pulls that traffic from
every POP across your network to this port. The default, Nearest port,
keeps using the closest transit port from POPs that have no port of the
carrier. The switch only shows when another carrier's port could take
the traffic instead.

Prefer-marked ports, Backup only, RouteScript and Auto-TE keep their say,
and any Prefer-marked transit port switches the rule off. Traceroute
follows the same rule and says why it picked an exit. The setting is
repaired in sanitize(); old saves load with it off.

The routing reference test now has several carriers sharing POPs, ports
that carry, backup ports and RouteScript, and its reference loop knows
the new ranks.
2026-10-29 21:16:21 +11:00
Frederic Jung
d56039695c
Attacks arrive as on 1.36 again: drop the distributed multi-ingress flood model
Frederic's call for 2.0: keep #153's fixes, NOC breakdown, new vectors, gaming risk
and overlapping attacks, but not the per-port model. It split every flood over each
ingress port with traffic (over a thousand on a big network), stored them all in the
save, routed one pinned flow per port, and with it came the build-order and
victim-scoring bugs found in review.

Each attack is again one entry port at the victim (a.entry): upstream clean-pipe,
Flowspec on the victim's router, IX blackholing, a sacrificial PNI and RouteScript
filter it in that order (ddosMitigation), then scrubbing; what leaks is junk at the
victim spread like its traffic, exactly as on main. Saves from 2.0 builds with
a.entries load: sanitize drops the shares and a 'distributed' entry becomes 'edge'.
Removed: R.ingressPorts, ddosEntries/ddosFold/ddosSlices/ddosCities/ddosHasIx, pinned
flows (and the pinned-rank handling in routing and its reference), the mixed-TCAM
line and the 'across N ports' message, and their tests; the scrubbing source-city
test now uses two victims sharing one center. CHANGELOG #153 bullets describe what
ships and credit #153.
2026-10-28 20:53:58 +01:00
Frederic Jung
6d839102b5
Pinned attack flows route at their entry port's own rank, not a cone rank
base() now takes the target network; pinned junk has none, so coneOf() called every
PNI a cone route and the flood was routed late (behind real traffic) or not at all.
Pinned flows use the port's own rank (low preference still last), those ranks join
RSET, and the reference allocation in the routing test does the same.
2026-10-28 19:58:25 +01:00
Frederic Jung
946da17c8b
Merge Puzzles, Tier 1 by customer cone and badge variants into v2 2026-10-28 18:14:56 +01:00
Frederic Jung
6489db146e
Tier 1 by customer cone (#85), and badge variants per ruleset preset
Cones: a PNI or IX session reaches the peer and its transitive customer cone,
precomputed once at load (CONE/CONE_S/DOWN/ANC). Cone routes rank after direct
peering and before transit (CONE_RANK 2.5), so peering widely still pays. The
long tail and several real eyeballs get real-world upstreams. Cones only add
reach, so the rule is easier for every save and needs no version flag.

Badges: S.achP[id] records the preset variant (freeze/oncall/bgp), sanitized,
default 'oncall' for old saves; the device hall of fame records every variant
earned. Harder presets upgrade a badge; toast, list, collection shelf and the
share card show it. Sandbox and puzzles earn none.
2026-10-28 16:54:19 +01:00
Filip Hruska
744b769000 Rework DDoS generation, mitigation accounting and NOC reporting
Scale normal attacks with network demand, level and gaming exposure, with
randomized sizes, durations, overlapping attacks and distributed ingress.
Set average sizes to three times the non-gaming baseline at one gaming
customer and eight times at fifty. Keep Flood Season escalating after its
challenge ends.

Add gaming-specific vectors, Memcached amplification and ACK floods.
Account for upstream scrubbing, Flowspec and shared scrubbing capacity in
sequence. Show precise mitigation totals and one destination-based
scrubbing detour in existing live attack cards.

Keep each source-to-scrubbing route distinct in link traffic breakdowns,
including the source label, Open button and map highlight.

Include deterministic tests, old-save migration and translations.
2026-10-27 13:00:57 +00:00
Frederic Jung
e5deb90968
Routing reference test runs on today's routing loop; perf bench reads exported saves
The reference test from #106 now patches the loop as it looks after #96
(business-first passes) and also covers prefer, prepend and protect
customers. It catches an exit index that ignores RouteScript preferences,
which the shortcut test in speed.test.js cannot see.

npm run perf -- --save accepts files from the in-game Export save, so
scripts/benchmark-performance.js and its README section are not needed.
The performance skill documents --save, both equivalence tests and how to
handle noisy runs.
2026-10-26 08:40:20 +01:00
LookedPath
ffb8c50895 Add routing reference regression and exported-save benchmark 2026-10-26 06:11:12 +00:00