Ms.plottest (#431)

* Fix harvester test
This commit is contained in:
Mariano Sorgente 2020-09-29 07:14:29 -07:00 committed by Gene Hoffman
parent ecd68e48f7
commit 13b634249a
6 changed files with 89 additions and 12 deletions

View File

@ -5,7 +5,7 @@ export const plotControl = () => ({
type: "PLOTTER_CONTROL"
});
export const startPlotting = (k, n, t, t2, d, b) => {
export const startPlotting = (k, n, t, t2, d, b, u, r, s) => {
var action = daemonMessage();
action.message.command = "start_plotting";
action.message.data = {
@ -15,7 +15,10 @@ export const startPlotting = (k, n, t, t2, d, b) => {
t,
t2,
d,
b
b,
u,
r,
s
};
return action;
};

View File

@ -198,13 +198,13 @@ const plot_size_options = [
{ label: "2.7GiB", value: 27, workspace: "9.2GiB" },
{ label: "5.6GiB", value: 28, workspace: "19GiB" },
{ label: "11.5GiB", value: 29, workspace: "38GiB" },
{ label: "23.8GiB", value: 30, workspace: "77.3GiB" },
{ label: "49.1GiB", value: 31, workspace: "145GiB" },
{ label: "101.4GiB", value: 32, workspace: "313GiB" },
{ label: "208.8GiB", value: 33, workspace: "598GiB" },
{ label: "23.8GiB", value: 30, workspace: "83GiB" },
{ label: "49.1GiB", value: 31, workspace: "165GiB" },
{ label: "101.4GiB", value: 32, workspace: "331GiB" },
{ label: "208.8GiB", value: 33, workspace: "660GiB" },
// workspace are guesses using 55.35% - rounded up - past here
{ label: "429.8GiB", value: 34, workspace: "1266GiB" },
{ label: "884.1GiB", value: 35, workspace: "2586GiB" }
{ label: "429.8GiB", value: 34, workspace: "1300GiB" },
{ label: "884.1GiB", value: 35, workspace: "2600GiB" }
];
const WorkLocation = () => {
@ -331,7 +331,10 @@ const CreatePlot = () => {
);
const [plotSize, setPlotSize] = React.useState(25);
const [plotCount, setPlotCount] = React.useState(1);
const [maxRam, setMaxRam] = React.useState(2000);
const [maxRam, setMaxRam] = React.useState(3072);
const [numThreads, setNumThreads] = React.useState(2);
const [numBuckets, setNumBuckets] = React.useState(0);
const [stripeSize, setStripeSize] = React.useState(0);
const changePlotSize = event => {
setPlotSize(event.target.value);
@ -342,6 +345,15 @@ const CreatePlot = () => {
const handleSetMaxRam = event => {
setMaxRam(event.target.value);
};
const handleSetNumBuckets = event => {
setNumBuckets(event.target.value);
};
const handleSetNumThreads = event => {
setNumThreads(event.target.value);
};
const handleSetStripeSize = event => {
setStripeSize(event.target.value);
};
function create() {
if (!work_location || !final_location) {
@ -353,7 +365,7 @@ const CreatePlot = () => {
if (!t2 || t2 === "") {
t2 = final_location;
}
dispatch(startPlotting(K, N, work_location, t2, final_location, maxRam));
dispatch(startPlotting(K, N, work_location, t2, final_location, maxRam, numBuckets, numThreads, stripeSize));
}
var plot_count_options = [];
@ -451,6 +463,59 @@ const CreatePlot = () => {
</FormControl>
</Grid>
</Grid>
<Grid container spacing={2}>
<Grid item xs={4}>
<FormControl
fullWidth
variant="outlined"
className={classes.formControl}
>
<InputLabel>Number of threads</InputLabel>
<Input
value={numThreads}
onChange={handleSetNumThreads}
label="Colour"
type="number"
/>
</FormControl>
</Grid>
<Grid item xs={4}>
<FormControl
fullWidth
variant="outlined"
className={classes.formControl}
>
<InputLabel>Number of buckets</InputLabel>
<Input
value={numBuckets}
onChange={handleSetNumBuckets}
label="Colour"
type="number"
/>
<FormHelperText id="standard-weight-helper-text">
0 is default (recommended)
</FormHelperText>
</FormControl>
</Grid>
<Grid item xs={4}>
<FormControl
fullWidth
variant="outlined"
className={classes.formControl}
>
<InputLabel>Stripe Size</InputLabel>
<Input
value={stripeSize}
onChange={handleSetStripeSize}
label="Colour"
type="number"
/>
<FormHelperText id="standard-weight-helper-text">
0 is default (recommended)
</FormHelperText>
</FormControl>
</Grid>
</Grid>
</div>
</Grid>
<WorkLocation></WorkLocation>

View File

@ -262,7 +262,7 @@ def chia_init(root_path: Path):
MANIFEST: List[str] = [
"config",
"db",
"wallet",
# "wallet",
]
for versionnumber in range(chiaMinorReleaseNumber() - 1, 8, -1):

View File

@ -261,6 +261,9 @@ class WebSocketServer:
t2 = request["t2"]
d = request["d"]
b = request["b"]
u = request["u"]
r = request["r"]
s = request["s"]
command_args: List[str] = []
command_args += service_name.split(" ")
@ -270,6 +273,9 @@ class WebSocketServer:
command_args.append(f"-2={t2}")
command_args.append(f"-d={d}")
command_args.append(f"-b={b}")
command_args.append(f"-u={u}")
command_args.append(f"-r={r}")
command_args.append(f"-s={s}")
error = None
success = False

View File

@ -208,7 +208,7 @@ wallet:
port: 8444
testing: False
database_path: wallet/db/blockchain_wallet_v20.db
database_path: wallet/db/blockchain_wallet_v21.db
wallet_peers_path: wallet/db/wallet_peers.db
logging: *logging

View File

@ -106,6 +106,9 @@ class TestRpc:
),
token_bytes(32),
128,
0,
0,
0
)
res_2 = await client_2.get_plots()