zold 0.31.8 → 0.31.9
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/.0pdd.yml +20 -0
- data/.github/workflows/actionlint.yml +41 -0
- data/.github/workflows/codecov.yml +23 -4
- data/.github/workflows/copyrights.yml +30 -0
- data/.github/workflows/pdd.yml +26 -3
- data/.github/workflows/rake.yml +24 -2
- data/.github/workflows/xcop.yml +21 -2
- data/.github/workflows/yamllint.yml +34 -0
- data/.gitignore +2 -1
- data/.rubocop.yml +21 -0
- data/.ruby-version +1 -1
- data/.rultor.yml +35 -5
- data/.simplecov +1 -1
- data/Dockerfile +29 -3
- data/Gemfile +10 -10
- data/Gemfile.lock +340 -0
- data/LICENSE.txt +1 -1
- data/Rakefile +9 -12
- data/bin/zold +1 -1
- data/cucumber.yml +20 -0
- data/deploy.sh +20 -0
- data/features/step_definitions/steps.rb +1 -1
- data/features/support/env.rb +1 -1
- data/fixtures/merge/asserts.rb +1 -1
- data/fixtures/merge/into_no_wallet/assert.rb +1 -1
- data/fixtures/merge/legacy_negatives_stay/assert.rb +1 -1
- data/fixtures/merge/missed_wallets/assert.rb +1 -1
- data/fixtures/merge/negative_overwriting/assert.rb +1 -1
- data/fixtures/merge/negatives_in_between/assert.rb +1 -1
- data/fixtures/merge/random_expenses/assert.rb +1 -1
- data/fixtures/merge/simple_case/assert.rb +1 -1
- data/fixtures/merge/unconfirmed_income/assert.rb +1 -1
- data/fixtures/scripts/_head.sh +21 -1
- data/fixtures/scripts/calculate-scores.sh +19 -0
- data/fixtures/scripts/distribute-wallet.sh +19 -0
- data/fixtures/scripts/print-helps.sh +19 -0
- data/fixtures/scripts/pull-on-start.sh +19 -0
- data/fixtures/scripts/push-and-pull.sh +19 -0
- data/fixtures/scripts/redeploy-on-upgrade.sh +19 -0
- data/fixtures/scripts/spread-wallets.sh +19 -0
- data/lib/zold/age.rb +2 -2
- data/lib/zold/amount.rb +2 -2
- data/lib/zold/cached_wallets.rb +3 -3
- data/lib/zold/commands/alias.rb +20 -0
- data/lib/zold/commands/args.rb +2 -2
- data/lib/zold/commands/calculate.rb +2 -2
- data/lib/zold/commands/clean.rb +2 -2
- data/lib/zold/commands/create.rb +2 -2
- data/lib/zold/commands/diff.rb +2 -2
- data/lib/zold/commands/fetch.rb +2 -2
- data/lib/zold/commands/invoice.rb +2 -2
- data/lib/zold/commands/list.rb +2 -2
- data/lib/zold/commands/merge.rb +2 -2
- data/lib/zold/commands/next.rb +2 -2
- data/lib/zold/commands/node.rb +2 -2
- data/lib/zold/commands/pay.rb +2 -2
- data/lib/zold/commands/propagate.rb +2 -2
- data/lib/zold/commands/pull.rb +2 -2
- data/lib/zold/commands/push.rb +2 -2
- data/lib/zold/commands/remote.rb +2 -2
- data/lib/zold/commands/remove.rb +2 -2
- data/lib/zold/commands/routines/audit.rb +2 -2
- data/lib/zold/commands/routines/gc.rb +2 -2
- data/lib/zold/commands/routines/reconcile.rb +2 -2
- data/lib/zold/commands/routines/reconnect.rb +2 -2
- data/lib/zold/commands/routines/retire.rb +2 -2
- data/lib/zold/commands/routines/spread.rb +2 -2
- data/lib/zold/commands/routines.rb +2 -2
- data/lib/zold/commands/show.rb +2 -2
- data/lib/zold/commands/taxes.rb +2 -2
- data/lib/zold/commands/thread_badge.rb +3 -3
- data/lib/zold/copies.rb +2 -2
- data/lib/zold/dir_items.rb +2 -2
- data/lib/zold/endless.rb +2 -2
- data/lib/zold/gem.rb +2 -2
- data/lib/zold/hands.rb +2 -2
- data/lib/zold/head.rb +3 -3
- data/lib/zold/hexnum.rb +2 -2
- data/lib/zold/http.rb +3 -3
- data/lib/zold/hungry_wallets.rb +2 -2
- data/lib/zold/id.rb +2 -2
- data/lib/zold/json_page.rb +2 -2
- data/lib/zold/key.rb +2 -2
- data/lib/zold/log.rb +2 -2
- data/lib/zold/metronome.rb +2 -2
- data/lib/zold/node/async_entrance.rb +2 -2
- data/lib/zold/node/entrance.rb +2 -2
- data/lib/zold/node/farm.rb +2 -2
- data/lib/zold/node/farmers.rb +2 -2
- data/lib/zold/node/front.rb +3 -3
- data/lib/zold/node/journaled_pipeline.rb +2 -2
- data/lib/zold/node/nodup_entrance.rb +2 -2
- data/lib/zold/node/nospam_entrance.rb +2 -2
- data/lib/zold/node/pipeline.rb +2 -2
- data/lib/zold/node/safe_entrance.rb +2 -2
- data/lib/zold/node/soft_error.rb +2 -2
- data/lib/zold/node/spread_entrance.rb +2 -2
- data/lib/zold/node/sync_entrance.rb +2 -2
- data/lib/zold/node/trace.rb +2 -2
- data/lib/zold/patch.rb +2 -2
- data/lib/zold/prefixes.rb +2 -2
- data/lib/zold/remotes.rb +2 -2
- data/lib/zold/signature.rb +2 -2
- data/lib/zold/size.rb +2 -2
- data/lib/zold/sync_wallets.rb +2 -2
- data/lib/zold/tax.rb +2 -2
- data/lib/zold/thread_pool.rb +2 -2
- data/lib/zold/tree_wallets.rb +2 -2
- data/lib/zold/txn.rb +2 -2
- data/lib/zold/txns.rb +3 -3
- data/lib/zold/upgrades.rb +1 -1
- data/lib/zold/verbose_thread.rb +2 -2
- data/lib/zold/version.rb +3 -3
- data/lib/zold/version_file.rb +1 -1
- data/lib/zold/wallet.rb +2 -2
- data/lib/zold/wallets.rb +2 -2
- data/lib/zold.rb +2 -2
- data/test/commands/routines/test_audit.rb +4 -4
- data/test/commands/routines/test_gc.rb +8 -8
- data/test/commands/routines/test_reconcile.rb +4 -4
- data/test/commands/routines/test_reconnect.rb +3 -3
- data/test/commands/routines/test_retire.rb +3 -3
- data/test/commands/test_alias.rb +26 -6
- data/test/commands/test_calculate.rb +3 -3
- data/test/commands/test_clean.rb +10 -10
- data/test/commands/test_create.rb +3 -3
- data/test/commands/test_diff.rb +5 -5
- data/test/commands/test_fetch.rb +9 -9
- data/test/commands/test_invoice.rb +3 -3
- data/test/commands/test_list.rb +3 -3
- data/test/commands/test_merge.rb +12 -12
- data/test/commands/test_node.rb +6 -6
- data/test/commands/test_pay.rb +19 -19
- data/test/commands/test_propagate.rb +5 -5
- data/test/commands/test_pull.rb +6 -6
- data/test/commands/test_push.rb +9 -9
- data/test/commands/test_remote.rb +11 -11
- data/test/commands/test_remove.rb +10 -10
- data/test/commands/test_show.rb +3 -3
- data/test/commands/test_taxes.rb +4 -4
- data/test/fake_home.rb +2 -2
- data/test/node/fake_entrance.rb +2 -2
- data/test/node/fake_node.rb +57 -40
- data/test/node/test_async_entrance.rb +10 -10
- data/test/node/test_entrance.rb +8 -8
- data/test/node/test_farm.rb +11 -11
- data/test/node/test_farmers.rb +5 -5
- data/test/node/test_front.rb +29 -28
- data/test/node/test_nodup_entrance.rb +4 -4
- data/test/node/test_nospam_entrance.rb +3 -3
- data/test/node/test_safe_entrance.rb +4 -4
- data/test/node/test_spread_entrance.rb +8 -8
- data/test/node/test_sync_entrance.rb +4 -4
- data/test/node/test_trace.rb +2 -2
- data/test/test__helper.rb +4 -4
- data/test/test_age.rb +2 -2
- data/test/test_amount.rb +2 -2
- data/test/test_cached_wallets.rb +2 -2
- data/test/test_copies.rb +12 -12
- data/test/test_dir_items.rb +4 -4
- data/test/test_gem.rb +20 -0
- data/test/test_hands.rb +2 -2
- data/test/test_hexnum.rb +2 -2
- data/test/test_http.rb +8 -8
- data/test/test_hungry_wallets.rb +11 -11
- data/test/test_id.rb +2 -2
- data/test/test_json_page.rb +2 -2
- data/test/test_key.rb +2 -2
- data/test/test_log.rb +5 -5
- data/test/test_metronome.rb +6 -6
- data/test/test_patch.rb +14 -14
- data/test/test_prefixes.rb +3 -3
- data/test/test_remotes.rb +9 -9
- data/test/test_signature.rb +2 -2
- data/test/test_size.rb +2 -2
- data/test/test_sync_wallets.rb +3 -3
- data/test/test_tax.rb +9 -9
- data/test/test_thread_pool.rb +8 -8
- data/test/test_tree_wallets.rb +2 -2
- data/test/test_txn.rb +2 -2
- data/test/test_upgrades.rb +2 -2
- data/test/test_verbose_thread.rb +2 -2
- data/test/test_version.rb +20 -0
- data/test/test_wallet.rb +22 -22
- data/test/test_wallets.rb +5 -5
- data/test/test_zold.rb +5 -5
- data/test/upgrades/test_delete_banned_wallets.rb +4 -4
- data/test/upgrades/test_protocol_up.rb +4 -4
- data/upgrades/2.rb +1 -1
- data/upgrades/delete_banned_wallets.rb +1 -1
- data/upgrades/move_wallets_into_tree.rb +1 -1
- data/upgrades/protocol_up.rb +1 -1
- data/upgrades/rename_foreign_wallets.rb +1 -1
- data/zold.gemspec +23 -23
- metadata +7 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
# Thread badge.
|
|
24
24
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
25
|
-
# Copyright:: Copyright (c) 2018
|
|
25
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
26
26
|
# License:: MIT
|
|
27
27
|
module Zold
|
|
28
28
|
# This module should be included in each command, in order to label
|
|
@@ -38,7 +38,7 @@ module Zold
|
|
|
38
38
|
before = Thread.current.name || ''
|
|
39
39
|
Thread.current.name = "#{before}:#{self.class.name.gsub(/^Zold::/, '')}"
|
|
40
40
|
begin
|
|
41
|
-
super
|
|
41
|
+
super
|
|
42
42
|
ensure
|
|
43
43
|
Thread.current.name = before
|
|
44
44
|
end
|
data/lib/zold/copies.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -32,7 +32,7 @@ require_relative 'dir_items'
|
|
|
32
32
|
|
|
33
33
|
# The list of copies.
|
|
34
34
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
35
|
-
# Copyright:: Copyright (c) 2018
|
|
35
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
36
36
|
# License:: MIT
|
|
37
37
|
module Zold
|
|
38
38
|
# All copies
|
data/lib/zold/dir_items.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -29,7 +29,7 @@ require 'shellwords'
|
|
|
29
29
|
# More: https://stackoverflow.com/questions/52987672/
|
|
30
30
|
#
|
|
31
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
32
|
-
# Copyright:: Copyright (c) 2018
|
|
32
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
33
33
|
# License:: MIT
|
|
34
34
|
module Zold
|
|
35
35
|
# Items in a dir
|
data/lib/zold/endless.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -26,7 +26,7 @@ require_relative 'age'
|
|
|
26
26
|
|
|
27
27
|
# Endless loop.
|
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
29
|
-
# Copyright:: Copyright (c) 2018
|
|
29
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
30
30
|
# License:: MIT
|
|
31
31
|
module Zold
|
|
32
32
|
# Endless loop
|
data/lib/zold/gem.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -27,7 +27,7 @@ require_relative 'http'
|
|
|
27
27
|
|
|
28
28
|
# Class representing the Zold gem on Rubygems
|
|
29
29
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
30
|
-
# Copyright:: Copyright (c) 2018
|
|
30
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
31
31
|
# License:: MIT
|
|
32
32
|
module Zold
|
|
33
33
|
# Gem
|
data/lib/zold/hands.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -28,7 +28,7 @@ require_relative 'endless'
|
|
|
28
28
|
|
|
29
29
|
# Multiple threads that can do something useful together.
|
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
31
|
-
# Copyright:: Copyright (c) 2018
|
|
31
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
32
32
|
# License:: MIT
|
|
33
33
|
module Zold
|
|
34
34
|
# Hands
|
data/lib/zold/head.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -24,7 +24,7 @@ require_relative 'txn'
|
|
|
24
24
|
|
|
25
25
|
# Head of a wallet.
|
|
26
26
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
27
|
-
# Copyright:: Copyright (c) 2018
|
|
27
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
28
28
|
# License:: MIT
|
|
29
29
|
module Zold
|
|
30
30
|
# Head of the wallet.
|
|
@@ -53,7 +53,7 @@ module Zold
|
|
|
53
53
|
|
|
54
54
|
# Cached head.
|
|
55
55
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
56
|
-
# Copyright:: Copyright (c) 2018
|
|
56
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
57
57
|
# License:: MIT
|
|
58
58
|
class CachedHead
|
|
59
59
|
def initialize(head)
|
data/lib/zold/hexnum.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
# Hex num.
|
|
24
24
|
#
|
|
25
25
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
26
|
-
# Copyright:: Copyright (c) 2018
|
|
26
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
27
27
|
# License:: MIT
|
|
28
28
|
module Zold
|
|
29
29
|
# A hex num
|
data/lib/zold/http.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -29,7 +29,7 @@ require_relative 'version'
|
|
|
29
29
|
|
|
30
30
|
# HTTP page.
|
|
31
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
32
|
-
# Copyright:: Copyright (c) 2018
|
|
32
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
33
33
|
# License:: MIT
|
|
34
34
|
module Zold
|
|
35
35
|
# Some clients waits for status method in response
|
|
@@ -50,7 +50,7 @@ module Zold
|
|
|
50
50
|
# The error, if connection fails
|
|
51
51
|
class HttpError < HttpResponse
|
|
52
52
|
def initialize(ex)
|
|
53
|
-
super
|
|
53
|
+
super
|
|
54
54
|
@ex = ex
|
|
55
55
|
end
|
|
56
56
|
|
data/lib/zold/hungry_wallets.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -31,7 +31,7 @@ require_relative 'commands/fetch'
|
|
|
31
31
|
# Wallets that PULL what's missing, in the background.
|
|
32
32
|
#
|
|
33
33
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
34
|
-
# Copyright:: Copyright (c) 2018
|
|
34
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
35
35
|
# License:: MIT
|
|
36
36
|
module Zold
|
|
37
37
|
# Wallets decorator that adds missing wallets to the queue to be pulled later.
|
data/lib/zold/id.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -25,7 +25,7 @@ require 'securerandom'
|
|
|
25
25
|
|
|
26
26
|
# The ID of the wallet.
|
|
27
27
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
28
|
-
# Copyright:: Copyright (c) 2018
|
|
28
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
29
29
|
# License:: MIT
|
|
30
30
|
module Zold
|
|
31
31
|
# Id of the wallet
|
data/lib/zold/json_page.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -24,7 +24,7 @@ require 'json'
|
|
|
24
24
|
|
|
25
25
|
# JSON page.
|
|
26
26
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
27
|
-
# Copyright:: Copyright (c) 2018
|
|
27
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
28
28
|
# License:: MIT
|
|
29
29
|
module Zold
|
|
30
30
|
# JSON page
|
data/lib/zold/key.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -27,7 +27,7 @@ require 'tempfile'
|
|
|
27
27
|
|
|
28
28
|
# The RSA key (either private or public).
|
|
29
29
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
30
|
-
# Copyright:: Copyright (c) 2018
|
|
30
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
31
31
|
# License:: MIT
|
|
32
32
|
module Zold
|
|
33
33
|
# A key
|
data/lib/zold/log.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -25,7 +25,7 @@ require 'rainbow'
|
|
|
25
25
|
|
|
26
26
|
# Zold module.
|
|
27
27
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
28
|
-
# Copyright:: Copyright (c) 2018
|
|
28
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
29
29
|
# License:: MIT
|
|
30
30
|
module Zold
|
|
31
31
|
# Logging facilities.
|
data/lib/zold/metronome.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -29,7 +29,7 @@ require_relative 'thread_pool'
|
|
|
29
29
|
|
|
30
30
|
# Background routines.
|
|
31
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
32
|
-
# Copyright:: Copyright (c) 2018
|
|
32
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
33
33
|
# License:: MIT
|
|
34
34
|
module Zold
|
|
35
35
|
# Metronome
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -33,7 +33,7 @@ require_relative 'soft_error'
|
|
|
33
33
|
|
|
34
34
|
# The async entrance of the web front.
|
|
35
35
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
36
|
-
# Copyright:: Copyright (c) 2018
|
|
36
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
37
37
|
# License:: MIT
|
|
38
38
|
module Zold
|
|
39
39
|
# The entrance
|
data/lib/zold/node/entrance.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -26,7 +26,7 @@ require_relative '../log'
|
|
|
26
26
|
|
|
27
27
|
# The entrance of the web front.
|
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
29
|
-
# Copyright:: Copyright (c) 2018
|
|
29
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
30
30
|
# License:: MIT
|
|
31
31
|
module Zold
|
|
32
32
|
# The entrance
|
data/lib/zold/node/farm.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -35,7 +35,7 @@ require_relative 'farmers'
|
|
|
35
35
|
|
|
36
36
|
# The farm of scores.
|
|
37
37
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
38
|
-
# Copyright:: Copyright (c) 2018
|
|
38
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
39
39
|
# License:: MIT
|
|
40
40
|
module Zold
|
|
41
41
|
# Farm
|
data/lib/zold/node/farmers.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -29,7 +29,7 @@ require_relative '../age'
|
|
|
29
29
|
|
|
30
30
|
# Farmers.
|
|
31
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
32
|
-
# Copyright:: Copyright (c) 2018
|
|
32
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
33
33
|
# License:: MIT
|
|
34
34
|
module Zold
|
|
35
35
|
# Farmer
|
data/lib/zold/node/front.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -47,7 +47,7 @@ require_relative 'soft_error'
|
|
|
47
47
|
|
|
48
48
|
# The web front of the node.
|
|
49
49
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
50
|
-
# Copyright:: Copyright (c) 2018
|
|
50
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
51
51
|
# License:: MIT
|
|
52
52
|
module Zold
|
|
53
53
|
# Web front
|
|
@@ -58,7 +58,7 @@ module Zold
|
|
|
58
58
|
|
|
59
59
|
configure do
|
|
60
60
|
Haml::Options.defaults[:format] = :xhtml
|
|
61
|
-
set :views,
|
|
61
|
+
set :views, proc { File.expand_path(File.join(__dir__, '../../../views')) }
|
|
62
62
|
Thread.current.name = 'sinatra'
|
|
63
63
|
set :bind, '0.0.0.0'
|
|
64
64
|
set :suppress_messages, true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -29,7 +29,7 @@ require_relative '../age'
|
|
|
29
29
|
|
|
30
30
|
# The pipeline with journals.
|
|
31
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
32
|
-
# Copyright:: Copyright (c) 2018
|
|
32
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
33
33
|
# License:: MIT
|
|
34
34
|
module Zold
|
|
35
35
|
# The entrance that keeps a journal for each wallet
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -28,7 +28,7 @@ require_relative '../wallet'
|
|
|
28
28
|
|
|
29
29
|
# The entrance that ignores duplicates.
|
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
31
|
-
# Copyright:: Copyright (c) 2018
|
|
31
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
32
32
|
# License:: MIT
|
|
33
33
|
module Zold
|
|
34
34
|
# The entrance that ignores dups
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -29,7 +29,7 @@ require_relative '../age'
|
|
|
29
29
|
|
|
30
30
|
# The entrance that ignores something we've seen already.
|
|
31
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
32
|
-
# Copyright:: Copyright (c) 2018
|
|
32
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
33
33
|
# License:: MIT
|
|
34
34
|
module Zold
|
|
35
35
|
# The no-spam entrance
|
data/lib/zold/node/pipeline.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -34,7 +34,7 @@ require_relative '../commands/push'
|
|
|
34
34
|
|
|
35
35
|
# The pipeline that accepts new wallets and merges them.
|
|
36
36
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
37
|
-
# Copyright:: Copyright (c) 2018
|
|
37
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
38
38
|
# License:: MIT
|
|
39
39
|
module Zold
|
|
40
40
|
# The pipeline
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -33,7 +33,7 @@ require_relative '../commands/push'
|
|
|
33
33
|
|
|
34
34
|
# The entrance thav validate the incoming wallet first.
|
|
35
35
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
36
|
-
# Copyright:: Copyright (c) 2018
|
|
36
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
37
37
|
# License:: MIT
|
|
38
38
|
module Zold
|
|
39
39
|
# The safe entrance
|
data/lib/zold/node/soft_error.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
# Soft error.
|
|
24
24
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
25
|
-
# Copyright:: Copyright (c) 2018
|
|
25
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
26
26
|
# License:: MIT
|
|
27
27
|
module Zold
|
|
28
28
|
# Soft error
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -36,7 +36,7 @@ require_relative '../commands/clean'
|
|
|
36
36
|
|
|
37
37
|
# The entrance that spreads what's been modified.
|
|
38
38
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
39
|
-
# Copyright:: Copyright (c) 2018
|
|
39
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
40
40
|
# License:: MIT
|
|
41
41
|
module Zold
|
|
42
42
|
# The entrance
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -28,7 +28,7 @@ require_relative '../verbose_thread'
|
|
|
28
28
|
|
|
29
29
|
# The sync entrance of the web front.
|
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
31
|
-
# Copyright:: Copyright (c) 2018
|
|
31
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
32
32
|
# License:: MIT
|
|
33
33
|
module Zold
|
|
34
34
|
# The entrance that makes sure only one thread works with a wallet
|
data/lib/zold/node/trace.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
# The web front of the node.
|
|
24
24
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
25
|
-
# Copyright:: Copyright (c) 2018
|
|
25
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
26
26
|
# License:: MIT
|
|
27
27
|
module Zold
|
|
28
28
|
# Log that traces everything
|
data/lib/zold/patch.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -28,7 +28,7 @@ require_relative 'signature'
|
|
|
28
28
|
# Patch.
|
|
29
29
|
#
|
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
31
|
-
# Copyright:: Copyright (c) 2018
|
|
31
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
32
32
|
# License:: MIT
|
|
33
33
|
module Zold
|
|
34
34
|
# A patch
|
data/lib/zold/prefixes.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -25,7 +25,7 @@ require_relative 'key'
|
|
|
25
25
|
# Payment prefixes.
|
|
26
26
|
#
|
|
27
27
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
28
|
-
# Copyright:: Copyright (c) 2018
|
|
28
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
29
29
|
# License:: MIT
|
|
30
30
|
module Zold
|
|
31
31
|
# Payment prefixes
|
data/lib/zold/remotes.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -38,7 +38,7 @@ require_relative 'commands/fetch'
|
|
|
38
38
|
|
|
39
39
|
# The list of remotes.
|
|
40
40
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
41
|
-
# Copyright:: Copyright (c) 2018
|
|
41
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
42
42
|
# License:: MIT
|
|
43
43
|
module Zold
|
|
44
44
|
# One remote.
|
data/lib/zold/signature.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -28,7 +28,7 @@ require_relative 'txn'
|
|
|
28
28
|
# The signature of a transaction.
|
|
29
29
|
#
|
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
31
|
-
# Copyright:: Copyright (c) 2018
|
|
31
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
32
32
|
# License:: MIT
|
|
33
33
|
module Zold
|
|
34
34
|
# A signature
|
data/lib/zold/size.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -24,7 +24,7 @@ require 'time'
|
|
|
24
24
|
|
|
25
25
|
# Size in bytes.
|
|
26
26
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
27
|
-
# Copyright:: Copyright (c) 2018
|
|
27
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
28
28
|
# License:: MIT
|
|
29
29
|
module Zold
|
|
30
30
|
# Size
|
data/lib/zold/sync_wallets.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright (c) 2018-
|
|
3
|
+
# Copyright (c) 2018-2024 Zerocracy
|
|
4
4
|
#
|
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
# of this software and associated documentation files (the 'Software'), to deal
|
|
@@ -29,7 +29,7 @@ require_relative 'log'
|
|
|
29
29
|
# This is a decorator for the Wallets class.
|
|
30
30
|
#
|
|
31
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
|
32
|
-
# Copyright:: Copyright (c) 2018
|
|
32
|
+
# Copyright:: Copyright (c) 2018-2024 Zerocracy
|
|
33
33
|
# License:: MIT
|
|
34
34
|
module Zold
|
|
35
35
|
# Synchronized collection of wallets
|