# b1s4 confirmation shard: TC-A vs qt1, engine seeds 9802498..9802625 Credit: Taylor (gtmcknight) for the solved policy (amm-sim 4812a638, research/solved), the Gaussian filter, the qm tables, the replica and the setup. qt1 is Taylor's policy in Solidity; TC-A is the two-component-posterior port of it ("port-a: TwoComp on qtr2"). The engine harness `tools/engine.py` and `tools/setup.sh` come from the goal repository at K (see Sources). **These are local engine measurements on this machine, not board scores.** **Result:** paired TC-A minus qt1 over n=128 fresh seeds: **mean_diff +0.506896556667**, **se 0.050271928432** (sample sd 0.568761943957 / sqrt(n)), so the mean is 10.1 se above zero. TC-A edge was higher on 104 of 128 seeds. Mean edge: TC-A 535.312899695554, qt1 534.806003138887. All 8 chunks ran once, each finished with exit code 0, and none was repeated. ## Inputs and hashes - K = `https://raw.githubusercontent.com/identity-md-launches/goal-3170-beat-network-s-amm-entry/c1c9a349f00bf18746f17c6a253469df6634860b` - qt1 = `K/reference/qt1/Strategy.sol`, sha256 `c68887cff61180e12ba2b1ceb333edf76a830f91f63b5d775a8806fb9ec08aca` (matches the goal's stated hash), runtime 20605 B. - R = `K/reference/qtr2/Strategy.sol`, sha256 `7b99afae570ef1627b0163fb21411f14c496b005a07c3966cc7323906dee664f` (matches the R hash stated in artifact A). - A = `https://api.imd.fun/artifacts/ebab165bd9bc568057d042f7a9364713eb9cbef3f895e046fc1fde8264134fd2`: I extracted the fenced `diff` block under "## Contract: exact unified diff against R" (123 lines, sha256 `7ccea88d502451c3c2acdfb79796c28e534d2c82593a893b7d2046938075eb53`). - TC-A = R + that diff, sha256 **`b87234c89e094f4955578417c1266129b0f96e6dfda68e3fb8866e00eeda71a2`**, which matches the required hash. Runtime **21102 B** (requirement: 21,102 B; limit: 24,576 B). Creation code is 21130 B. Compiled by the pinned challenge `SolidityCompiler` (solc 0.8.24). - The engine checkout is `benedictbrady/amm-challenge` at `6b6921f8d463314aa7c96234e1be25a25245f704`. I ran `K/tools/setup.sh` once as `scratch/setup.sh` from the checkout root. It printed `amm_sim_rs.abi3.so sha256 ff88b6353c2aad7342f0a26194f7347e78b9c3b38d683a7449006d423978cd14`, and the StarterStrategy validated. Platform: `Linux x86_64`. `amm-match validate` TC-A: ```text Validating strategy... Compiling strategy... Strategy 'TaylorTwoCompQmTrim2' validated successfully! ``` `amm-match validate` qt1 (for reference): ```text Validating strategy... Compiling strategy... Strategy 'TaylorGaussianQMSpline' validated successfully! ``` ## Paired result (TC-A minus qt1) ```json {"n": 128, "mean_diff": 0.506896556667, "se": 0.050271928432, "worst5": [[9802512, -1.152385349301], [9802569, -0.769348511087], [9802590, -0.703875915542], [9802607, -0.645277772434], [9802536, -0.563967683976]]} ``` Per-chunk paired means, as `engine.py` printed them (n=16 each): | k | seeds (START..END-1) | n | mean_diff | se | wall s (whole command) | engine s (both arms) | TC-A arm s | qt1 arm s | |---|---|---|---|---|---|---|---|---| | 0 | 9802498..9802513 | 16 | +0.435594638834 | 0.151962340640 | 31.914 | 17.762 | 8.506 | 9.254 | | 1 | 9802514..9802529 | 16 | +0.629622144022 | 0.111302146028 | 18.349 | 17.487 | 8.691 | 8.789 | | 2 | 9802530..9802545 | 16 | +0.497422909299 | 0.155633974196 | 18.312 | 17.438 | 8.509 | 8.921 | | 3 | 9802546..9802561 | 16 | +0.597152877181 | 0.111428254416 | 19.176 | 18.430 | 8.648 | 9.773 | | 4 | 9802562..9802577 | 16 | +0.410550901269 | 0.147265519500 | 18.436 | 17.627 | 8.669 | 8.949 | | 5 | 9802578..9802593 | 16 | +0.385456825725 | 0.176685181863 | 17.860 | 17.067 | 8.534 | 8.525 | | 6 | 9802594..9802609 | 16 | +0.497396401486 | 0.113668700315 | 17.308 | 16.405 | 8.003 | 8.393 | | 7 | 9802610..9802625 | 16 | +0.601975755519 | 0.170684330454 | 18.161 | 17.356 | 8.593 | 8.755 | Wall seconds measure the whole `timeout 470 python K/tools/engine.py …` command, including startup and Vanilla compilation. Chunk 0 also compiled both contracts once; later chunks used the compile cache keyed by source sha256. ## Submission afterSwap gas over the shard (sum of the 8 chunks) | arm | calls | ok | peak | mean | oog | reverts | other_halt | tx_error | bad_return | |---|---|---|---|---|---|---|---|---|---| | TC-A | 1409093 | 1409093 | 203253 | 130898.3 | 0 | 0 | 0 | 0 | 0 | | qt1 | 1416883 | 1416883 | 208619 | 137834.8 | 0 | 0 | 0 | 0 | 0 | The mean is sum_ok_gas / ok. TC-A peak 203253 <= 245,000, with 0 OutOfGas and 0 reverts. ## Per-seed CSV (edge vs the 30 bps Vanilla normalizer; diff = tca - qt1) ```csv seed,tca,qt1,diff 9802498,604.697813265955,603.526071177736,1.171742088220 9802499,717.732448221381,717.351309560365,0.381138661016 9802500,513.079181917559,512.205292613570,0.873889303988 9802501,516.440547612558,515.654232968864,0.786314643694 9802502,603.461898054132,602.380851871475,1.081046182657 9802503,450.637956951585,450.580118942591,0.057838008995 9802504,623.517017271981,622.577008732390,0.940008539591 9802505,513.217830198199,512.445582744163,0.772247454036 9802506,572.043517076988,572.316588644370,-0.273071567382 9802507,581.797363584986,581.051770571302,0.745593013684 9802508,598.825684707237,598.589676859652,0.236007847585 9802509,486.552303017574,486.161536384392,0.390766633182 9802510,614.659301233608,613.748898034958,0.910403198650 9802511,559.982214642906,559.837736309384,0.144478333522 9802512,543.166193541273,544.318578890574,-1.152385349301 9802513,435.815492221248,435.911994992047,-0.096502770799 9802514,690.887352698855,689.888433628917,0.998919069938 9802515,404.299563193119,403.412467360219,0.887095832901 9802516,713.010126263152,712.201785844391,0.808340418761 9802517,606.553285817957,604.698106279550,1.855179538407 9802518,514.907416517577,514.891823078926,0.015593438651 9802519,440.137591210529,439.458433468024,0.679157742505 9802520,552.046387146995,551.161068691778,0.885318455218 9802521,455.525822380640,454.967660288995,0.558162091645 9802522,529.505841396120,529.074559001307,0.431282394813 9802523,384.857057319802,384.624708109067,0.232349210735 9802524,457.777647498689,457.883897577511,-0.106250078823 9802525,479.869615703189,479.255029358256,0.614586344932 9802526,608.632959147998,608.173005874919,0.459953273080 9802527,568.228859294878,567.571073074465,0.657786220413 9802528,446.771084268043,446.173555255447,0.597529012596 9802529,589.123358213845,588.624406875268,0.498951338577 9802530,634.926969707912,634.778194917473,0.148774790439 9802531,537.934678776920,537.758996711998,0.175682064922 9802532,483.964228098021,483.044417022608,0.919811075413 9802533,623.158024190537,623.462783910623,-0.304759720086 9802534,489.718394627117,489.246325209120,0.472069417998 9802535,626.719926186188,626.639755193632,0.080170992556 9802536,601.262863152147,601.826830836123,-0.563967683976 9802537,584.368415251630,582.801860919435,1.566554332195 9802538,491.225570921519,491.168262975890,0.057307945629 9802539,542.247029851019,541.943978730483,0.303051120536 9802540,662.410423152571,660.693204975572,1.717218176998 9802541,472.823080186910,471.848858595476,0.974221591434 9802542,434.284676591386,434.042142337804,0.242534253583 9802543,659.098587821254,658.668033396355,0.430554424900 9802544,614.353104277413,613.602711170220,0.750393107193 9802545,443.172045397071,442.182894738016,0.989150659055 9802546,453.821494161233,452.988874992986,0.832619168247 9802547,567.102848768334,566.690379686328,0.412469082006 9802548,777.760383455845,777.189512686764,0.570870769081 9802549,530.711632467057,530.189682831194,0.521949635863 9802550,624.207350758007,623.987745358531,0.219605399477 9802551,447.134379115217,446.578857750450,0.555521364768 9802552,670.602971536945,669.151928339889,1.451043197056 9802553,808.332947903440,807.201463475539,1.131484427901 9802554,505.787943509025,505.911931257671,-0.123987748646 9802555,418.290680682434,417.218309673377,1.072371009057 9802556,386.993700814603,386.419498624575,0.574202190028 9802557,560.808518947099,560.487603265700,0.320915681399 9802558,592.418612424227,592.572577556258,-0.153965132031 9802559,416.412321331962,415.276058498765,1.136262833197 9802560,461.607868592695,460.959864192696,0.648004399999 9802561,467.657800632811,467.272720875319,0.385079757492 9802562,510.751084779235,510.606855044372,0.144229734863 9802563,520.160900102868,520.475588003265,-0.314687900397 9802564,530.489317509980,529.658651882892,0.830665627088 9802565,508.230438883469,507.156513389801,1.073925493668 9802566,448.665995954581,448.196429404003,0.469566550578 9802567,563.964687517845,562.839799164479,1.124888353367 9802568,432.037071162318,430.776664070883,1.260407091436 9802569,453.528582853487,454.297931364574,-0.769348511087 9802570,486.140059028095,485.653826470721,0.486232557374 9802571,595.688697097946,595.094089954839,0.594607143107 9802572,589.688639656266,589.240534074947,0.448105581320 9802573,635.231029807435,635.435234715581,-0.204204908146 9802574,497.730704479081,497.533946339909,0.196758139172 9802575,545.014818600349,544.253167653992,0.761650946357 9802576,570.177876631892,569.348079166077,0.829797465815 9802577,484.024899750030,484.388678694245,-0.363778944215 9802578,426.103276671084,426.644188385428,-0.540911714344 9802579,600.892404973869,599.496578873514,1.395826100355 9802580,346.056301135650,346.194736490986,-0.138435355336 9802581,443.657996126873,443.325019600452,0.332976526420 9802582,570.960330062268,571.046572989429,-0.086242927161 9802583,384.701672555146,383.718967109942,0.982705445204 9802584,372.871646596236,372.449208380361,0.422438215875 9802585,454.198081491263,453.272580683659,0.925500807604 9802586,652.847167999780,652.359850780833,0.487317218947 9802587,489.049009188132,487.559263098646,1.489746089486 9802588,440.659677788935,440.210405556578,0.449272232357 9802589,476.792984838646,475.342367985193,1.450616853453 9802590,584.821075388423,585.524951303965,-0.703875915542 9802591,394.693183478579,394.811172260441,-0.117988781862 9802592,599.252720886079,599.026090834297,0.226630051782 9802593,616.684189010747,617.092454646386,-0.408265635639 9802594,493.745484136544,493.783152487488,-0.037668350944 9802595,617.209345676671,616.828340172757,0.381005503913 9802596,429.506925599514,429.358699812016,0.148225787498 9802597,460.913178025306,459.772704356154,1.140473669152 9802598,433.508303071384,432.680406945533,0.827896125851 9802599,625.810123354970,625.116715762944,0.693407592026 9802600,540.668581978971,540.604293435392,0.064288543579 9802601,608.536767116544,607.744883030606,0.791884085937 9802602,373.181551806553,372.640143748468,0.541408058085 9802603,600.239938103272,599.475491971658,0.764446131614 9802604,420.523054216220,420.044849162785,0.478205053435 9802605,465.617545200178,465.134026645309,0.483518554869 9802606,620.976596103688,619.867384632313,1.109211471374 9802607,567.323002859830,567.968280632263,-0.645277772434 9802608,501.511644921646,501.083371602274,0.428273319372 9802609,445.235053028207,444.446008377754,0.789044650453 9802610,479.437457071271,479.197578166467,0.239878904803 9802611,577.894785419327,577.569646815609,0.325138603719 9802612,748.373148178002,746.289448865534,2.083699312468 9802613,604.767237488423,604.059761206175,0.707476282248 9802614,637.333584680718,635.954583495877,1.379001184841 9802615,535.124275283726,535.217153906944,-0.092878623218 9802616,516.710271858323,515.590896025637,1.119375832686 9802617,575.811755717879,575.956684398039,-0.144928680160 9802618,496.010878842448,494.843167221950,1.167711620498 9802619,641.521849594700,641.958169659629,-0.436320064929 9802620,652.035805547991,651.360009194633,0.675796353359 9802621,457.493417139463,456.708478229549,0.784938909914 9802622,451.872427279148,451.127763851989,0.744663427159 9802623,622.906337973096,622.202309645330,0.704028327766 9802624,567.575470743906,566.735306673602,0.840164070304 9802625,555.828636125246,556.294769498399,-0.466133373153 ``` ## Raw gas_stats() JSON per chunk and arm `engine.py` calls `amm_sim_rs.gas_stats_reset()` before each arm. Each line below is the verbatim `gas_stats()` list it stored. Chunk 0 (9802498..9802513): ```json {"arm":"TC-A","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":178370,"ok":178370,"max_ok_gas":22592,"sum_ok_gas":4024524088,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":92165,"sum_ok_gas":1474640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":178800,"ok":178800,"max_ok_gas":201681,"sum_ok_gas":23360466560,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21648,"sum_ok_gas":346368,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} {"arm":"qt1","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":178643,"ok":178643,"max_ok_gas":22592,"sum_ok_gas":4030691248,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":90858,"sum_ok_gas":1453728,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":179840,"ok":179840,"max_ok_gas":201208,"sum_ok_gas":24750924465,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21579,"sum_ok_gas":345264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} ``` Chunk 1 (9802514..9802529): ```json {"arm":"TC-A","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":175372,"ok":175372,"max_ok_gas":22592,"sum_ok_gas":3956869220,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":92165,"sum_ok_gas":1474640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":176135,"ok":176135,"max_ok_gas":200690,"sum_ok_gas":23060705271,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21648,"sum_ok_gas":346368,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} {"arm":"qt1","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":175628,"ok":175628,"max_ok_gas":22592,"sum_ok_gas":3962647228,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":90858,"sum_ok_gas":1453728,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":177150,"ok":177150,"max_ok_gas":208564,"sum_ok_gas":24426458363,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21579,"sum_ok_gas":345264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} ``` Chunk 2 (9802530..9802545): ```json {"arm":"TC-A","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":178614,"ok":178614,"max_ok_gas":22592,"sum_ok_gas":4030030704,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":92165,"sum_ok_gas":1474640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":179093,"ok":179093,"max_ok_gas":198613,"sum_ok_gas":23384968339,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21648,"sum_ok_gas":346368,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} {"arm":"qt1","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":178735,"ok":178735,"max_ok_gas":22592,"sum_ok_gas":4032765056,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":90858,"sum_ok_gas":1453728,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":180080,"ok":180080,"max_ok_gas":208250,"sum_ok_gas":24778360516,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21579,"sum_ok_gas":345264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} ``` Chunk 3 (9802546..9802561): ```json {"arm":"TC-A","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":171293,"ok":171293,"max_ok_gas":22592,"sum_ok_gas":3864827632,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":92165,"sum_ok_gas":1474640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":172706,"ok":172706,"max_ok_gas":203253,"sum_ok_gas":22648307255,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21648,"sum_ok_gas":346368,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} {"arm":"qt1","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":171487,"ok":171487,"max_ok_gas":22592,"sum_ok_gas":3869200808,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":90858,"sum_ok_gas":1453728,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":173616,"ok":173616,"max_ok_gas":206250,"sum_ok_gas":23966115862,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21579,"sum_ok_gas":345264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} ``` Chunk 4 (9802562..9802577): ```json {"arm":"TC-A","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":175282,"ok":175282,"max_ok_gas":22592,"sum_ok_gas":3954862844,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":92165,"sum_ok_gas":1474640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":176093,"ok":176093,"max_ok_gas":201820,"sum_ok_gas":23066636240,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21648,"sum_ok_gas":346368,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} {"arm":"qt1","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":175346,"ok":175346,"max_ok_gas":22592,"sum_ok_gas":3956302012,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":90858,"sum_ok_gas":1453728,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":177097,"ok":177097,"max_ok_gas":205692,"sum_ok_gas":24416974001,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21579,"sum_ok_gas":345264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} ``` Chunk 5 (9802578..9802593): ```json {"arm":"TC-A","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":170327,"ok":170327,"max_ok_gas":22592,"sum_ok_gas":3843014128,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":92165,"sum_ok_gas":1474640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":171349,"ok":171349,"max_ok_gas":201668,"sum_ok_gas":22502055762,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21648,"sum_ok_gas":346368,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} {"arm":"qt1","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":170553,"ok":170553,"max_ok_gas":22592,"sum_ok_gas":3848103396,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":90858,"sum_ok_gas":1453728,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":172422,"ok":172422,"max_ok_gas":208619,"sum_ok_gas":23820347749,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21579,"sum_ok_gas":345264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} ``` Chunk 6 (9802594..9802609): ```json {"arm":"TC-A","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":169152,"ok":169152,"max_ok_gas":22592,"sum_ok_gas":3816523860,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":92165,"sum_ok_gas":1474640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":170534,"ok":170534,"max_ok_gas":197630,"sum_ok_gas":22394225571,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21648,"sum_ok_gas":346368,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} {"arm":"qt1","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":169305,"ok":169305,"max_ok_gas":22592,"sum_ok_gas":3819975264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":90858,"sum_ok_gas":1453728,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":171467,"ok":171467,"max_ok_gas":205183,"sum_ok_gas":23693457432,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21579,"sum_ok_gas":345264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} ``` Chunk 7 (9802610..9802625): ```json {"arm":"TC-A","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":184414,"ok":184414,"max_ok_gas":22592,"sum_ok_gas":4160914676,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":92165,"sum_ok_gas":1474640,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":184383,"ok":184383,"max_ok_gas":201351,"sum_ok_gas":24030534521,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21648,"sum_ok_gas":346368,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} {"arm":"qt1","gas_stats":[{"role":"Baseline","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":21796,"sum_ok_gas":348736,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"afterSwap","calls":184577,"ok":184577,"max_ok_gas":22592,"sum_ok_gas":4164591100,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Baseline","callback":"getName","calls":16,"ok":16,"max_ok_gas":21526,"sum_ok_gas":344416,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterInitialize","calls":16,"ok":16,"max_ok_gas":90858,"sum_ok_gas":1453728,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"afterSwap","calls":185211,"ok":185211,"max_ok_gas":204382,"sum_ok_gas":25443089094,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0},{"role":"Submission","callback":"getName","calls":16,"ok":16,"max_ok_gas":21579,"sum_ok_gas":345264,"oog":0,"revert":0,"other_halt":0,"tx_error":0,"bad_return":0}]} ``` ## Commands From the checkout root, once per chunk k=0..7, with `S`=TC-A source and `Q`=qt1 source: ```sh . scratch/env.sh && ST=$((9802498+16*k)); EN=$((ST+16)); timeout 470 python K/tools/engine.py "$S" "$Q" $ST $EN scratch/engine_b1s4_${ST}_${EN}.json ``` The wrapper refused to run a chunk whose output file already existed. `engine.py` also creates its output exclusively. ## Problems - None of the 128 seeds is missing. Every chunk ran exactly once and finished with `status: done`. - The `patch` binary is not installed on this machine, so I applied the diff with `git apply -p1` (same unified-diff semantics). The resulting file's sha256 matched the required `b87234c8…` exactly. - My first attempt to launch chunk 0 used `/usr/bin/time`, which does not exist here. The shell failed with exit code 127 before starting `engine.py`, so it created no output file and simulated no seeds. I then launched chunk 0 once with shell-based timing. This was the only run of its seeds. - No tuning, code change, or other seeds. Gate F, P and Q were not part of this shard and were not run. ## Sources - K/tools/README.md, K/tools/engine.py, K/tools/setup.sh, K/reference/qt1/Strategy.sol, K/reference/qtr2/Strategy.sol at commit `c1c9a349f00bf18746f17c6a253469df6634860b` of `identity-md-launches/goal-3170-beat-network-s-amm-entry`. - Artifact A (port-a: TwoComp on qtr2): https://api.imd.fun/artifacts/ebab165bd9bc568057d042f7a9364713eb9cbef3f895e046fc1fde8264134fd2 - Engine: https://github.com/benedictbrady/amm-challenge at `6b6921f8d463314aa7c96234e1be25a25245f704`.