zold 0.16.23 → 0.16.24
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.
- checksums.yaml +4 -4
- data/bin/zold +69 -59
- data/fixtures/scripts/redeploy-on-upgrade.sh +1 -1
- data/lib/zold/commands/node.rb +1 -5
- data/lib/zold/node/front.rb +4 -0
- data/lib/zold/version.rb +1 -1
- data/zold.gemspec +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be5fb06b537fc4c9e80b30fadf5f6cd1e1a344e7604dfecdc1ac78ed46176063
|
4
|
+
data.tar.gz: 9fbb3d142ca8047324eac09dc35beac86ba0cca2c72649034de550c220553cc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c90d865cabb1b36ae83ed263f2779d725ff98a15fd93606a94ca088522853aea674f2b8a1142e865849b4f2fee2522275adcb8bc918a0a021ca992a6be78409
|
7
|
+
data.tar.gz: 9fa78df566ec34dd99ebfb8ae24160295232245a2e75ee55be033d5c53a77f897cb52ce1e28609d15b5187de2861b0766699734c471b4c73c93e12216cf035ae
|
data/bin/zold
CHANGED
@@ -28,6 +28,7 @@ start = Time.now
|
|
28
28
|
require 'slop'
|
29
29
|
require 'rainbow'
|
30
30
|
require 'backtrace'
|
31
|
+
require 'memory_profiler'
|
31
32
|
require_relative '../lib/zold'
|
32
33
|
require_relative '../lib/zold/version'
|
33
34
|
require_relative '../lib/zold/wallet'
|
@@ -110,6 +111,7 @@ Available options:"
|
|
110
111
|
default: Zold::Wallet::MAIN_NETWORK
|
111
112
|
o.bool '-h', '--help', 'Show these instructions'
|
112
113
|
o.bool '--trace', 'Show full stack trace in case of a problem'
|
114
|
+
o.bool '--memory-dump', 'Dump memory snapshot afterwards, to the console', default: false
|
113
115
|
o.bool '--skip-upgrades', 'Don\'t upgrade the storage', default: false
|
114
116
|
o.bool '--ignore-global-config', 'Don\'t read options from the ~/.zold file'
|
115
117
|
o.on '--no-colors', 'Disable colors in the ouput' do
|
@@ -183,66 +185,74 @@ Available options:"
|
|
183
185
|
|
184
186
|
log.debug("Network: #{opts['network']} (#{opts['network'] == Zold::Wallet::MAIN_NETWORK ? 'main' : 'test'} net)")
|
185
187
|
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
188
|
+
cmd = lambda do
|
189
|
+
case command
|
190
|
+
when 'node'
|
191
|
+
require_relative '../lib/zold/commands/node'
|
192
|
+
Zold::Node.new(wallets: wallets, remotes: remotes, copies: copies, log: log).run(args)
|
193
|
+
when 'create'
|
194
|
+
require_relative '../lib/zold/commands/create'
|
195
|
+
Zold::Create.new(wallets: wallets, log: log).run(args)
|
196
|
+
when 'remote'
|
197
|
+
require_relative '../lib/zold/commands/remote'
|
198
|
+
Zold::Remote.new(remotes: remotes, log: log).run(args)
|
199
|
+
when 'invoice'
|
200
|
+
require_relative '../lib/zold/commands/invoice'
|
201
|
+
Zold::Invoice.new(wallets: wallets, remotes: remotes, copies: copies, log: log).run(args)
|
202
|
+
when 'pay'
|
203
|
+
require_relative '../lib/zold/commands/pay'
|
204
|
+
Zold::Pay.new(wallets: wallets, remotes: remotes, log: log).run(args)
|
205
|
+
when 'show'
|
206
|
+
require_relative '../lib/zold/commands/show'
|
207
|
+
Zold::Show.new(wallets: wallets, log: log).run(args)
|
208
|
+
when 'list'
|
209
|
+
require_relative '../lib/zold/commands/list'
|
210
|
+
Zold::List.new(wallets: wallets, log: log).run(args)
|
211
|
+
when 'fetch'
|
212
|
+
require_relative '../lib/zold/commands/fetch'
|
213
|
+
Zold::Fetch.new(wallets: wallets, remotes: remotes, copies: copies, log: log).run(args)
|
214
|
+
when 'clean'
|
215
|
+
require_relative '../lib/zold/commands/clean'
|
216
|
+
Zold::Clean.new(wallets: wallets, copies: copies, log: log).run(args)
|
217
|
+
when 'remove'
|
218
|
+
require_relative '../lib/zold/commands/remove'
|
219
|
+
Zold::Remove.new(wallets: wallets, log: log).run(args)
|
220
|
+
when 'diff'
|
221
|
+
require_relative '../lib/zold/commands/diff'
|
222
|
+
Zold::Diff.new(wallets: wallets, copies: copies, log: log).run(args)
|
223
|
+
when 'merge'
|
224
|
+
require_relative '../lib/zold/commands/merge'
|
225
|
+
Zold::Merge.new(wallets: wallets, copies: copies, log: log).run(args)
|
226
|
+
when 'propagate'
|
227
|
+
require_relative '../lib/zold/commands/propagate'
|
228
|
+
Zold::Propagate.new(wallets: wallets, log: log).run(args)
|
229
|
+
when 'pull'
|
230
|
+
require_relative '../lib/zold/commands/pull'
|
231
|
+
Zold::Pull.new(wallets: wallets, remotes: remotes, copies: copies, log: log).run(args)
|
232
|
+
when 'taxes'
|
233
|
+
require_relative '../lib/zold/commands/taxes'
|
234
|
+
Zold::Taxes.new(wallets: wallets, remotes: remotes, log: log).run(args)
|
235
|
+
when 'push'
|
236
|
+
require_relative '../lib/zold/commands/push'
|
237
|
+
Zold::Push.new(wallets: wallets, remotes: remotes, log: log).run(args)
|
238
|
+
when 'alias'
|
239
|
+
require_relative '../lib/zold/commands/alias'
|
240
|
+
Zold::Alias.new(wallets: wallets, log: log).run(args)
|
241
|
+
when 'score'
|
242
|
+
require_relative '../lib/zold/commands/calculate'
|
243
|
+
Zold::Calculate.new(log: log).run(args)
|
244
|
+
when 'next'
|
245
|
+
require_relative '../lib/zold/commands/next'
|
246
|
+
Zold::Next.new(log: log).run(args)
|
247
|
+
else
|
248
|
+
raise "Command '#{command}' is not supported"
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
if opts['memory-dump']
|
253
|
+
MemoryProfiler.report(top: 20) { cmd.call }.pretty_print
|
244
254
|
else
|
245
|
-
|
255
|
+
cmd.call
|
246
256
|
end
|
247
257
|
rescue StandardError => ex
|
248
258
|
log.error("#{ex.message} (#{ex.class.name})")
|
@@ -7,7 +7,7 @@ function start_node {
|
|
7
7
|
zold node $3 --nohup --nohup-command='touch restarted' --nohup-log=log --nohup-max-cycles=0 --nohup-log-truncate=10240 \
|
8
8
|
--expose-version=$2 --save-pid=pid --routine-immediately \
|
9
9
|
--verbose --trace --invoice=REDEPLOY@ffffffffffffffff \
|
10
|
-
--host=127.0.0.1 --port=$1 --bind-port=$1 --threads=1 --strength=20 > /dev/null 2>&1
|
10
|
+
--host=127.0.0.1 --port=$1 --bind-port=$1 --threads=1 --strength=20 --memory-dump > /dev/null 2>&1
|
11
11
|
wait_for_port $1
|
12
12
|
cat pid
|
13
13
|
cd ..
|
data/lib/zold/commands/node.rb
CHANGED
@@ -124,18 +124,15 @@ module Zold
|
|
124
124
|
default: '~/.ssh/id_rsa'
|
125
125
|
o.string '--network',
|
126
126
|
"The name of the network (default: #{Wallet::MAIN_NETWORK})",
|
127
|
-
require: true,
|
128
127
|
default: Wallet::MAIN_NETWORK
|
129
128
|
o.integer '--nohup-max-cycles',
|
130
129
|
'Maximum amount of nohup re-starts (-1 by default, which means forever)',
|
131
|
-
require: true,
|
132
130
|
default: -1
|
133
131
|
o.string '--home',
|
134
132
|
"Home directory (default: #{Dir.pwd})",
|
135
133
|
default: Dir.pwd
|
136
134
|
o.bool '--no-metronome',
|
137
135
|
'Don\'t run the metronome',
|
138
|
-
required: true,
|
139
136
|
default: false
|
140
137
|
o.bool '--disable-push',
|
141
138
|
'Prohibit all PUSH requests',
|
@@ -144,8 +141,7 @@ module Zold
|
|
144
141
|
'Prohibit all FETCH requests',
|
145
142
|
default: false
|
146
143
|
o.string '--alias',
|
147
|
-
'The alias of the node (default: host:port)'
|
148
|
-
require: false
|
144
|
+
'The alias of the node (default: host:port)'
|
149
145
|
o.string '--no-spawn',
|
150
146
|
'Don\'t use child processes for the score farm',
|
151
147
|
default: false
|
data/lib/zold/node/front.rb
CHANGED
data/lib/zold/version.rb
CHANGED
data/zold.gemspec
CHANGED
@@ -61,6 +61,7 @@ and suggests a different architecture for digital wallet maintenance.'
|
|
61
61
|
s.add_runtime_dependency 'futex', '0.3.1'
|
62
62
|
s.add_runtime_dependency 'get_process_mem', '0.2.3'
|
63
63
|
s.add_runtime_dependency 'json', '2.1.0'
|
64
|
+
s.add_runtime_dependency 'memory_profiler', '0.9.12'
|
64
65
|
s.add_runtime_dependency 'openssl', '2.1.2'
|
65
66
|
s.add_runtime_dependency 'posix-spawn', '0.3.13'
|
66
67
|
s.add_runtime_dependency 'rainbow', '3.0.0'
|
@@ -78,7 +79,6 @@ and suggests a different architecture for digital wallet maintenance.'
|
|
78
79
|
s.add_runtime_dependency 'zache', '0.3.1'
|
79
80
|
s.add_runtime_dependency 'zold-score', '0.2.2'
|
80
81
|
s.add_development_dependency 'codecov', '0.1.13'
|
81
|
-
s.add_development_dependency 'memory_profiler', '0.9.12'
|
82
82
|
s.add_development_dependency 'minitest', '5.11.3'
|
83
83
|
s.add_development_dependency 'minitest-hooks', '1.5.0'
|
84
84
|
s.add_development_dependency 'random-port', '0.3.1'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 2.1.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: memory_profiler
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.9.12
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.9.12
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: openssl
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -346,20 +360,6 @@ dependencies:
|
|
346
360
|
- - '='
|
347
361
|
- !ruby/object:Gem::Version
|
348
362
|
version: 0.1.13
|
349
|
-
- !ruby/object:Gem::Dependency
|
350
|
-
name: memory_profiler
|
351
|
-
requirement: !ruby/object:Gem::Requirement
|
352
|
-
requirements:
|
353
|
-
- - '='
|
354
|
-
- !ruby/object:Gem::Version
|
355
|
-
version: 0.9.12
|
356
|
-
type: :development
|
357
|
-
prerelease: false
|
358
|
-
version_requirements: !ruby/object:Gem::Requirement
|
359
|
-
requirements:
|
360
|
-
- - '='
|
361
|
-
- !ruby/object:Gem::Version
|
362
|
-
version: 0.9.12
|
363
363
|
- !ruby/object:Gem::Dependency
|
364
364
|
name: minitest
|
365
365
|
requirement: !ruby/object:Gem::Requirement
|