@subql/node-ethereum 0.4.1-8 → 0.4.1-storeCache-0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/README.md +3 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/ethereum/api.ethereum.d.ts +8 -4
- package/dist/ethereum/api.ethereum.js +70 -49
- package/dist/ethereum/api.ethereum.js.map +1 -1
- package/dist/ethereum/api.service.ethereum.js +1 -1
- package/dist/ethereum/api.service.ethereum.js.map +1 -1
- package/dist/ethereum/block.ethereum.d.ts +1 -1
- package/dist/ethereum/block.ethereum.js +9 -12
- package/dist/ethereum/block.ethereum.js.map +1 -1
- package/dist/ethereum/ethers/json-rpc-batch-provider.d.ts +21 -0
- package/dist/ethereum/ethers/json-rpc-batch-provider.js +102 -0
- package/dist/ethereum/ethers/json-rpc-batch-provider.js.map +1 -0
- package/dist/ethereum/ethers/json-rpc-provider.d.ts +7 -0
- package/dist/ethereum/ethers/json-rpc-provider.js +68 -0
- package/dist/ethereum/ethers/json-rpc-provider.js.map +1 -0
- package/dist/ethereum/ethers/web/_version.d.ts +1 -0
- package/dist/ethereum/ethers/web/_version.js +6 -0
- package/dist/ethereum/ethers/web/_version.js.map +1 -0
- package/dist/ethereum/ethers/web/geturl.d.ts +3 -0
- package/dist/ethereum/ethers/web/geturl.js +116 -0
- package/dist/ethereum/ethers/web/geturl.js.map +1 -0
- package/dist/ethereum/ethers/web/index.d.ts +49 -0
- package/dist/ethereum/ethers/web/index.js +433 -0
- package/dist/ethereum/ethers/web/index.js.map +1 -0
- package/dist/ethereum/ethers/web/types.d.ts +26 -0
- package/dist/ethereum/ethers/web/types.js +4 -0
- package/dist/ethereum/ethers/web/types.js.map +1 -0
- package/dist/ethereum/utils.ethereum.d.ts +1 -1
- package/dist/ethereum/utils.ethereum.js +16 -3
- package/dist/ethereum/utils.ethereum.js.map +1 -1
- package/dist/indexer/blockDispatcher/block-dispatcher.service.d.ts +8 -15
- package/dist/indexer/blockDispatcher/block-dispatcher.service.js +20 -108
- package/dist/indexer/blockDispatcher/block-dispatcher.service.js.map +1 -1
- package/dist/indexer/blockDispatcher/ethereum-block-dispatcher.d.ts +4 -0
- package/dist/indexer/blockDispatcher/ethereum-block-dispatcher.js +5 -0
- package/dist/indexer/blockDispatcher/ethereum-block-dispatcher.js.map +1 -0
- package/dist/indexer/blockDispatcher/index.d.ts +2 -2
- package/dist/indexer/blockDispatcher/index.js.map +1 -1
- package/dist/indexer/blockDispatcher/worker-block-dispatcher.service.d.ts +12 -17
- package/dist/indexer/blockDispatcher/worker-block-dispatcher.service.js +48 -134
- package/dist/indexer/blockDispatcher/worker-block-dispatcher.service.js.map +1 -1
- package/dist/indexer/dynamic-ds.service.d.ts +3 -22
- package/dist/indexer/dynamic-ds.service.js +4 -91
- package/dist/indexer/dynamic-ds.service.js.map +1 -1
- package/dist/indexer/fetch.module.js +24 -6
- package/dist/indexer/fetch.module.js.map +1 -1
- package/dist/indexer/fetch.service.d.ts +3 -3
- package/dist/indexer/fetch.service.js +40 -39
- package/dist/indexer/fetch.service.js.map +1 -1
- package/dist/indexer/indexer.manager.d.ts +5 -17
- package/dist/indexer/indexer.manager.js +25 -70
- package/dist/indexer/indexer.manager.js.map +1 -1
- package/dist/indexer/indexer.module.js +25 -2
- package/dist/indexer/indexer.module.js.map +1 -1
- package/dist/indexer/project.service.d.ts +5 -10
- package/dist/indexer/project.service.js +49 -100
- package/dist/indexer/project.service.js.map +1 -1
- package/dist/indexer/sandbox.service.js +6 -1
- package/dist/indexer/sandbox.service.js.map +1 -1
- package/dist/indexer/unfinalizedBlocks.service.d.ts +12 -12
- package/dist/indexer/unfinalizedBlocks.service.js +33 -38
- package/dist/indexer/unfinalizedBlocks.service.js.map +1 -1
- package/dist/indexer/unfinalizedBlocks.spec.js +41 -34
- package/dist/indexer/unfinalizedBlocks.spec.js.map +1 -1
- package/dist/indexer/worker/worker.d.ts +22 -8
- package/dist/indexer/worker/worker.js +14 -7
- package/dist/indexer/worker/worker.js.map +1 -1
- package/dist/indexer/worker/worker.service.d.ts +2 -2
- package/dist/indexer/worker/worker.service.js +11 -4
- package/dist/indexer/worker/worker.service.js.map +1 -1
- package/dist/indexer/worker/worker.unfinalizedBlocks.service.d.ts +11 -0
- package/dist/indexer/worker/worker.unfinalizedBlocks.service.js +32 -0
- package/dist/indexer/worker/worker.unfinalizedBlocks.service.js.map +1 -0
- package/dist/init.js +2 -2
- package/dist/init.js.map +1 -1
- package/dist/meta/meta.module.js +8 -0
- package/dist/meta/meta.module.js.map +1 -1
- package/dist/meta/meta.service.d.ts +18 -3
- package/dist/meta/meta.service.js +89 -5
- package/dist/meta/meta.service.js.map +1 -1
- package/dist/subcommands/forceClean.service.js +8 -4
- package/dist/subcommands/forceClean.service.js.map +1 -1
- package/dist/subcommands/reindex.init.js +5 -1
- package/dist/subcommands/reindex.init.js.map +1 -1
- package/dist/subcommands/reindex.module.js +8 -0
- package/dist/subcommands/reindex.module.js.map +1 -1
- package/dist/subcommands/reindex.service.d.ts +4 -1
- package/dist/subcommands/reindex.service.js +21 -10
- package/dist/subcommands/reindex.service.js.map +1 -1
- package/dist/utils/project.d.ts +1 -0
- package/dist/utils/project.js +13 -1
- package/dist/utils/project.js.map +1 -1
- package/dist/utils/reindex.d.ts +2 -1
- package/dist/utils/reindex.js +6 -2
- package/dist/utils/reindex.js.map +1 -1
- package/dist/utils/string.js +10 -2
- package/dist/utils/string.js.map +1 -1
- package/dist/yargs.d.ts +85 -53
- package/dist/yargs.js +103 -71
- package/dist/yargs.js.map +1 -1
- package/package.json +9 -9
- package/dist/indexer/blockDispatcher/base-block-dispatcher.d.ts +0 -40
- package/dist/indexer/blockDispatcher/base-block-dispatcher.js +0 -99
- package/dist/indexer/blockDispatcher/base-block-dispatcher.js.map +0 -1
package/dist/yargs.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
export declare const yargsOptions: import("yargs").Argv<import("yargs").Omit<{
|
|
2
2
|
targetHeight: number;
|
|
3
|
-
}, "
|
|
4
|
-
|
|
5
|
-
alias: string;
|
|
6
|
-
demandOption: true;
|
|
7
|
-
default: string;
|
|
8
|
-
describe: string;
|
|
9
|
-
type: "string";
|
|
10
|
-
};
|
|
11
|
-
'subquery-name': {
|
|
12
|
-
deprecated: true;
|
|
3
|
+
}, "batch-size" | "config" | "db-schema" | "debug" | "dictionary-timeout" | "disable-historical" | "ipfs" | "local" | "log-level" | "mmr-path" | "multi-chain" | "network-dictionary" | "network-endpoint" | "output-fmt" | "port" | "profiler" | "proof-of-index" | "query-limit" | "scale-batch-size" | "dictionary-resolver" | "subquery" | "subquery-name" | "subscription" | "timeout" | "timestamp-field" | "unfinalized-blocks" | "unsafe" | "workers" | "pg-ca" | "pg-key" | "pg-cert" | "store-cache-threshold"> & import("yargs").InferredOptionTypes<{
|
|
4
|
+
'batch-size': {
|
|
13
5
|
demandOption: false;
|
|
14
6
|
describe: string;
|
|
15
|
-
type: "
|
|
7
|
+
type: "number";
|
|
16
8
|
};
|
|
17
9
|
config: {
|
|
18
10
|
alias: string;
|
|
@@ -20,55 +12,62 @@ export declare const yargsOptions: import("yargs").Argv<import("yargs").Omit<{
|
|
|
20
12
|
describe: string;
|
|
21
13
|
type: "string";
|
|
22
14
|
};
|
|
23
|
-
local: {
|
|
24
|
-
deprecated: true;
|
|
25
|
-
type: "boolean";
|
|
26
|
-
demandOption: false;
|
|
27
|
-
describe: string;
|
|
28
|
-
};
|
|
29
15
|
'db-schema': {
|
|
30
16
|
demandOption: false;
|
|
31
17
|
describe: string;
|
|
32
18
|
type: "string";
|
|
33
19
|
};
|
|
34
|
-
|
|
20
|
+
debug: {
|
|
21
|
+
demandOption: false;
|
|
22
|
+
describe: string;
|
|
35
23
|
type: "boolean";
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
'dictionary-timeout': {
|
|
36
27
|
demandOption: false;
|
|
37
28
|
describe: string;
|
|
29
|
+
type: "number";
|
|
38
30
|
};
|
|
39
|
-
|
|
31
|
+
'disable-historical': {
|
|
40
32
|
demandOption: false;
|
|
33
|
+
default: boolean;
|
|
41
34
|
describe: string;
|
|
42
35
|
type: "boolean";
|
|
43
|
-
default: boolean;
|
|
44
36
|
};
|
|
45
|
-
|
|
37
|
+
ipfs: {
|
|
46
38
|
demandOption: false;
|
|
47
39
|
describe: string;
|
|
48
|
-
type: "
|
|
40
|
+
type: "string";
|
|
49
41
|
};
|
|
50
|
-
|
|
42
|
+
local: {
|
|
43
|
+
deprecated: true;
|
|
51
44
|
type: "boolean";
|
|
52
45
|
demandOption: false;
|
|
53
46
|
describe: string;
|
|
54
|
-
default: boolean;
|
|
55
47
|
};
|
|
56
|
-
|
|
48
|
+
'log-level': {
|
|
57
49
|
demandOption: false;
|
|
58
50
|
describe: string;
|
|
59
|
-
type: "
|
|
51
|
+
type: "string";
|
|
52
|
+
choices: string[];
|
|
60
53
|
};
|
|
61
|
-
|
|
54
|
+
'mmr-path': {
|
|
55
|
+
alias: string;
|
|
62
56
|
demandOption: false;
|
|
63
57
|
describe: string;
|
|
64
|
-
type: "
|
|
65
|
-
default: boolean;
|
|
58
|
+
type: "string";
|
|
66
59
|
};
|
|
67
|
-
|
|
60
|
+
'multi-chain': {
|
|
68
61
|
demandOption: false;
|
|
62
|
+
default: boolean;
|
|
69
63
|
describe: string;
|
|
70
64
|
type: "boolean";
|
|
71
|
-
|
|
65
|
+
};
|
|
66
|
+
'network-dictionary': {
|
|
67
|
+
alias: string;
|
|
68
|
+
demandOption: false;
|
|
69
|
+
describe: string;
|
|
70
|
+
type: "string";
|
|
72
71
|
};
|
|
73
72
|
'network-endpoint': {
|
|
74
73
|
demandOption: false;
|
|
@@ -81,74 +80,107 @@ export declare const yargsOptions: import("yargs").Argv<import("yargs").Omit<{
|
|
|
81
80
|
type: "string";
|
|
82
81
|
choices: string[];
|
|
83
82
|
};
|
|
84
|
-
|
|
83
|
+
port: {
|
|
84
|
+
alias: string;
|
|
85
85
|
demandOption: false;
|
|
86
86
|
describe: string;
|
|
87
|
-
type: "
|
|
88
|
-
choices: string[];
|
|
87
|
+
type: "number";
|
|
89
88
|
};
|
|
90
|
-
|
|
89
|
+
profiler: {
|
|
91
90
|
demandOption: false;
|
|
92
91
|
describe: string;
|
|
93
92
|
type: "boolean";
|
|
94
93
|
default: boolean;
|
|
95
94
|
};
|
|
96
|
-
'
|
|
97
|
-
alias: string;
|
|
95
|
+
'proof-of-index': {
|
|
98
96
|
demandOption: false;
|
|
99
97
|
describe: string;
|
|
100
|
-
type: "
|
|
98
|
+
type: "boolean";
|
|
99
|
+
default: boolean;
|
|
101
100
|
};
|
|
102
|
-
'
|
|
101
|
+
'query-limit': {
|
|
103
102
|
demandOption: false;
|
|
104
103
|
describe: string;
|
|
105
104
|
type: "number";
|
|
105
|
+
default: number;
|
|
106
106
|
};
|
|
107
|
-
'
|
|
108
|
-
|
|
107
|
+
'scale-batch-size': {
|
|
108
|
+
type: "boolean";
|
|
109
109
|
demandOption: false;
|
|
110
110
|
describe: string;
|
|
111
|
-
|
|
111
|
+
default: boolean;
|
|
112
112
|
};
|
|
113
|
-
'
|
|
113
|
+
'dictionary-resolver': {
|
|
114
114
|
demandOption: false;
|
|
115
115
|
describe: string;
|
|
116
116
|
type: "boolean";
|
|
117
117
|
default: boolean;
|
|
118
118
|
};
|
|
119
|
-
|
|
119
|
+
subquery: {
|
|
120
|
+
alias: string;
|
|
121
|
+
demandOption: true;
|
|
122
|
+
default: string;
|
|
123
|
+
describe: string;
|
|
124
|
+
type: "string";
|
|
125
|
+
};
|
|
126
|
+
'subquery-name': {
|
|
127
|
+
deprecated: true;
|
|
120
128
|
demandOption: false;
|
|
121
129
|
describe: string;
|
|
122
130
|
type: "string";
|
|
123
131
|
};
|
|
124
|
-
|
|
125
|
-
|
|
132
|
+
subscription: {
|
|
133
|
+
demandOption: false;
|
|
134
|
+
describe: string;
|
|
135
|
+
type: "boolean";
|
|
136
|
+
default: boolean;
|
|
137
|
+
};
|
|
138
|
+
timeout: {
|
|
126
139
|
demandOption: false;
|
|
127
140
|
describe: string;
|
|
128
141
|
type: "number";
|
|
129
142
|
};
|
|
130
|
-
'
|
|
143
|
+
'timestamp-field': {
|
|
144
|
+
demandOption: false;
|
|
145
|
+
describe: string;
|
|
146
|
+
type: "boolean";
|
|
147
|
+
default: boolean;
|
|
148
|
+
};
|
|
149
|
+
'unfinalized-blocks': {
|
|
131
150
|
demandOption: false;
|
|
132
151
|
default: boolean;
|
|
133
152
|
describe: string;
|
|
134
153
|
type: "boolean";
|
|
135
154
|
};
|
|
155
|
+
unsafe: {
|
|
156
|
+
type: "boolean";
|
|
157
|
+
demandOption: false;
|
|
158
|
+
describe: string;
|
|
159
|
+
};
|
|
136
160
|
workers: {
|
|
137
161
|
alias: string;
|
|
138
162
|
demandOption: false;
|
|
139
163
|
describe: string;
|
|
140
164
|
type: "number";
|
|
141
165
|
};
|
|
142
|
-
'
|
|
166
|
+
'pg-ca': {
|
|
143
167
|
demandOption: false;
|
|
144
168
|
describe: string;
|
|
145
|
-
type: "
|
|
146
|
-
default: number;
|
|
169
|
+
type: "string";
|
|
147
170
|
};
|
|
148
|
-
'
|
|
171
|
+
'pg-key': {
|
|
149
172
|
demandOption: false;
|
|
150
|
-
default: boolean;
|
|
151
173
|
describe: string;
|
|
152
|
-
type: "
|
|
174
|
+
type: "string";
|
|
175
|
+
};
|
|
176
|
+
'pg-cert': {
|
|
177
|
+
demandOption: false;
|
|
178
|
+
describe: string;
|
|
179
|
+
type: "string";
|
|
180
|
+
};
|
|
181
|
+
'store-cache-threshold': {
|
|
182
|
+
demandOption: false;
|
|
183
|
+
describe: string;
|
|
184
|
+
type: "number";
|
|
153
185
|
};
|
|
154
186
|
}>>;
|
package/dist/yargs.js
CHANGED
|
@@ -40,18 +40,10 @@ exports.yargsOptions = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)
|
|
|
40
40
|
},
|
|
41
41
|
})
|
|
42
42
|
.options({
|
|
43
|
-
|
|
44
|
-
alias: 'f',
|
|
45
|
-
demandOption: true,
|
|
46
|
-
default: process.cwd(),
|
|
47
|
-
describe: 'Local path or IPFS cid of the subquery project',
|
|
48
|
-
type: 'string',
|
|
49
|
-
},
|
|
50
|
-
'subquery-name': {
|
|
51
|
-
deprecated: true,
|
|
43
|
+
'batch-size': {
|
|
52
44
|
demandOption: false,
|
|
53
|
-
describe: '
|
|
54
|
-
type: '
|
|
45
|
+
describe: 'Batch size of blocks to fetch in one round',
|
|
46
|
+
type: 'number',
|
|
55
47
|
},
|
|
56
48
|
config: {
|
|
57
49
|
alias: 'c',
|
|
@@ -59,55 +51,62 @@ exports.yargsOptions = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)
|
|
|
59
51
|
describe: 'Specify configuration file',
|
|
60
52
|
type: 'string',
|
|
61
53
|
},
|
|
62
|
-
local: {
|
|
63
|
-
deprecated: true,
|
|
64
|
-
type: 'boolean',
|
|
65
|
-
demandOption: false,
|
|
66
|
-
describe: 'Use local mode',
|
|
67
|
-
},
|
|
68
54
|
'db-schema': {
|
|
69
55
|
demandOption: false,
|
|
70
56
|
describe: 'Db schema name of the project',
|
|
71
57
|
type: 'string',
|
|
72
58
|
},
|
|
73
|
-
|
|
59
|
+
debug: {
|
|
60
|
+
demandOption: false,
|
|
61
|
+
describe: 'Show debug information to console output. will forcefully set log level to debug',
|
|
74
62
|
type: 'boolean',
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
65
|
+
'dictionary-timeout': {
|
|
75
66
|
demandOption: false,
|
|
76
|
-
describe: '
|
|
67
|
+
describe: 'Max timeout for dictionary query',
|
|
68
|
+
type: 'number',
|
|
77
69
|
},
|
|
78
|
-
|
|
70
|
+
'disable-historical': {
|
|
79
71
|
demandOption: false,
|
|
80
|
-
describe: 'Enable subscription by create notification triggers',
|
|
81
|
-
type: 'boolean',
|
|
82
72
|
default: false,
|
|
73
|
+
describe: 'Disable storing historical state entities',
|
|
74
|
+
type: 'boolean',
|
|
83
75
|
},
|
|
84
|
-
|
|
76
|
+
ipfs: {
|
|
85
77
|
demandOption: false,
|
|
86
|
-
describe: '
|
|
87
|
-
type: '
|
|
78
|
+
describe: 'IPFS gateway endpoint',
|
|
79
|
+
type: 'string',
|
|
88
80
|
},
|
|
89
|
-
|
|
81
|
+
local: {
|
|
82
|
+
deprecated: true,
|
|
90
83
|
type: 'boolean',
|
|
91
84
|
demandOption: false,
|
|
92
|
-
describe: '
|
|
93
|
-
default: false,
|
|
85
|
+
describe: 'Use local mode',
|
|
94
86
|
},
|
|
95
|
-
|
|
87
|
+
'log-level': {
|
|
96
88
|
demandOption: false,
|
|
97
|
-
describe: '
|
|
98
|
-
type: '
|
|
89
|
+
describe: 'Specify log level to print. Ignored when --debug is used',
|
|
90
|
+
type: 'string',
|
|
91
|
+
choices: ['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'],
|
|
99
92
|
},
|
|
100
|
-
|
|
93
|
+
'mmr-path': {
|
|
94
|
+
alias: 'm',
|
|
101
95
|
demandOption: false,
|
|
102
|
-
describe: '
|
|
103
|
-
type: '
|
|
104
|
-
default: false,
|
|
96
|
+
describe: 'Local path of the merkle mountain range (.mmr) file',
|
|
97
|
+
type: 'string',
|
|
105
98
|
},
|
|
106
|
-
|
|
99
|
+
'multi-chain': {
|
|
107
100
|
demandOption: false,
|
|
108
|
-
describe: 'Show profiler information to console output',
|
|
109
|
-
type: 'boolean',
|
|
110
101
|
default: false,
|
|
102
|
+
describe: 'Enables indexing multiple subquery projects into the same database schema',
|
|
103
|
+
type: 'boolean',
|
|
104
|
+
},
|
|
105
|
+
'network-dictionary': {
|
|
106
|
+
alias: 'd',
|
|
107
|
+
demandOption: false,
|
|
108
|
+
describe: 'Specify the dictionary api for this network',
|
|
109
|
+
type: 'string',
|
|
111
110
|
},
|
|
112
111
|
'network-endpoint': {
|
|
113
112
|
demandOption: false,
|
|
@@ -120,57 +119,82 @@ exports.yargsOptions = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)
|
|
|
120
119
|
type: 'string',
|
|
121
120
|
choices: ['json', 'colored'],
|
|
122
121
|
},
|
|
123
|
-
|
|
122
|
+
port: {
|
|
123
|
+
alias: 'p',
|
|
124
124
|
demandOption: false,
|
|
125
|
-
describe: '
|
|
126
|
-
type: '
|
|
127
|
-
choices: ['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'],
|
|
125
|
+
describe: 'The port the service will bind to',
|
|
126
|
+
type: 'number',
|
|
128
127
|
},
|
|
129
|
-
|
|
128
|
+
profiler: {
|
|
130
129
|
demandOption: false,
|
|
131
|
-
describe: '
|
|
130
|
+
describe: 'Show profiler information to console output',
|
|
132
131
|
type: 'boolean',
|
|
133
132
|
default: false,
|
|
134
133
|
},
|
|
135
|
-
'
|
|
136
|
-
alias: 'd',
|
|
134
|
+
'proof-of-index': {
|
|
137
135
|
demandOption: false,
|
|
138
|
-
describe: '
|
|
139
|
-
type: '
|
|
136
|
+
describe: 'Enable/disable proof of index',
|
|
137
|
+
type: 'boolean',
|
|
138
|
+
default: false,
|
|
140
139
|
},
|
|
141
|
-
'
|
|
140
|
+
'query-limit': {
|
|
142
141
|
demandOption: false,
|
|
143
|
-
describe: '
|
|
142
|
+
describe: 'The limit of items a project can query with store.getByField at once',
|
|
144
143
|
type: 'number',
|
|
144
|
+
default: 100,
|
|
145
145
|
},
|
|
146
|
-
'
|
|
147
|
-
|
|
146
|
+
'scale-batch-size': {
|
|
147
|
+
type: 'boolean',
|
|
148
148
|
demandOption: false,
|
|
149
|
-
describe: '
|
|
150
|
-
|
|
149
|
+
describe: 'scale batch size based on memory usage',
|
|
150
|
+
default: false,
|
|
151
151
|
},
|
|
152
|
-
'
|
|
152
|
+
'dictionary-resolver': {
|
|
153
153
|
demandOption: false,
|
|
154
|
-
describe: '
|
|
154
|
+
describe: 'Use subquery network dictionary resolver',
|
|
155
155
|
type: 'boolean',
|
|
156
156
|
default: false,
|
|
157
157
|
},
|
|
158
|
-
|
|
158
|
+
subquery: {
|
|
159
|
+
alias: 'f',
|
|
160
|
+
demandOption: true,
|
|
161
|
+
default: process.cwd(),
|
|
162
|
+
describe: 'Local path or IPFS cid of the subquery project',
|
|
163
|
+
type: 'string',
|
|
164
|
+
},
|
|
165
|
+
'subquery-name': {
|
|
166
|
+
deprecated: true,
|
|
159
167
|
demandOption: false,
|
|
160
|
-
describe: '
|
|
168
|
+
describe: 'Name of the subquery project',
|
|
161
169
|
type: 'string',
|
|
162
170
|
},
|
|
163
|
-
|
|
164
|
-
alias: 'p',
|
|
171
|
+
subscription: {
|
|
165
172
|
demandOption: false,
|
|
166
|
-
describe: '
|
|
173
|
+
describe: 'Enable subscription by create notification triggers',
|
|
174
|
+
type: 'boolean',
|
|
175
|
+
default: false,
|
|
176
|
+
},
|
|
177
|
+
timeout: {
|
|
178
|
+
demandOption: false,
|
|
179
|
+
describe: 'Timeout for indexer sandbox to execute the mapping functions',
|
|
167
180
|
type: 'number',
|
|
168
181
|
},
|
|
169
|
-
'
|
|
182
|
+
'timestamp-field': {
|
|
170
183
|
demandOption: false,
|
|
184
|
+
describe: 'Enable/disable created_at and updated_at in schema',
|
|
185
|
+
type: 'boolean',
|
|
171
186
|
default: false,
|
|
172
|
-
|
|
187
|
+
},
|
|
188
|
+
'unfinalized-blocks': {
|
|
189
|
+
demandOption: false,
|
|
190
|
+
default: false,
|
|
191
|
+
describe: 'Enable to fetch and index unfinalized blocks',
|
|
192
|
+
type: 'boolean',
|
|
193
|
+
},
|
|
194
|
+
unsafe: {
|
|
173
195
|
type: 'boolean',
|
|
196
|
+
demandOption: false,
|
|
197
|
+
describe: 'Allows usage of any built-in module within the sandbox',
|
|
174
198
|
},
|
|
175
199
|
workers: {
|
|
176
200
|
alias: 'w',
|
|
@@ -178,17 +202,25 @@ exports.yargsOptions = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv)
|
|
|
178
202
|
describe: 'Number of worker threads to use for fetching and processing blocks. Disabled by default.',
|
|
179
203
|
type: 'number',
|
|
180
204
|
},
|
|
181
|
-
'
|
|
205
|
+
'pg-ca': {
|
|
182
206
|
demandOption: false,
|
|
183
|
-
describe: '
|
|
184
|
-
type: '
|
|
185
|
-
default: 100,
|
|
207
|
+
describe: 'Postgres ca certificate - to enables TLS/SSL connections to your PostgreSQL, path to the server certificate file are required, e.g /path/to/server-certificates/root.crt',
|
|
208
|
+
type: 'string',
|
|
186
209
|
},
|
|
187
|
-
'
|
|
210
|
+
'pg-key': {
|
|
188
211
|
demandOption: false,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
212
|
+
describe: 'Postgres client key - Path to key file e.g /path/to/client-key/postgresql.key',
|
|
213
|
+
type: 'string',
|
|
214
|
+
},
|
|
215
|
+
'pg-cert': {
|
|
216
|
+
demandOption: false,
|
|
217
|
+
describe: 'Postgres client certificate - Path to client certificate e.g /path/to/client-certificates/postgresql.crt',
|
|
218
|
+
type: 'string',
|
|
219
|
+
},
|
|
220
|
+
'store-cache-threshold': {
|
|
221
|
+
demandOption: false,
|
|
222
|
+
describe: 'Store cache will flush when number of records excess this threshold',
|
|
223
|
+
type: 'number',
|
|
192
224
|
},
|
|
193
225
|
});
|
|
194
226
|
//# sourceMappingURL=yargs.js.map
|
package/dist/yargs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yargs.js","sourceRoot":"","sources":["../src/yargs.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC;;;;;;AAEtC,oDAAqD;AACrD,2CAAwC;AACxC,wDAAgC;AAEnB,QAAA,YAAY,GAAG,IAAA,eAAK,EAAC,IAAA,iBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACrD,GAAG,CAAC,YAAY,CAAC;KACjB,OAAO,CAAC;IACP,OAAO,EAAE,aAAa;IACtB,QAAQ,EACN,mIAAmI;IACrI,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,IAAA,mB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,EACN,0FAA0F;QAC5F,IAAI,EAAE,QAAQ;KACf;IACD,aAAa,EAAE;QACb,YAAY,EAAE,KAAK;QACnB,QAAQ,EACN,sEAAsE;QACxE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,GAAG;KACb;IACD,oBAAoB,EAAE;QACpB,YAAY,EAAE,KAAK;QACnB,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,8CAA8C;QACxD,IAAI,EAAE,SAAS;KAChB;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { initLogger } from '@subql/node-core/logger';\nimport { hideBin } from 'yargs/helpers';\nimport yargs from 'yargs/yargs';\n\nexport const yargsOptions = yargs(hideBin(process.argv))\n .env('SUBQL_NODE')\n .command({\n command: 'force-clean',\n describe:\n 'Clean the database dropping project schemas and tables. Once the command is executed, the application would exit upon completion.',\n builder: {},\n handler: (argv) => {\n initLogger(\n argv.debug as boolean,\n argv.outputFmt as 'json' | 'colored',\n argv.logLevel as string | undefined,\n );\n\n // lazy import to make sure logger is instantiated before all other services\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { forceCleanInit } = require('./subcommands/forceClean.init');\n return forceCleanInit();\n },\n })\n .command({\n command: 'reindex',\n describe:\n 'Reindex to specified block height. Historical must be enabled for the targeted project (--disable-historical=false). Once the command is executed, the application would exit upon completion.',\n builder: (yargs) =>\n yargs.options('targetHeight', {\n type: 'number',\n description: 'set targetHeight',\n require: true,\n }),\n handler: (argv) => {\n initLogger(\n argv.debug as boolean,\n argv.outputFmt as 'json' | 'colored',\n argv.logLevel as string | undefined,\n );\n // lazy import to make sure logger is instantiated before all other services\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { reindexInit } = require('./subcommands/reindex.init');\n return reindexInit(argv.targetHeight);\n },\n })\n .options({\n subquery: {\n alias: 'f',\n demandOption: true,\n default: process.cwd(),\n describe: 'Local path or IPFS cid of the subquery project',\n type: 'string',\n },\n 'subquery-name': {\n deprecated: true,\n demandOption: false,\n describe: 'Name of the subquery project',\n type: 'string',\n },\n config: {\n alias: 'c',\n demandOption: false,\n describe: 'Specify configuration file',\n type: 'string',\n },\n local: {\n deprecated: true,\n type: 'boolean',\n demandOption: false,\n describe: 'Use local mode',\n },\n 'db-schema': {\n demandOption: false,\n describe: 'Db schema name of the project',\n type: 'string',\n },\n unsafe: {\n type: 'boolean',\n demandOption: false,\n describe: 'Allows usage of any built-in module within the sandbox',\n },\n subscription: {\n demandOption: false,\n describe: 'Enable subscription by create notification triggers',\n type: 'boolean',\n default: false,\n },\n 'batch-size': {\n demandOption: false,\n describe: 'Batch size of blocks to fetch in one round',\n type: 'number',\n },\n 'scale-batch-size': {\n type: 'boolean',\n demandOption: false,\n describe: 'scale batch size based on memory usage',\n default: false,\n },\n timeout: {\n demandOption: false,\n describe: 'Timeout for indexer sandbox to execute the mapping functions',\n type: 'number',\n },\n debug: {\n demandOption: false,\n describe:\n 'Show debug information to console output. will forcefully set log level to debug',\n type: 'boolean',\n default: false,\n },\n profiler: {\n demandOption: false,\n describe: 'Show profiler information to console output',\n type: 'boolean',\n default: false,\n },\n 'network-endpoint': {\n demandOption: false,\n type: 'string',\n describe: 'Blockchain network endpoint to connect',\n },\n 'output-fmt': {\n demandOption: false,\n describe: 'Print log as json or plain text',\n type: 'string',\n choices: ['json', 'colored'],\n },\n 'log-level': {\n demandOption: false,\n describe: 'Specify log level to print. Ignored when --debug is used',\n type: 'string',\n choices: ['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'],\n },\n 'timestamp-field': {\n demandOption: false,\n describe: 'Enable/disable created_at and updated_at in schema',\n type: 'boolean',\n default: false,\n },\n 'network-dictionary': {\n alias: 'd',\n demandOption: false,\n describe: 'Specify the dictionary api for this network',\n type: 'string',\n },\n 'dictionary-timeout': {\n demandOption: false,\n describe: 'Max timeout for dictionary query',\n type: 'number',\n },\n 'mmr-path': {\n alias: 'm',\n demandOption: false,\n describe: 'Local path of the merkle mountain range (.mmr) file',\n type: 'string',\n },\n 'proof-of-index': {\n demandOption: false,\n describe: 'Enable/disable proof of index',\n type: 'boolean',\n default: false,\n },\n ipfs: {\n demandOption: false,\n describe: 'IPFS gateway endpoint',\n type: 'string',\n },\n port: {\n alias: 'p',\n demandOption: false,\n describe: 'The port the service will bind to',\n type: 'number',\n },\n 'disable-historical': {\n demandOption: false,\n default: false,\n describe: 'Disable storing historical state entities',\n type: 'boolean',\n },\n workers: {\n alias: 'w',\n demandOption: false,\n describe:\n 'Number of worker threads to use for fetching and processing blocks. Disabled by default.',\n type: 'number',\n },\n 'query-limit': {\n demandOption: false,\n describe:\n 'The limit of items a project can query with store.getByField at once',\n type: 'number',\n default: 100,\n },\n 'unfinalized-blocks': {\n demandOption: false,\n default: false,\n describe: 'Enable to fetch and index unfinalized blocks',\n type: 'boolean',\n },\n });\n"]}
|
|
1
|
+
{"version":3,"file":"yargs.js","sourceRoot":"","sources":["../src/yargs.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sCAAsC;;;;;;AAEtC,oDAAqD;AACrD,2CAAwC;AACxC,wDAAgC;AAEnB,QAAA,YAAY,GAAG,IAAA,eAAK,EAAC,IAAA,iBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACrD,GAAG,CAAC,YAAY,CAAC;KACjB,OAAO,CAAC;IACP,OAAO,EAAE,aAAa;IACtB,QAAQ,EACN,mIAAmI;IACrI,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QAChB,IAAA,mBAAU,EACR,IAAI,CAAC,KAAgB,EACrB,IAAI,CAAC,SAA+B,EACpC,IAAI,CAAC,QAA8B,CACpC,CAAC;QAEF,4EAA4E;QAC5E,8DAA8D;QAC9D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;QACpE,OAAO,cAAc,EAAE,CAAC;IAC1B,CAAC;CACF,CAAC;KACD,OAA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KAAK;QACd,QAAQ,EAAE,8CAA8C;QACxD,IAAI,EAAE,SAAS;KAChB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,KAAK;QACnB,QAAQ,EAAE,wDAAwD;KACnE;IACD,OAAO,EAAE;QACP,KAAK,EAAE,GAAG;QACV,YAAY,EAAE,KAAK;QACnB,QAAQ,EACN,0FAA0F;QAC5F,IAAI,EAAE,QAAQ;KACf;IACD,OAAO,EAAE;QACP,YAAY,EAAE,KAAK;QACnB,QAAQ,EACN,0KAA0K;QAC5K,IAAI,EAAE,QAAQ;KACf;IACD,QAAQ,EAAE;QACR,YAAY,EAAE,KAAK;QACnB,QAAQ,EACN,+EAA+E;QACjF,IAAI,EAAE,QAAQ;KACf;IACD,SAAS,EAAE;QACT,YAAY,EAAE,KAAK;QACnB,QAAQ,EACN,0GAA0G;QAC5G,IAAI,EAAE,QAAQ;KACf;IACD,uBAAuB,EAAE;QACvB,YAAY,EAAE,KAAK;QACnB,QAAQ,EACN,qEAAqE;QACvE,IAAI,EAAE,QAAQ;KACf;CACF,CAAC,CAAC","sourcesContent":["// Copyright 2020-2022 OnFinality Limited authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\nimport { initLogger } from '@subql/node-core/logger';\nimport { hideBin } from 'yargs/helpers';\nimport yargs from 'yargs/yargs';\n\nexport const yargsOptions = yargs(hideBin(process.argv))\n .env('SUBQL_NODE')\n .command({\n command: 'force-clean',\n describe:\n 'Clean the database dropping project schemas and tables. Once the command is executed, the application would exit upon completion.',\n builder: {},\n handler: (argv) => {\n initLogger(\n argv.debug as boolean,\n argv.outputFmt as 'json' | 'colored',\n argv.logLevel as string | undefined,\n );\n\n // lazy import to make sure logger is instantiated before all other services\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { forceCleanInit } = require('./subcommands/forceClean.init');\n return forceCleanInit();\n },\n })\n .command({\n command: 'reindex',\n describe:\n 'Reindex to specified block height. Historical must be enabled for the targeted project (--disable-historical=false). Once the command is executed, the application would exit upon completion.',\n builder: (yargs) =>\n yargs.options('targetHeight', {\n type: 'number',\n description: 'set targetHeight',\n require: true,\n }),\n handler: (argv) => {\n initLogger(\n argv.debug as boolean,\n argv.outputFmt as 'json' | 'colored',\n argv.logLevel as string | undefined,\n );\n // lazy import to make sure logger is instantiated before all other services\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { reindexInit } = require('./subcommands/reindex.init');\n return reindexInit(argv.targetHeight);\n },\n })\n .options({\n 'batch-size': {\n demandOption: false,\n describe: 'Batch size of blocks to fetch in one round',\n type: 'number',\n },\n config: {\n alias: 'c',\n demandOption: false,\n describe: 'Specify configuration file',\n type: 'string',\n },\n 'db-schema': {\n demandOption: false,\n describe: 'Db schema name of the project',\n type: 'string',\n },\n debug: {\n demandOption: false,\n describe:\n 'Show debug information to console output. will forcefully set log level to debug',\n type: 'boolean',\n default: false,\n },\n 'dictionary-timeout': {\n demandOption: false,\n describe: 'Max timeout for dictionary query',\n type: 'number',\n },\n 'disable-historical': {\n demandOption: false,\n default: false,\n describe: 'Disable storing historical state entities',\n type: 'boolean',\n },\n ipfs: {\n demandOption: false,\n describe: 'IPFS gateway endpoint',\n type: 'string',\n },\n local: {\n deprecated: true,\n type: 'boolean',\n demandOption: false,\n describe: 'Use local mode',\n },\n 'log-level': {\n demandOption: false,\n describe: 'Specify log level to print. Ignored when --debug is used',\n type: 'string',\n choices: ['fatal', 'error', 'warn', 'info', 'debug', 'trace', 'silent'],\n },\n 'mmr-path': {\n alias: 'm',\n demandOption: false,\n describe: 'Local path of the merkle mountain range (.mmr) file',\n type: 'string',\n },\n 'multi-chain': {\n demandOption: false,\n default: false,\n describe:\n 'Enables indexing multiple subquery projects into the same database schema',\n type: 'boolean',\n },\n 'network-dictionary': {\n alias: 'd',\n demandOption: false,\n describe: 'Specify the dictionary api for this network',\n type: 'string',\n },\n 'network-endpoint': {\n demandOption: false,\n type: 'string',\n describe: 'Blockchain network endpoint to connect',\n },\n 'output-fmt': {\n demandOption: false,\n describe: 'Print log as json or plain text',\n type: 'string',\n choices: ['json', 'colored'],\n },\n port: {\n alias: 'p',\n demandOption: false,\n describe: 'The port the service will bind to',\n type: 'number',\n },\n profiler: {\n demandOption: false,\n describe: 'Show profiler information to console output',\n type: 'boolean',\n default: false,\n },\n 'proof-of-index': {\n demandOption: false,\n describe: 'Enable/disable proof of index',\n type: 'boolean',\n default: false,\n },\n 'query-limit': {\n demandOption: false,\n describe:\n 'The limit of items a project can query with store.getByField at once',\n type: 'number',\n default: 100,\n },\n 'scale-batch-size': {\n type: 'boolean',\n demandOption: false,\n describe: 'scale batch size based on memory usage',\n default: false,\n },\n 'dictionary-resolver': {\n demandOption: false,\n describe: 'Use subquery network dictionary resolver',\n type: 'boolean',\n default: false,\n },\n subquery: {\n alias: 'f',\n demandOption: true,\n default: process.cwd(),\n describe: 'Local path or IPFS cid of the subquery project',\n type: 'string',\n },\n 'subquery-name': {\n deprecated: true,\n demandOption: false,\n describe: 'Name of the subquery project',\n type: 'string',\n },\n subscription: {\n demandOption: false,\n describe: 'Enable subscription by create notification triggers',\n type: 'boolean',\n default: false,\n },\n timeout: {\n demandOption: false,\n describe: 'Timeout for indexer sandbox to execute the mapping functions',\n type: 'number',\n },\n 'timestamp-field': {\n demandOption: false,\n describe: 'Enable/disable created_at and updated_at in schema',\n type: 'boolean',\n default: false,\n },\n 'unfinalized-blocks': {\n demandOption: false,\n default: false,\n describe: 'Enable to fetch and index unfinalized blocks',\n type: 'boolean',\n },\n unsafe: {\n type: 'boolean',\n demandOption: false,\n describe: 'Allows usage of any built-in module within the sandbox',\n },\n workers: {\n alias: 'w',\n demandOption: false,\n describe:\n 'Number of worker threads to use for fetching and processing blocks. Disabled by default.',\n type: 'number',\n },\n 'pg-ca': {\n demandOption: false,\n describe:\n 'Postgres ca certificate - to enables TLS/SSL connections to your PostgreSQL, path to the server certificate file are required, e.g /path/to/server-certificates/root.crt',\n type: 'string',\n },\n 'pg-key': {\n demandOption: false,\n describe:\n 'Postgres client key - Path to key file e.g /path/to/client-key/postgresql.key',\n type: 'string',\n },\n 'pg-cert': {\n demandOption: false,\n describe:\n 'Postgres client certificate - Path to client certificate e.g /path/to/client-certificates/postgresql.crt',\n type: 'string',\n },\n 'store-cache-threshold': {\n demandOption: false,\n describe:\n 'Store cache will flush when number of records excess this threshold',\n type: 'number',\n },\n });\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@subql/node-ethereum",
|
|
3
|
-
"version": "0.4.1-
|
|
3
|
+
"version": "0.4.1-storeCache-0.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Ian He",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@nestjs/event-emitter": "^1.3.0",
|
|
25
25
|
"@nestjs/platform-express": "^8.2.6",
|
|
26
26
|
"@nestjs/schedule": "^1.0.2",
|
|
27
|
-
"@subql/common": "1.
|
|
28
|
-
"@subql/common-ethereum": "
|
|
29
|
-
"@subql/node-core": "1.
|
|
30
|
-
"@subql/types-ethereum": "
|
|
31
|
-
"@subql/utils": "1.
|
|
27
|
+
"@subql/common": "^1.7.0",
|
|
28
|
+
"@subql/common-ethereum": "workspace:*",
|
|
29
|
+
"@subql/node-core": "1.10.1-storeCache-0.0.3",
|
|
30
|
+
"@subql/types-ethereum": "workspace:*",
|
|
31
|
+
"@subql/utils": "^1.4.1",
|
|
32
32
|
"@subql/x-merkle-mountain-range": "2.0.0-0.1.2",
|
|
33
33
|
"@willsoto/nestjs-prometheus": "^4.4.0",
|
|
34
34
|
"algosdk": "^1.13.1",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"reflect-metadata": "^0.1.13",
|
|
46
46
|
"rimraf": "^3.0.2",
|
|
47
47
|
"rxjs": "^7.5.2",
|
|
48
|
-
"sequelize": "6.
|
|
48
|
+
"sequelize": "6.28.0",
|
|
49
49
|
"tar": "^6.1.11",
|
|
50
50
|
"typescript": "^4.4.4",
|
|
51
51
|
"web3-providers-http": "^1.8.0",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"/dist",
|
|
75
75
|
"/bin"
|
|
76
76
|
],
|
|
77
|
-
"stableVersion": "0.4.1-
|
|
78
|
-
}
|
|
77
|
+
"stableVersion": "0.4.1-13"
|
|
78
|
+
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { EventEmitter2 } from '@nestjs/event-emitter';
|
|
2
|
-
import { IQueue, NodeConfig } from '@subql/node-core';
|
|
3
|
-
import { ProjectService } from '../project.service';
|
|
4
|
-
export declare type ProcessBlockResponse = {
|
|
5
|
-
dynamicDsCreated: boolean;
|
|
6
|
-
operationHash: Uint8Array;
|
|
7
|
-
reindexBlockHeight: number;
|
|
8
|
-
};
|
|
9
|
-
export interface IBlockDispatcher {
|
|
10
|
-
init(onDynamicDsCreated: (height: number) => Promise<void>): Promise<void>;
|
|
11
|
-
enqueueBlocks(heights: number[], latestBufferHeight?: number): void;
|
|
12
|
-
queueSize: number;
|
|
13
|
-
freeSize: number;
|
|
14
|
-
latestBufferedHeight: number | undefined;
|
|
15
|
-
flushQueue(height: number): void;
|
|
16
|
-
rewind(height: number): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
export declare abstract class BaseBlockDispatcher<Q extends IQueue> implements IBlockDispatcher {
|
|
19
|
-
protected nodeConfig: NodeConfig;
|
|
20
|
-
protected eventEmitter: EventEmitter2;
|
|
21
|
-
protected projectService: ProjectService;
|
|
22
|
-
protected queue: Q;
|
|
23
|
-
protected _latestBufferedHeight: number;
|
|
24
|
-
protected _processedBlockCount: number;
|
|
25
|
-
protected latestProcessedHeight: number;
|
|
26
|
-
protected currentProcessingHeight: number;
|
|
27
|
-
protected onDynamicDsCreated: (height: number) => Promise<void>;
|
|
28
|
-
constructor(nodeConfig: NodeConfig, eventEmitter: EventEmitter2, projectService: ProjectService, queue: Q);
|
|
29
|
-
abstract enqueueBlocks(heights: number[]): void;
|
|
30
|
-
abstract init(onDynamicDsCreated: (height: number) => Promise<void>): Promise<void>;
|
|
31
|
-
get queueSize(): number;
|
|
32
|
-
get freeSize(): number;
|
|
33
|
-
get latestBufferedHeight(): number;
|
|
34
|
-
set latestBufferedHeight(height: number);
|
|
35
|
-
protected setProcessedBlockCount(processedBlockCount: number): void;
|
|
36
|
-
rewind(lastCorrectHeight: number): Promise<void>;
|
|
37
|
-
flushQueue(height: number): void;
|
|
38
|
-
protected preProcessBlock(height: number): void;
|
|
39
|
-
protected postProcessBlock(height: number, processBlockResponse: ProcessBlockResponse): Promise<void>;
|
|
40
|
-
}
|