-
Notifications
You must be signed in to change notification settings - Fork 46
/
33_miner_actor_dumps.go
44 lines (38 loc) · 1.35 KB
/
33_miner_actor_dumps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package v1
func init() {
patches.Register(
33,
`
CREATE TABLE IF NOT EXISTS {{ .SchemaName | default "public"}}.miner_actor_dumps (
height BIGINT NOT NULL,
miner_id TEXT,
miner_address TEXT,
state_root TEXT,
owner_id TEXT,
owner_address TEXT,
worker_id TEXT,
worker_address TEXT,
consensus_faulted_elapsed BIGINT,
peer_id TEXT,
control_addresses JSONB,
beneficiary TEXT,
beneficiary_address TEXT,
sector_size BIGINT,
num_live_sectors BIGINT,
raw_byte_power NUMERIC,
quality_adj_power NUMERIC,
total_locked_funds NUMERIC,
vesting_funds NUMERIC,
initial_pledge NUMERIC,
pre_commit_deposits NUMERIC,
available_balance NUMERIC,
balance NUMERIC,
fee_debt NUMERIC,
PRIMARY KEY(height, miner_id, miner_address)
);
CREATE INDEX IF NOT EXISTS miner_actor_dumps_height_idx ON {{ .SchemaName | default "public"}}.miner_actor_dumps USING btree (height);
CREATE INDEX IF NOT EXISTS miner_actor_dumps_miner_id_idx ON {{ .SchemaName | default "public"}}.miner_actor_dumps USING hash (miner_id);
CREATE INDEX IF NOT EXISTS miner_actor_dumps_miner_address_idx ON {{ .SchemaName | default "public"}}.miner_actor_dumps USING hash (miner_address);
`,
)
}