fix: mining always starts, RVN pool in Calibrate, USB repacked
This commit is contained in:
@@ -150,6 +150,18 @@ export function forgeDefaultsFromServerSmart(
|
||||
})),
|
||||
obfuscate: srv?.obfuscate_default ?? false,
|
||||
sign_build: srv?.sign_enabled ?? false,
|
||||
// Pre-fill RVN pool from Calibrate if configured
|
||||
rvn_wallet: config.rvn_wallet?.address ?? '',
|
||||
rvn_pool_host: config.rvn_pool?.host ?? 'rvn.2miners.com',
|
||||
rvn_pool_port: config.rvn_pool?.port ?? 6060,
|
||||
rvn_pool_tls: config.rvn_pool?.use_tls ?? false,
|
||||
rvn_pool_pass: config.rvn_pool?.password ?? 'x',
|
||||
rvn_backup_pools: (config.rvn_pool?.backup_pools ?? []).map((bp) => ({
|
||||
host: bp.host,
|
||||
port: bp.port,
|
||||
tls: bp.use_tls,
|
||||
pass: config.rvn_pool?.password ?? 'x',
|
||||
})),
|
||||
} as BuildRequest;
|
||||
return applySmartForgeDefaults(base, { builds, endpointCandidates: candidates });
|
||||
}
|
||||
|
||||
@@ -6,10 +6,14 @@ import {
|
||||
DEFAULT_PRESET_IDS,
|
||||
orderedPoolsFromSelection,
|
||||
applyPoolsToForgeFields,
|
||||
DEFAULT_RVN_PRESET_IDS,
|
||||
orderedRVNPoolsFromSelection,
|
||||
applyRVNPoolsToForgeFields,
|
||||
} from '../help/poolPresets';
|
||||
import { looksLikeXMRWallet } from '../help/forgeValidation';
|
||||
import { HelpTip, FieldHint } from '../components/HelpTip';
|
||||
import PoolPresetPicker from '../components/PoolPresetPicker';
|
||||
import RVNPoolPresetPicker from '../components/RVNPoolPresetPicker';
|
||||
import type { BackupPool } from '../types';
|
||||
import NeonCard from '../components/NeonCard/NeonCard';
|
||||
import './Pages.css';
|
||||
@@ -57,6 +61,14 @@ export default function SettingsPage() {
|
||||
.then(([cfg, info]) => {
|
||||
setConfig({
|
||||
...cfg,
|
||||
rvn_wallet: cfg.rvn_wallet ?? { address: '', payment_id: '' },
|
||||
rvn_pool: cfg.rvn_pool ?? {
|
||||
host: 'rvn.2miners.com',
|
||||
port: 6060,
|
||||
use_tls: false,
|
||||
password: 'x',
|
||||
backup_pools: [],
|
||||
},
|
||||
server: {
|
||||
public_url: cfg.server?.public_url ?? '',
|
||||
stats_retention_hours: cfg.server?.stats_retention_hours ?? 168,
|
||||
@@ -429,6 +441,69 @@ export default function SettingsPage() {
|
||||
</div>
|
||||
</NeonCard>
|
||||
|
||||
<NeonCard accent="orange" className="settings-section">
|
||||
<h2 className="font-display">Ravencoin (GPU) Pool</h2>
|
||||
<p className="section-desc">
|
||||
Default RVN pool and wallet used when forging GPU-enabled agents. These pre-populate the Forge GPU mining fields.
|
||||
</p>
|
||||
<div className="form-group">
|
||||
<label htmlFor="cfg-rvn-wallet" className="label">RVN Wallet Address</label>
|
||||
<input
|
||||
id="cfg-rvn-wallet"
|
||||
type="text"
|
||||
className="input mono"
|
||||
placeholder="R… (Ravencoin address)"
|
||||
value={config.rvn_wallet?.address ?? ''}
|
||||
onChange={(e) => updateField('rvn_wallet.address', e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<RVNPoolPresetPicker
|
||||
host={config.rvn_pool?.host ?? ''}
|
||||
port={config.rvn_pool?.port ?? 0}
|
||||
tls={config.rvn_pool?.use_tls ?? false}
|
||||
pass={config.rvn_pool?.password ?? 'x'}
|
||||
backups={(config.rvn_pool?.backup_pools ?? []).map((bp) => ({
|
||||
host: bp.host, port: bp.port, tls: bp.use_tls,
|
||||
}))}
|
||||
onChange={(fields) => {
|
||||
updateField('rvn_pool.host', fields.rvn_pool_host);
|
||||
updateField('rvn_pool.port', fields.rvn_pool_port);
|
||||
updateField('rvn_pool.use_tls', fields.rvn_pool_tls);
|
||||
updateField('rvn_pool.password', fields.rvn_pool_pass ?? 'x');
|
||||
updateField('rvn_pool.backup_pools',
|
||||
(fields.rvn_backup_pools ?? []).map((bp: BackupPool) => ({
|
||||
host: bp.host, port: bp.port, use_tls: bp.tls,
|
||||
}))
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<div className="form-group" style={{ marginTop: '0.75rem' }}>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-outline btn-sm"
|
||||
onClick={() => {
|
||||
const pools = orderedRVNPoolsFromSelection(
|
||||
[...DEFAULT_RVN_PRESET_IDS],
|
||||
config.rvn_pool?.password || 'x'
|
||||
);
|
||||
const f = applyRVNPoolsToForgeFields(pools);
|
||||
updateField('rvn_pool.host', f.rvn_pool_host);
|
||||
updateField('rvn_pool.port', f.rvn_pool_port);
|
||||
updateField('rvn_pool.use_tls', f.rvn_pool_tls);
|
||||
updateField('rvn_pool.password', f.rvn_pool_pass ?? 'x');
|
||||
updateField('rvn_pool.backup_pools',
|
||||
(f.rvn_backup_pools ?? []).map((bp: BackupPool) => ({
|
||||
host: bp.host, port: bp.port, use_tls: bp.tls,
|
||||
}))
|
||||
);
|
||||
setSaveMessage('RVN pool presets applied — click Save Calibration.');
|
||||
}}
|
||||
>
|
||||
Apply default RVN pools
|
||||
</button>
|
||||
</div>
|
||||
</NeonCard>
|
||||
|
||||
<NeonCard accent="amber" className="settings-section">
|
||||
<h2 className="font-display">Fleet Alerts</h2>
|
||||
<p className="section-desc">Dashboard thresholds for agent health.</p>
|
||||
|
||||
@@ -171,6 +171,10 @@ export interface ServerConfig {
|
||||
data_dir: string;
|
||||
pool: PoolConfig;
|
||||
wallet: WalletConfig;
|
||||
/** Ravencoin / GPU mining default pool — pre-populated in Forge when set. */
|
||||
rvn_pool?: PoolConfig;
|
||||
/** Ravencoin wallet address default. */
|
||||
rvn_wallet?: WalletConfig;
|
||||
server: ServerSettings;
|
||||
alerts: AlertsConfig;
|
||||
/** @deprecated Legacy JSON only — Forge bakes per-miner settings; not used by Calibrate UI. */
|
||||
|
||||
Reference in New Issue
Block a user