From 181e1f75261bdb9c4232612bedfa3a551c1d6b3b Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Tue, 9 Jun 2026 19:04:43 +0100 Subject: [PATCH] tweaks --- .../components/demos/railgun/RailgunDemo.tsx | 11 +++---- .../docs/components/demos/railgun/lib.ts | 3 +- .../demos/shared/MixnetGlossary.tsx | 30 +++++++++---------- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/documentation/docs/components/demos/railgun/RailgunDemo.tsx b/documentation/docs/components/demos/railgun/RailgunDemo.tsx index 5eb89b732d..89690b5f3c 100644 --- a/documentation/docs/components/demos/railgun/RailgunDemo.tsx +++ b/documentation/docs/components/demos/railgun/RailgunDemo.tsx @@ -19,6 +19,9 @@ import { } from './lib'; const RPC_PRESETS = ['https://ethereum-sepolia-rpc.publicnode.com', 'https://rpc.sepolia.org']; +// Fixed shield amount: a single small value so the shared, faucet-funded testnet +// wallet can't be drained by an arbitrary amount. +const SHIELD_AMOUNT = '0.01'; const IP_ECHO_URL = 'https://ipinfo.io/ip'; const IP_SHAPE_RE = /^[\d.:a-f]{3,45}$/i; @@ -32,7 +35,6 @@ export function RailgunDemo() { const [railgunWallet, setRailgunWallet] = useState(null); const [rpc, setRpc] = useState(RPC_PRESETS[0]); const [balance, setBalance] = useState(''); - const [shieldAmount, setShieldAmount] = useState('0.001'); const [txHash, setTxHash] = useState(null); const [storageStatus, setStorageStatus] = useState(''); const [busy, setBusy] = useState(false); @@ -194,7 +196,7 @@ export function RailgunDemo() { publicWallet: publicWalletRef.current, railgunWallet, provider, - amountStr: shieldAmount.trim(), + amountStr: SHIELD_AMOUNT, log: dlog, onTxHash: setTxHash, }); @@ -298,9 +300,8 @@ export function RailgunDemo() {
Shield ETH into a private note
- - setShieldAmount(e.target.value)} placeholder="0.001" /> - + + Fixed at {SHIELD_AMOUNT} ETH so the shared testnet wallet isn't drained.
{txHash && (
diff --git a/documentation/docs/components/demos/railgun/lib.ts b/documentation/docs/components/demos/railgun/lib.ts index 315b3e3df5..275d95f217 100644 --- a/documentation/docs/components/demos/railgun/lib.ts +++ b/documentation/docs/components/demos/railgun/lib.ts @@ -174,7 +174,8 @@ export async function shieldEth(opts: { const txHash = keccak256(signedHex); log(` signed tx hash: ${txHash}`); log(` -> To: ${populated.to} (Railgun Sepolia proxy contract)`); - log(` -> calldata selector: ${(populated.data || '').slice(0, 10)}`); + log(` -> calldata selector: ${(populated.data || '').slice(0, 10)} (Railgun shield function; Etherscan decodes this)`); + log(` -> full calldata: ${populated.data || ''}`); onTxHash(txHash); let sentTx: any; diff --git a/documentation/docs/components/demos/shared/MixnetGlossary.tsx b/documentation/docs/components/demos/shared/MixnetGlossary.tsx index 7a87661986..33d0c1722e 100644 --- a/documentation/docs/components/demos/shared/MixnetGlossary.tsx +++ b/documentation/docs/components/demos/shared/MixnetGlossary.tsx @@ -15,35 +15,35 @@ export function MixnetGlossary() { return (
  • - Mixnet. An overlay network that routes your traffic through several relays - and mixes it with other people's, hiding who is talking to whom. Nym operates one. See{' '} + Mixnet. An overlay network that routes your traffic through several relays, + mixed in with everyone else's, so no single point can link sender to receiver. See{' '} mixnet mode.
  • - Entry gateway. Your first hop into the mixnet. Your browser holds one - WebSocket to it; all tunnelled traffic rides that connection as opaque frames. See{' '} - Nym nodes. + Entry gateway. Your first hop into the mixnet. The browser holds one + WebSocket to it, and all tunnelled traffic travels over that single connection as opaque + frames. See Nym nodes.
  • - IPR (IP Packet Router), the exit. The mixnet's exit point onto the normal - internet. The RPC node and gateway see the IPR's IP address, never yours. See{' '} + IPR (IP Packet Router), the exit. Where traffic leaves the mixnet for the + public internet. The destination sees the IPR's IP, not yours. See{' '} exit services.
  • - SURB (single-use reply block). A prepaid, single-use return envelope. It - lets the exit send a reply back through the mixnet without learning your address. See{' '} + SURB (single-use reply block). A prepaid, single-use return envelope. The + exit replies through it without ever learning your address. See{' '} anonymous replies.
  • - Cover traffic / Poisson timing. Decoy packets and randomised send timing. - Together they keep your real traffic statistically hard to pick out. See{' '} + Cover traffic / Poisson timing. Decoy packets sent on randomised timing, so + your real traffic blends into a steady stream. See{' '} cover traffic.
  • - mixFetch. The{' '} - @nymproject/mix-fetch package's{' '} - fetch()-shaped function. It runs the mixnet client (smolmix) in a Web Worker and - sends your request through the mixnet instead of the browser's network stack. + mixFetch. A fetch()-shaped function from{' '} + @nymproject/mix-fetch. It runs the mixnet + client (smolmix) in a Web Worker, so each request goes through the mixnet rather than the + browser's network stack.
);