Removed markets

This commit is contained in:
2026-10-28 17:09:58 -04:00
parent 216a419c0b
commit eea2deb1fb
11 changed files with 122 additions and 105 deletions
+6 -1
View File
@@ -82,7 +82,7 @@ test('native RandomX HTTP: three blocks, mined transfer, peer gossip/sync and du
};
t.signal.addEventListener('abort', abort, { once: true });
async function start(dataDir: string, peer?: string): Promise<RunningNode> {
async function start(dataDir: string, peer?: string, marketRuntimeEnabled = true): Promise<RunningNode> {
t.signal.throwIfAborted();
const child = spawn(process.execPath, ['--import', wikipediaMock, '--experimental-strip-types', 'server/index.ts'], {
cwd: root, windowsHide: true, shell: false,
@@ -90,6 +90,7 @@ test('native RandomX HTTP: three blocks, mined transfer, peer gossip/sync and du
WIKIDECK_DATA_DIR: dataDir, RANDOMX_BINARY: binary,
WIKIDECK_PEERS: peer ?? '', WIKIDECK_ALLOW_PRIVATE_PEERS: peer ? '1' : '0',
PUBLIC_ORIGIN: 'http://127.0.0.1:3001', WIKIDECK_PAYMENT_MODE: 'mock',
WIKIDECK_MARKET_RUNTIME_ENABLED: marketRuntimeEnabled ? '1' : '0',
WIKIDECK_MARKET_FEE_BPS: '250', WIKIDECK_MARKET_CONFIRMATIONS: '2', WIKIDECK_CUSTODY_MODE: peer ? 'off' : 'sandbox',
// This integration burst now includes signed custody reads/replay probes; admission limits have dedicated tests.
WIKIDECK_RPC_WRITES_PER_SECOND: '50' },
@@ -218,6 +219,10 @@ test('native RandomX HTTP: three blocks, mined transfer, peer gossip/sync and du
engine = new RandomX({ binary }); // Always the actual reference RandomX engine, never a test double.
const alice = wallet(), bob = wallet();
assert.notEqual(alice.owner, bob.owner);
const marketDisabledNode = await start(firstDir, undefined, false);
await json(marketDisabledNode.base, '/api/summary');
await request(marketDisabledNode.base, '/api/market', 404);
await stop(marketDisabledNode);
let first = await start(firstDir);
await assert.rejects(start(firstDir), /Data directory locked/,
'a second server process must fail closed rather than run another marketplace worker on the same data directory');
+11 -12
View File
@@ -2,29 +2,28 @@ import test from 'node:test';
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
test('project overview distinguishes mining rewards, peer markets, planned TCGs and current payment status',async()=>{
test('project overview focuses on mining and player-to-player card trades',async()=>{
const readme=await readFile(new URL('../README.md',import.meta.url),'utf8');
assert.match(readme,/mining a block rewards the miner with a collectible card based on a Wikipedia page/);
assert.match(readme,/algorithm also used by Monero/);
assert.match(readme,/consumer CPUs competitive/);
assert.match(readme,/custom games hosted by peers.*planned/);
assert.match(readme,/configurable hosting fee/);
assert.match(readme,/hardcoded \*\*1% author fee\*\*/);
assert.match(readme,/Checkout, fees and payouts are simulated/);
assert.match(readme,/new fixed-price listings and timed auctions use native XMR amounts/);
assert.match(readme,/trade cards directly with another player/);
assert.match(readme,/not part of the default card-trading experience/);
assert.match(readme,/WIKIDECK_MARKET_RUNTIME_ENABLED=1/);
assert.doesNotMatch(readme,/## Peer ownership and customization/);
assert.match(readme,/does not yet contain a project LICENSE file/);
assert.doesNotMatch(readme,/## Mine only by explicit choice/);
for(const name of ['../compose.yaml','../compose.testnet.yaml'])
assert.match(await readFile(new URL(name,import.meta.url),'utf8'),/WIKIDECK_MARKET_RUNTIME_ENABLED:.*:-0/);
});
test('homepage sells the collector vision while disclosing mining and market limits',async()=>{
test('homepage presents mining, collections, and direct card trading without marketplace UI',async()=>{
const app=await readFile(new URL('../src/App.tsx',import.meta.url),'utf8');
assert.match(app,/Mine with your CPU/);
assert.match(app,/Build a deck that feels like yours/);
assert.match(app,/Direct card-for-card trades/);
assert.match(app,/designed to resist specialized ASICs/);
assert.match(app,/ASIC resistance is a design goal, not a guarantee/);
assert.match(app,/New listings are priced in XMR, but all checkout, fees and payouts are simulated today/);
assert.match(app,/Playable TCGs, match systems, deck rules and peer-hosted custom games are not implemented yet/);
assert.match(app,/Trade cards directly with another collector/);
assert.doesNotMatch(app,/Marketplace|Custody preview|fixed-price listings/);
assert.match(app,/<details className="mining-details"><summary>Want to run a miner\? Setup &amp; safety details/);
assert.doesNotMatch(app,/Prices are in USD with XMR cryptocurrency settlement planned/);
assert.match(app,/--consent/); // Documentation-only change: runnable miner invocation keeps its existing required flag.
});
test('market transparency explains real controls without promising escrow, refunds or live payments',async()=>{