Merge branch 'master' of https://github.com/filecoin-project/lotus
This commit is contained in:
@@ -84,7 +84,7 @@ func New(hosts []string, username, password, database, port string, itestID ITes
|
||||
}
|
||||
}
|
||||
|
||||
schema := "lotus"
|
||||
schema := "curio"
|
||||
if itest != "" {
|
||||
schema = "itest_" + itest
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
INSERT INTO harmony_config (title, config) VALUES
|
||||
('post', '
|
||||
[Subsystems]
|
||||
EnableWindowPost = true
|
||||
EnableWinningPost = true
|
||||
'),
|
||||
|
||||
('gui', '
|
||||
[Subsystems]
|
||||
EnableWebGui = true
|
||||
'),
|
||||
|
||||
('seal', '
|
||||
[Subsystems]
|
||||
EnableSealSDR = true
|
||||
EnableSealSDRTrees = true
|
||||
EnableSendPrecommitMsg = true
|
||||
EnablePoRepProof = true
|
||||
EnableSendCommitMsg = true
|
||||
EnableMoveStorage = true
|
||||
'),
|
||||
|
||||
('seal-gpu', '
|
||||
[Subsystems]
|
||||
EnableSealSDRTrees = true
|
||||
EnableSendPrecommitMsg = true
|
||||
'),
|
||||
('seal-snark', '
|
||||
[Subsystems]
|
||||
EnablePoRepProof = true
|
||||
EnableSendCommitMsg = true
|
||||
'),
|
||||
('sdr', '
|
||||
[Subsystems]
|
||||
EnableSealSDR = true
|
||||
'),
|
||||
|
||||
('storage', '
|
||||
[Subsystems]
|
||||
EnableMoveStorage = true
|
||||
')
|
||||
ON CONFLICT (title) DO NOTHING; -- SPs may have these names defined already.
|
||||
@@ -0,0 +1,35 @@
|
||||
create table parked_pieces (
|
||||
id bigserial primary key,
|
||||
created_at timestamp default current_timestamp,
|
||||
|
||||
piece_cid text not null,
|
||||
piece_padded_size bigint not null,
|
||||
piece_raw_size bigint not null,
|
||||
|
||||
complete boolean not null default false,
|
||||
task_id bigint default null,
|
||||
|
||||
cleanup_task_id bigint default null,
|
||||
|
||||
foreign key (task_id) references harmony_task (id) on delete set null,
|
||||
foreign key (cleanup_task_id) references harmony_task (id) on delete set null,
|
||||
unique (piece_cid)
|
||||
);
|
||||
|
||||
/*
|
||||
* This table is used to keep track of the references to the parked pieces
|
||||
* so that we can delete them when they are no longer needed.
|
||||
*
|
||||
* All references into the parked_pieces table should be done through this table.
|
||||
*
|
||||
* data_url is optional for refs which also act as data sources.
|
||||
*/
|
||||
create table parked_piece_refs (
|
||||
ref_id bigserial primary key,
|
||||
piece_id bigint not null,
|
||||
|
||||
data_url text,
|
||||
data_headers jsonb not null default '{}',
|
||||
|
||||
foreign key (piece_id) references parked_pieces(id) on delete cascade
|
||||
);
|
||||
@@ -0,0 +1,7 @@
|
||||
/* Used for webui clusterMachineSummary */
|
||||
CREATE INDEX harmony_task_history_work_index
|
||||
ON harmony_task_history (completed_by_host_and_port ASC, name ASC, result ASC, work_end DESC);
|
||||
|
||||
/* Used for webui actorSummary sp wins */
|
||||
CREATE INDEX mining_tasks_won_sp_id_base_compute_time_index
|
||||
ON mining_tasks (won ASC, sp_id ASC, base_compute_time DESC);
|
||||
@@ -4,12 +4,23 @@
|
||||
package resources
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
ffi "github.com/filecoin-project/filecoin-ffi"
|
||||
)
|
||||
|
||||
func getGPUDevices() float64 { // GPU boolean
|
||||
if nstr := os.Getenv("HARMONY_OVERRIDE_GPUS"); nstr != "" {
|
||||
n, err := strconv.ParseFloat(nstr, 64)
|
||||
if err != nil {
|
||||
logger.Errorf("parsing HARMONY_OVERRIDE_GPUS failed: %+v", err)
|
||||
} else {
|
||||
return n
|
||||
}
|
||||
}
|
||||
|
||||
gpus, err := ffi.GetGPUDevices()
|
||||
logger.Infow("GPUs", "list", gpus)
|
||||
if err != nil {
|
||||
|
||||
@@ -131,7 +131,7 @@ func getResources() (res Resources, err error) {
|
||||
}
|
||||
}
|
||||
if found > 1 {
|
||||
logger.Warn("lotus-provider's defaults are for running alone. Use task maximums or CGroups.")
|
||||
logger.Warn("curio's defaults are for running alone. Use task maximums or CGroups.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user