zold 0.24.0 → 0.24.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -0
- data/lib/zold/commands/remote.rb +2 -2
- data/lib/zold/node/front.rb +3 -2
- data/lib/zold/remotes.rb +2 -2
- data/lib/zold/version.rb +1 -1
- data/test/node/test_front.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd8af10e547ce516fb7605565eecedd43d5c2a518d20e9322bee2f487f30fe7d
|
4
|
+
data.tar.gz: 6538cd38132e668880d16b4a8175f1199a576cd61d8ca55eaeb93711c8e700a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29ed97e7b51046c5ad3ebcdbe7576d41ed7b5b1d1b1c73ff98c2ec266f48f14d7cd005e52719b876f9acfa8f2fac3f74e07cc1b1a06bd76c02cd75148a4dba8a
|
7
|
+
data.tar.gz: 79e365ba3997f36592ed4bbe2f5a89a66689aede0f6d6a62019c8ef7e76ad932283c6ad03e38007062cf28a8b4db5f6583e2e57f3df2e7070ae0698f23d0671f
|
data/README.md
CHANGED
@@ -25,6 +25,8 @@ Join our [Telegram group](https://t.me/zold_io) to discuss it all live.
|
|
25
25
|
|
26
26
|
The license is [MIT](https://github.com/zold-io/zold/blob/master/LICENSE.txt).
|
27
27
|
|
28
|
+
The web wallet is here: [wts.zold.io](https://wts.zold.io).
|
29
|
+
|
28
30
|
## How to Use
|
29
31
|
|
30
32
|
First, install [Ruby 2.3+](https://www.ruby-lang.org/en/documentation/installation/),
|
@@ -144,6 +146,26 @@ docker run -d -p 4096:4096 -v zold:/zold yegor256/zold /node.sh --host=<your hos
|
|
144
146
|
You may find this blog post useful:
|
145
147
|
[How to Run Zold Node?](https://blog.zold.io/2019/01/10/how-to-run-node.html)
|
146
148
|
|
149
|
+
## If Your File System is on Fire (or How to Reduce Your Hard Disk Usage)
|
150
|
+
|
151
|
+
At the moment, the file system is utilised too aggressively and if you
|
152
|
+
like to calm this process down and have a bit of spare memory, you may
|
153
|
+
find the following approach handy (directly applicable to FreeBSD OS).
|
154
|
+
|
155
|
+
The application data can be moved to [a memory-backed memory disk](https://www.freebsd.org/doc/handbook/disks-virtual.html)
|
156
|
+
with a periodical syncing of `farm`, `zold.log` and `.zolddata` to the
|
157
|
+
hard disk.
|
158
|
+
|
159
|
+
The `/etc/fstab` entry:
|
160
|
+
```
|
161
|
+
md /usr/home/zold/app-in-mem mfs rw,-M,-n,-s512m,-wzold:zold,-p0755 2 0
|
162
|
+
```
|
163
|
+
|
164
|
+
The `/etc/crontab` entry:
|
165
|
+
```
|
166
|
+
*/10 * * * * zold /usr/local/bin/rsync -aubv /usr/home/zold/app-in-mem/farm /usr/home/zold/app-in-mem/zold.log /usr/home/zold/app-in-mem/.zoldata /usr/home/zold/app/
|
167
|
+
```
|
168
|
+
|
147
169
|
## Frequently Asked Questions
|
148
170
|
|
149
171
|
> Where are my RSA private/public keys?
|
data/lib/zold/commands/remote.rb
CHANGED
@@ -115,8 +115,8 @@ Available options:"
|
|
115
115
|
'Don\'t fail if ping fails, just report the problem in the log',
|
116
116
|
default: false
|
117
117
|
o.integer '--depth',
|
118
|
-
'The amount of update cycles to run, in order to fetch as many nodes as possible (default:
|
119
|
-
default:
|
118
|
+
'The amount of update cycles to run, in order to fetch as many nodes as possible (default: 2)',
|
119
|
+
default: 2
|
120
120
|
o.string '--network',
|
121
121
|
"The name of the network we work in (default: #{Wallet::MAINET})",
|
122
122
|
required: true,
|
data/lib/zold/node/front.rb
CHANGED
@@ -59,6 +59,7 @@ module Zold
|
|
59
59
|
set :start, Time.now
|
60
60
|
set :lock, false
|
61
61
|
set :show_exceptions, false
|
62
|
+
set :raise_errors, false
|
62
63
|
set :server, :thin
|
63
64
|
set :opts, nil # to be injected at node.rb
|
64
65
|
set :log, nil # to be injected at node.rb
|
@@ -370,7 +371,7 @@ this is not a normal behavior, you may want to report a bug to our GitHub reposi
|
|
370
371
|
|
371
372
|
get '/wallets' do
|
372
373
|
content_type('text/plain')
|
373
|
-
settings.wallets.all.map(&:to_s).join(
|
374
|
+
settings.wallets.all.map(&:to_s).join("\n")
|
374
375
|
end
|
375
376
|
|
376
377
|
get '/remotes' do
|
@@ -401,7 +402,7 @@ this is not a normal behavior, you may want to report a bug to our GitHub reposi
|
|
401
402
|
date: parts[2],
|
402
403
|
source: parts[3],
|
403
404
|
target: parts[4],
|
404
|
-
amount: parts[5],
|
405
|
+
amount: parts[5].to_i,
|
405
406
|
prefix: parts[6],
|
406
407
|
details: parts[7]
|
407
408
|
}
|
data/lib/zold/remotes.rb
CHANGED
@@ -45,7 +45,7 @@ module Zold
|
|
45
45
|
# When something is wrong with the assertion
|
46
46
|
class CantAssert < StandardError; end
|
47
47
|
|
48
|
-
attr_reader :touched
|
48
|
+
attr_reader :touched, :idx
|
49
49
|
|
50
50
|
def initialize(host:, port:, score:, idx:, master:, network: 'test', log: Log::NULL)
|
51
51
|
@host = host
|
@@ -215,7 +215,7 @@ at #{response.headers['X-Zold-Path']}"
|
|
215
215
|
unerror(r[:host], r[:port]) if node.touched
|
216
216
|
rescue StandardError => e
|
217
217
|
error(r[:host], r[:port])
|
218
|
-
log.info("#{Rainbow(node).red}: #{e.message} in #{Age.new(start)}")
|
218
|
+
log.info("#{Rainbow(node).red}: \"#{e.message.strip}\" in #{Age.new(start)}")
|
219
219
|
log.debug(Backtrace.new(e).to_s)
|
220
220
|
remove(r[:host], r[:port]) if r[:errors] > TOLERANCE
|
221
221
|
end
|
data/lib/zold/version.rb
CHANGED
data/test/node/test_front.rb
CHANGED
@@ -181,7 +181,7 @@ class FrontTest < Zold::Test
|
|
181
181
|
assert_equal_wait(200) { Zold::Http.new(uri: "#{base}/wallet/#{wallet.id}").get.status }
|
182
182
|
response = Zold::Http.new(uri: "#{base}/wallets").get
|
183
183
|
assert_equal(200, response.status, response.body)
|
184
|
-
assert(response.body.to_s.include?(wallet.id), response.body)
|
184
|
+
assert(response.body.to_s.split("\n").include?(wallet.id.to_s), response.body)
|
185
185
|
end
|
186
186
|
end
|
187
187
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backtrace
|
@@ -753,7 +753,7 @@ licenses:
|
|
753
753
|
- MIT
|
754
754
|
metadata: {}
|
755
755
|
post_install_message: |-
|
756
|
-
Thanks for installing Zold 0.24.
|
756
|
+
Thanks for installing Zold 0.24.1!
|
757
757
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
758
758
|
Read our blog posts: https://blog.zold.io
|
759
759
|
Try ZLD online wallet at: https://wts.zold.io
|