osbc 0.1.5
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 +7 -0
- data/.env +5 -0
- data/.rspec +1 -0
- data/.rubocop.yml +273 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Dockerfile +17 -0
- data/Gemfile +109 -0
- data/Gemfile.lock +343 -0
- data/LICENSE.md +21 -0
- data/LICENSE.txt +21 -0
- data/Procfile +3 -0
- data/Procfile.dev +2 -0
- data/README.md +185 -0
- data/Rakefile +6 -0
- data/app/assets/builds/.keep +0 -0
- data/app/assets/config/manifest.js +5 -0
- data/app/assets/images/.keep +0 -0
- data/app/assets/images/bg.png +0 -0
- data/app/assets/images/gimage.png +0 -0
- data/app/assets/images/image.png +0 -0
- data/app/assets/images/logo.png +0 -0
- data/app/assets/images/outerspc.jpg +0 -0
- data/app/assets/images/proxy.jpg +0 -0
- data/app/assets/images/space.jpg +0 -0
- data/app/assets/images/space_four.jpg +0 -0
- data/app/assets/images/space_t.jpg +0 -0
- data/app/assets/images/space_th.jpg +0 -0
- data/app/assets/images/space_two.jpg +0 -0
- data/app/assets/images/th.jpg +0 -0
- data/app/assets/stylesheets/application.css +344 -0
- data/app/assets/stylesheets/application.tailwind.css +13 -0
- data/app/assets/stylesheets/home.css +0 -0
- data/app/channels/application_cable/channel.rb +6 -0
- data/app/channels/application_cable/connection.rb +6 -0
- data/app/controllers/api/v1/block_confirmations_controller.rb +65 -0
- data/app/controllers/application_controller.rb +72 -0
- data/app/controllers/blocks_controller.rb +20 -0
- data/app/controllers/chains_controller.rb +72 -0
- data/app/controllers/concerns/.keep +0 -0
- data/app/controllers/contracts_controller.rb +25 -0
- data/app/controllers/pools_controller.rb +73 -0
- data/app/controllers/signatures_controller.rb +25 -0
- data/app/controllers/tickets_controller.rb +76 -0
- data/app/controllers/transactions_controller.rb +48 -0
- data/app/controllers/users/confirmations_controller.rb +30 -0
- data/app/controllers/users/omniauth_callbacks_controller.rb +30 -0
- data/app/controllers/users/passwords_controller.rb +34 -0
- data/app/controllers/users/registrations_controller.rb +61 -0
- data/app/controllers/users/sessions_controller.rb +27 -0
- data/app/controllers/users/unlocks_controller.rb +30 -0
- data/app/controllers/wallets_controller.rb +18 -0
- data/app/helpers/application_helper.rb +4 -0
- data/app/helpers/blocks_helper.rb +4 -0
- data/app/helpers/chains_helper.rb +4 -0
- data/app/helpers/contracts_helper.rb +4 -0
- data/app/helpers/pools_helper.rb +4 -0
- data/app/helpers/signatures_helper.rb +4 -0
- data/app/helpers/tickets_helper.rb +4 -0
- data/app/helpers/transactions_helper.rb +4 -0
- data/app/helpers/wallets_helper.rb +4 -0
- data/app/javascript/application.js +3 -0
- data/app/javascript/controllers/application.js +9 -0
- data/app/javascript/controllers/hello_controller.js +7 -0
- data/app/javascript/controllers/index.js +11 -0
- data/app/jobs/application_job.rb +9 -0
- data/app/mailers/application_mailer.rb +6 -0
- data/app/models/acceptable_number_sequence.rb +4 -0
- data/app/models/acceptable_symbol_sequence.rb +4 -0
- data/app/models/acceptable_word.rb +4 -0
- data/app/models/application_record.rb +5 -0
- data/app/models/block.rb +17 -0
- data/app/models/chain.rb +10 -0
- data/app/models/concerns/.keep +0 -0
- data/app/models/concerns/sequences_validator.rb +30 -0
- data/app/models/concerns/wallet_exists_validator.rb +13 -0
- data/app/models/contract.rb +7 -0
- data/app/models/pool.rb +5 -0
- data/app/models/signature.rb +12 -0
- data/app/models/ticket.rb +11 -0
- data/app/models/transaction.rb +25 -0
- data/app/models/user.rb +44 -0
- data/app/models/wallet.rb +33 -0
- data/app/services/application_service.rb +23 -0
- data/app/services/assign_contracts_service.rb +162 -0
- data/app/services/create_ticket_service.rb +87 -0
- data/app/services/create_wallet_service.rb +20 -0
- data/app/services/transaction_to_block_service.rb +62 -0
- data/app/views/application/_featured_board.html.erb +77 -0
- data/app/views/application/home.html.slim +1 -0
- data/app/views/application/mining_profile.html.slim +59 -0
- data/app/views/application/privacy_policy.html.erb +0 -0
- data/app/views/application/terms.html.erb +0 -0
- data/app/views/blocks/_block.html.slim +13 -0
- data/app/views/blocks/_block.json.jbuilder +4 -0
- data/app/views/blocks/_form.html.slim +26 -0
- data/app/views/blocks/edit.html.slim +10 -0
- data/app/views/blocks/index.html.slim +12 -0
- data/app/views/blocks/index.json.jbuilder +3 -0
- data/app/views/blocks/new.html.slim +8 -0
- data/app/views/blocks/show.html.slim +8 -0
- data/app/views/blocks/show.json.jbuilder +3 -0
- data/app/views/chains/_chain.html.slim +16 -0
- data/app/views/chains/_chain.json.jbuilder +4 -0
- data/app/views/chains/_form.html.slim +30 -0
- data/app/views/chains/edit.html.slim +10 -0
- data/app/views/chains/index.html.slim +11 -0
- data/app/views/chains/index.json.jbuilder +3 -0
- data/app/views/chains/new.html.slim +8 -0
- data/app/views/chains/show.html.slim +10 -0
- data/app/views/chains/show.json.jbuilder +3 -0
- data/app/views/contracts/_contract.html.slim +8 -0
- data/app/views/contracts/_contract.json.jbuilder +4 -0
- data/app/views/contracts/_form.html.slim +34 -0
- data/app/views/contracts/edit.html.slim +10 -0
- data/app/views/contracts/index.html.slim +12 -0
- data/app/views/contracts/index.json.jbuilder +3 -0
- data/app/views/contracts/new.html.slim +8 -0
- data/app/views/contracts/show.html.slim +8 -0
- data/app/views/contracts/show.json.jbuilder +3 -0
- data/app/views/layouts/_alert.html.slim +6 -0
- data/app/views/layouts/_navbar.html.slim +27 -0
- data/app/views/layouts/_notice.html.slim +6 -0
- data/app/views/layouts/application.html.erb +32 -0
- data/app/views/layouts/mailer.html.erb +13 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/app/views/pools/_form.html.slim +30 -0
- data/app/views/pools/_pool.html.slim +16 -0
- data/app/views/pools/_pool.json.jbuilder +4 -0
- data/app/views/pools/edit.html.slim +10 -0
- data/app/views/pools/index.html.slim +12 -0
- data/app/views/pools/index.json.jbuilder +3 -0
- data/app/views/pools/new.html.slim +8 -0
- data/app/views/pools/show.html.slim +8 -0
- data/app/views/pools/show.json.jbuilder +3 -0
- data/app/views/signatures/_form.html.slim +46 -0
- data/app/views/signatures/_signature.html.slim +28 -0
- data/app/views/signatures/_signature.json.jbuilder +4 -0
- data/app/views/signatures/edit.html.slim +10 -0
- data/app/views/signatures/index.html.slim +10 -0
- data/app/views/signatures/index.json.jbuilder +3 -0
- data/app/views/signatures/new.html.slim +8 -0
- data/app/views/signatures/show.html.slim +10 -0
- data/app/views/signatures/show.json.jbuilder +3 -0
- data/app/views/tickets/_form.html.slim +26 -0
- data/app/views/tickets/_ticket.html.slim +10 -0
- data/app/views/tickets/_ticket.json.jbuilder +4 -0
- data/app/views/tickets/edit.html.slim +10 -0
- data/app/views/tickets/index.html.slim +16 -0
- data/app/views/tickets/index.json.jbuilder +3 -0
- data/app/views/tickets/new.html.slim +10 -0
- data/app/views/tickets/show.html.slim +8 -0
- data/app/views/tickets/show.json.jbuilder +3 -0
- data/app/views/transactions/_form.html.slim +16 -0
- data/app/views/transactions/_transaction.html.slim +24 -0
- data/app/views/transactions/_transaction.json.jbuilder +4 -0
- data/app/views/transactions/edit.html.slim +10 -0
- data/app/views/transactions/index.html.slim +19 -0
- data/app/views/transactions/index.json.jbuilder +3 -0
- data/app/views/transactions/new.html.slim +9 -0
- data/app/views/transactions/show.html.slim +8 -0
- data/app/views/transactions/show.json.jbuilder +3 -0
- data/app/views/users/confirmations/new.html.erb +16 -0
- data/app/views/users/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/users/mailer/email_changed.html.erb +7 -0
- data/app/views/users/mailer/password_change.html.erb +3 -0
- data/app/views/users/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/users/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/users/passwords/edit.html.erb +25 -0
- data/app/views/users/passwords/new.html.erb +16 -0
- data/app/views/users/registrations/edit.html.erb +43 -0
- data/app/views/users/registrations/new.html.erb +37 -0
- data/app/views/users/sessions/new.html.erb +30 -0
- data/app/views/users/shared/_error_messages.html.erb +15 -0
- data/app/views/users/shared/_links.html.erb +25 -0
- data/app/views/users/unlocks/new.html.erb +16 -0
- data/app/views/wallets/_form.html.slim +30 -0
- data/app/views/wallets/_wallet.html.slim +13 -0
- data/app/views/wallets/_wallet.json.jbuilder +4 -0
- data/app/views/wallets/edit.html.slim +10 -0
- data/app/views/wallets/index.html.slim +18 -0
- data/app/views/wallets/index.json.jbuilder +3 -0
- data/app/views/wallets/new.html.slim +8 -0
- data/app/views/wallets/show.html.slim +11 -0
- data/app/views/wallets/show.json.jbuilder +3 -0
- data/app/workers/application_worker.rb +82 -0
- data/app/workers/assign_contract_worker.rb +27 -0
- data/app/workers/create_ticket_worker.rb +23 -0
- data/app/workers/create_wallet_worker.rb +21 -0
- data/app/workers/transaction_to_block_worker.rb +48 -0
- data/bin/bundle +114 -0
- data/bin/console +15 -0
- data/bin/dev +9 -0
- data/bin/importmap +5 -0
- data/bin/osbc +77 -0
- data/bin/rails +6 -0
- data/bin/rake +6 -0
- data/bin/setup +35 -0
- data/config/application.rb +25 -0
- data/config/boot.rb +6 -0
- data/config/cable.yml +10 -0
- data/config/credentials.yml.enc +1 -0
- data/config/database.yml +21 -0
- data/config/environment.rb +7 -0
- data/config/environments/development.rb +73 -0
- data/config/environments/production.rb +95 -0
- data/config/environments/test.rb +62 -0
- data/config/importmap.rb +9 -0
- data/config/initializers/assets.rb +14 -0
- data/config/initializers/content_security_policy.rb +26 -0
- data/config/initializers/devise.rb +311 -0
- data/config/initializers/filter_parameter_logging.rb +10 -0
- data/config/initializers/inflections.rb +17 -0
- data/config/initializers/permissions_policy.rb +12 -0
- data/config/locales/devise.en.yml +65 -0
- data/config/locales/en.yml +33 -0
- data/config/puma.rb +45 -0
- data/config/routes/api.rb +9 -0
- data/config/routes.rb +30 -0
- data/config/sidekiq.yml +10 -0
- data/config/storage.yml +34 -0
- data/config/tailwind.config.js +23 -0
- data/config.ru +8 -0
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +1853 -0
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_both.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc.png +0 -0
- data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- data/coverage/assets/0.12.3/application.css +1 -0
- data/coverage/assets/0.12.3/application.js +7 -0
- data/coverage/assets/0.12.3/colorbox/border.png +0 -0
- data/coverage/assets/0.12.3/colorbox/controls.png +0 -0
- data/coverage/assets/0.12.3/colorbox/loading.gif +0 -0
- data/coverage/assets/0.12.3/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.12.3/favicon_green.png +0 -0
- data/coverage/assets/0.12.3/favicon_red.png +0 -0
- data/coverage/assets/0.12.3/favicon_yellow.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.12.3/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.12.3/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/assets/0.12.3/loading.gif +0 -0
- data/coverage/assets/0.12.3/magnify.png +0 -0
- data/coverage/index.html +20731 -0
- data/db/migrate/20221018053949_devise_create_users.rb +45 -0
- data/db/migrate/20221019002956_create_chains.rb +13 -0
- data/db/migrate/20221020112137_create_blocks.rb +12 -0
- data/db/migrate/20221020123102_add_chain_to_blocks.rb +5 -0
- data/db/migrate/20221020150504_create_wallets.rb +13 -0
- data/db/migrate/20221022221059_create_transactions.rb +20 -0
- data/db/migrate/20221023011005_add_block_to_transactions.rb +5 -0
- data/db/migrate/20221023014707_create_contracts.rb +11 -0
- data/db/migrate/20221023040749_create_pools.rb +13 -0
- data/db/migrate/20221023041015_create_tickets.rb +11 -0
- data/db/migrate/20221023103509_add_contracts_count_to_block.rb +6 -0
- data/db/migrate/20221023110613_add_acceptable_word_list_to_users.rb +7 -0
- data/db/migrate/20221023113539_create_signatures.rb +19 -0
- data/db/migrate/20221023113750_create_acceptable_words.rb +9 -0
- data/db/migrate/20221023114152_create_acceptable_number_sequences.rb +9 -0
- data/db/migrate/20221023114203_create_acceptable_symbol_sequences.rb +9 -0
- data/db/migrate/20221023114324_add_user_acceptable_hash_to_tickets.rb +7 -0
- data/db/migrate/20221023114408_add_time_ref_to_tickets.rb +5 -0
- data/db/migrate/20221024125047_add_master_hash_to_blocks.rb +5 -0
- data/db/migrate/20221109161845_add_transactions_count_to_blocks.rb +5 -0
- data/db/migrate/20221117135003_add_balance_to_chains.rb +5 -0
- data/db/migrate/20221117203417_add_transaction_id_list_to_tickets.rb +5 -0
- data/db/migrate/20221118080357_add_api_keys_to_users.rb +6 -0
- data/db/schema.rb +179 -0
- data/db/seeds.rb +134 -0
- data/docker-compose.yml +53 -0
- data/entrypoint.sh +8 -0
- data/lib/assets/.keep +0 -0
- data/lib/osbc/osbc.rb +9 -0
- data/lib/outerspace/blockchain/version.rb +7 -0
- data/lib/outerspace/blockchain.rb +10 -0
- data/lib/tasks/.keep +0 -0
- data/lib/tasks/compose.rake +92 -0
- data/lib/tasks/compose_db.rake +71 -0
- data/lib/tasks/compose_logs.rake +95 -0
- data/lib/tasks/compose_test.rake +62 -0
- data/log/.keep +0 -0
- data/mining_concept.ipynb +284 -0
- data/outerspace-blockchain.gemspec +50 -0
- data/public/404.html +67 -0
- data/public/422.html +67 -0
- data/public/500.html +66 -0
- data/public/apple-touch-icon-precomposed.png +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/favicon.ico +0 -0
- data/public/robots.txt +1 -0
- data/storage/.keep +0 -0
- data/tmp/.keep +0 -0
- data/tmp/pids/.keep +0 -0
- data/tmp/storage/.keep +0 -0
- data/vendor/.keep +0 -0
- data/vendor/javascript/.keep +0 -0
- metadata +643 -0
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
actioncable (7.0.4)
|
|
5
|
+
actionpack (= 7.0.4)
|
|
6
|
+
activesupport (= 7.0.4)
|
|
7
|
+
nio4r (~> 2.0)
|
|
8
|
+
websocket-driver (>= 0.6.1)
|
|
9
|
+
actionmailbox (7.0.4)
|
|
10
|
+
actionpack (= 7.0.4)
|
|
11
|
+
activejob (= 7.0.4)
|
|
12
|
+
activerecord (= 7.0.4)
|
|
13
|
+
activestorage (= 7.0.4)
|
|
14
|
+
activesupport (= 7.0.4)
|
|
15
|
+
mail (>= 2.7.1)
|
|
16
|
+
net-imap
|
|
17
|
+
net-pop
|
|
18
|
+
net-smtp
|
|
19
|
+
actionmailer (7.0.4)
|
|
20
|
+
actionpack (= 7.0.4)
|
|
21
|
+
actionview (= 7.0.4)
|
|
22
|
+
activejob (= 7.0.4)
|
|
23
|
+
activesupport (= 7.0.4)
|
|
24
|
+
mail (~> 2.5, >= 2.5.4)
|
|
25
|
+
net-imap
|
|
26
|
+
net-pop
|
|
27
|
+
net-smtp
|
|
28
|
+
rails-dom-testing (~> 2.0)
|
|
29
|
+
actionpack (7.0.4)
|
|
30
|
+
actionview (= 7.0.4)
|
|
31
|
+
activesupport (= 7.0.4)
|
|
32
|
+
rack (~> 2.0, >= 2.2.0)
|
|
33
|
+
rack-test (>= 0.6.3)
|
|
34
|
+
rails-dom-testing (~> 2.0)
|
|
35
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
36
|
+
actiontext (7.0.4)
|
|
37
|
+
actionpack (= 7.0.4)
|
|
38
|
+
activerecord (= 7.0.4)
|
|
39
|
+
activestorage (= 7.0.4)
|
|
40
|
+
activesupport (= 7.0.4)
|
|
41
|
+
globalid (>= 0.6.0)
|
|
42
|
+
nokogiri (>= 1.8.5)
|
|
43
|
+
actionview (7.0.4)
|
|
44
|
+
activesupport (= 7.0.4)
|
|
45
|
+
builder (~> 3.1)
|
|
46
|
+
erubi (~> 1.4)
|
|
47
|
+
rails-dom-testing (~> 2.0)
|
|
48
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
49
|
+
activejob (7.0.4)
|
|
50
|
+
activesupport (= 7.0.4)
|
|
51
|
+
globalid (>= 0.3.6)
|
|
52
|
+
activemodel (7.0.4)
|
|
53
|
+
activesupport (= 7.0.4)
|
|
54
|
+
activerecord (7.0.4)
|
|
55
|
+
activemodel (= 7.0.4)
|
|
56
|
+
activesupport (= 7.0.4)
|
|
57
|
+
activerecord-import (1.4.1)
|
|
58
|
+
activerecord (>= 4.2)
|
|
59
|
+
activestorage (7.0.4)
|
|
60
|
+
actionpack (= 7.0.4)
|
|
61
|
+
activejob (= 7.0.4)
|
|
62
|
+
activerecord (= 7.0.4)
|
|
63
|
+
activesupport (= 7.0.4)
|
|
64
|
+
marcel (~> 1.0)
|
|
65
|
+
mini_mime (>= 1.1.0)
|
|
66
|
+
activesupport (7.0.4)
|
|
67
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
68
|
+
i18n (>= 1.6, < 2)
|
|
69
|
+
minitest (>= 5.1)
|
|
70
|
+
tzinfo (~> 2.0)
|
|
71
|
+
addressable (2.8.1)
|
|
72
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
73
|
+
ast (2.4.2)
|
|
74
|
+
bcrypt (3.1.18)
|
|
75
|
+
bindex (0.8.1)
|
|
76
|
+
bootsnap (1.13.0)
|
|
77
|
+
msgpack (~> 1.2)
|
|
78
|
+
builder (3.2.4)
|
|
79
|
+
capybara (3.37.1)
|
|
80
|
+
addressable
|
|
81
|
+
matrix
|
|
82
|
+
mini_mime (>= 0.1.3)
|
|
83
|
+
nokogiri (~> 1.8)
|
|
84
|
+
rack (>= 1.6.0)
|
|
85
|
+
rack-test (>= 0.6.3)
|
|
86
|
+
regexp_parser (>= 1.5, < 3.0)
|
|
87
|
+
xpath (~> 3.2)
|
|
88
|
+
childprocess (4.1.0)
|
|
89
|
+
concurrent-ruby (1.1.10)
|
|
90
|
+
connection_pool (2.3.0)
|
|
91
|
+
crass (1.0.6)
|
|
92
|
+
database_cleaner-active_record (2.0.1)
|
|
93
|
+
activerecord (>= 5.a)
|
|
94
|
+
database_cleaner-core (~> 2.0.0)
|
|
95
|
+
database_cleaner-core (2.0.1)
|
|
96
|
+
debug (1.6.2)
|
|
97
|
+
irb (>= 1.3.6)
|
|
98
|
+
reline (>= 0.3.1)
|
|
99
|
+
devise (4.8.1)
|
|
100
|
+
bcrypt (~> 3.0)
|
|
101
|
+
orm_adapter (~> 0.1)
|
|
102
|
+
railties (>= 4.1.0)
|
|
103
|
+
responders
|
|
104
|
+
warden (~> 1.2.3)
|
|
105
|
+
diff-lcs (1.5.0)
|
|
106
|
+
docile (1.4.0)
|
|
107
|
+
erubi (1.11.0)
|
|
108
|
+
factory_bot (6.2.1)
|
|
109
|
+
activesupport (>= 5.0.0)
|
|
110
|
+
factory_bot_rails (6.2.0)
|
|
111
|
+
factory_bot (~> 6.2.0)
|
|
112
|
+
railties (>= 5.0.0)
|
|
113
|
+
faker (2.23.0)
|
|
114
|
+
i18n (>= 1.8.11, < 2)
|
|
115
|
+
globalid (1.0.0)
|
|
116
|
+
activesupport (>= 5.0)
|
|
117
|
+
i18n (1.12.0)
|
|
118
|
+
concurrent-ruby (~> 1.0)
|
|
119
|
+
importmap-rails (1.1.5)
|
|
120
|
+
actionpack (>= 6.0.0)
|
|
121
|
+
railties (>= 6.0.0)
|
|
122
|
+
io-console (0.5.11)
|
|
123
|
+
irb (1.4.2)
|
|
124
|
+
reline (>= 0.3.0)
|
|
125
|
+
jbuilder (2.11.5)
|
|
126
|
+
actionview (>= 5.0.0)
|
|
127
|
+
activesupport (>= 5.0.0)
|
|
128
|
+
json (2.5.1)
|
|
129
|
+
loofah (2.19.0)
|
|
130
|
+
crass (~> 1.0.2)
|
|
131
|
+
nokogiri (>= 1.5.9)
|
|
132
|
+
mail (2.7.1)
|
|
133
|
+
mini_mime (>= 0.1.1)
|
|
134
|
+
marcel (1.0.2)
|
|
135
|
+
matrix (0.4.2)
|
|
136
|
+
method_source (1.0.0)
|
|
137
|
+
mini_mime (1.1.2)
|
|
138
|
+
minitest (5.16.3)
|
|
139
|
+
msgpack (1.6.0)
|
|
140
|
+
net-imap (0.3.1)
|
|
141
|
+
net-protocol
|
|
142
|
+
net-pop (0.1.2)
|
|
143
|
+
net-protocol
|
|
144
|
+
net-protocol (0.1.3)
|
|
145
|
+
timeout
|
|
146
|
+
net-smtp (0.3.2)
|
|
147
|
+
net-protocol
|
|
148
|
+
nio4r (2.5.8)
|
|
149
|
+
nokogiri (1.13.8-x86_64-linux)
|
|
150
|
+
racc (~> 1.4)
|
|
151
|
+
orm_adapter (0.5.0)
|
|
152
|
+
parallel (1.22.1)
|
|
153
|
+
parser (3.1.2.1)
|
|
154
|
+
ast (~> 2.4.1)
|
|
155
|
+
pg (1.4.4)
|
|
156
|
+
public_suffix (5.0.0)
|
|
157
|
+
puma (5.6.5)
|
|
158
|
+
nio4r (~> 2.0)
|
|
159
|
+
racc (1.6.0)
|
|
160
|
+
rack (2.2.4)
|
|
161
|
+
rack-test (2.0.2)
|
|
162
|
+
rack (>= 1.3)
|
|
163
|
+
rails (7.0.4)
|
|
164
|
+
actioncable (= 7.0.4)
|
|
165
|
+
actionmailbox (= 7.0.4)
|
|
166
|
+
actionmailer (= 7.0.4)
|
|
167
|
+
actionpack (= 7.0.4)
|
|
168
|
+
actiontext (= 7.0.4)
|
|
169
|
+
actionview (= 7.0.4)
|
|
170
|
+
activejob (= 7.0.4)
|
|
171
|
+
activemodel (= 7.0.4)
|
|
172
|
+
activerecord (= 7.0.4)
|
|
173
|
+
activestorage (= 7.0.4)
|
|
174
|
+
activesupport (= 7.0.4)
|
|
175
|
+
bundler (>= 1.15.0)
|
|
176
|
+
railties (= 7.0.4)
|
|
177
|
+
rails-controller-testing (1.0.5)
|
|
178
|
+
actionpack (>= 5.0.1.rc1)
|
|
179
|
+
actionview (>= 5.0.1.rc1)
|
|
180
|
+
activesupport (>= 5.0.1.rc1)
|
|
181
|
+
rails-dom-testing (2.0.3)
|
|
182
|
+
activesupport (>= 4.2.0)
|
|
183
|
+
nokogiri (>= 1.6)
|
|
184
|
+
rails-html-sanitizer (1.4.3)
|
|
185
|
+
loofah (~> 2.3)
|
|
186
|
+
railties (7.0.4)
|
|
187
|
+
actionpack (= 7.0.4)
|
|
188
|
+
activesupport (= 7.0.4)
|
|
189
|
+
method_source
|
|
190
|
+
rake (>= 12.2)
|
|
191
|
+
thor (~> 1.0)
|
|
192
|
+
zeitwerk (~> 2.5)
|
|
193
|
+
rainbow (3.1.1)
|
|
194
|
+
rake (13.0.6)
|
|
195
|
+
redis (4.8.0)
|
|
196
|
+
regexp_parser (2.6.0)
|
|
197
|
+
reline (0.3.1)
|
|
198
|
+
io-console (~> 0.5)
|
|
199
|
+
responders (3.0.1)
|
|
200
|
+
actionpack (>= 5.0)
|
|
201
|
+
railties (>= 5.0)
|
|
202
|
+
rexml (3.2.5)
|
|
203
|
+
rspec-core (3.11.0)
|
|
204
|
+
rspec-support (~> 3.11.0)
|
|
205
|
+
rspec-expectations (3.11.1)
|
|
206
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
207
|
+
rspec-support (~> 3.11.0)
|
|
208
|
+
rspec-mocks (3.11.1)
|
|
209
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
210
|
+
rspec-support (~> 3.11.0)
|
|
211
|
+
rspec-rails (6.0.0)
|
|
212
|
+
actionpack (>= 6.1)
|
|
213
|
+
activesupport (>= 6.1)
|
|
214
|
+
railties (>= 6.1)
|
|
215
|
+
rspec-core (~> 3.11)
|
|
216
|
+
rspec-expectations (~> 3.11)
|
|
217
|
+
rspec-mocks (~> 3.11)
|
|
218
|
+
rspec-support (~> 3.11)
|
|
219
|
+
rspec-support (3.11.1)
|
|
220
|
+
rubocop (1.36.0)
|
|
221
|
+
json (~> 2.3)
|
|
222
|
+
parallel (~> 1.10)
|
|
223
|
+
parser (>= 3.1.2.1)
|
|
224
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
225
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
226
|
+
rexml (>= 3.2.5, < 4.0)
|
|
227
|
+
rubocop-ast (>= 1.20.1, < 2.0)
|
|
228
|
+
ruby-progressbar (~> 1.7)
|
|
229
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
230
|
+
rubocop-ast (1.22.0)
|
|
231
|
+
parser (>= 3.1.1.0)
|
|
232
|
+
rubocop-rails (2.16.1)
|
|
233
|
+
activesupport (>= 4.2.0)
|
|
234
|
+
rack (>= 1.1)
|
|
235
|
+
rubocop (>= 1.33.0, < 2.0)
|
|
236
|
+
rubocop-rspec (2.13.2)
|
|
237
|
+
rubocop (~> 1.33)
|
|
238
|
+
ruby-progressbar (1.11.0)
|
|
239
|
+
rubyzip (2.3.2)
|
|
240
|
+
selenium-webdriver (4.5.0)
|
|
241
|
+
childprocess (>= 0.5, < 5.0)
|
|
242
|
+
rexml (~> 3.2, >= 3.2.5)
|
|
243
|
+
rubyzip (>= 1.2.2, < 3.0)
|
|
244
|
+
websocket (~> 1.0)
|
|
245
|
+
shoulda-matchers (5.2.0)
|
|
246
|
+
activesupport (>= 5.2.0)
|
|
247
|
+
sidekiq (6.5.7)
|
|
248
|
+
connection_pool (>= 2.2.5)
|
|
249
|
+
rack (~> 2.0)
|
|
250
|
+
redis (>= 4.5.0, < 5)
|
|
251
|
+
simplecov (0.21.2)
|
|
252
|
+
docile (~> 1.1)
|
|
253
|
+
simplecov-html (~> 0.11)
|
|
254
|
+
simplecov_json_formatter (~> 0.1)
|
|
255
|
+
simplecov-html (0.12.3)
|
|
256
|
+
simplecov_json_formatter (0.1.4)
|
|
257
|
+
slim (4.1.0)
|
|
258
|
+
temple (>= 0.7.6, < 0.9)
|
|
259
|
+
tilt (>= 2.0.6, < 2.1)
|
|
260
|
+
slim-rails (3.5.1)
|
|
261
|
+
actionpack (>= 3.1)
|
|
262
|
+
railties (>= 3.1)
|
|
263
|
+
slim (>= 3.0, < 5.0)
|
|
264
|
+
sprockets (4.1.1)
|
|
265
|
+
concurrent-ruby (~> 1.0)
|
|
266
|
+
rack (> 1, < 3)
|
|
267
|
+
sprockets-rails (3.4.2)
|
|
268
|
+
actionpack (>= 5.2)
|
|
269
|
+
activesupport (>= 5.2)
|
|
270
|
+
sprockets (>= 3.0.0)
|
|
271
|
+
stimulus-rails (1.1.0)
|
|
272
|
+
railties (>= 6.0.0)
|
|
273
|
+
tailwindcss-rails (2.0.14-x86_64-linux)
|
|
274
|
+
railties (>= 6.0.0)
|
|
275
|
+
temple (0.8.2)
|
|
276
|
+
thor (1.2.1)
|
|
277
|
+
tilt (2.0.11)
|
|
278
|
+
timeout (0.3.0)
|
|
279
|
+
turbo-rails (1.3.1)
|
|
280
|
+
actionpack (>= 6.0.0)
|
|
281
|
+
activejob (>= 6.0.0)
|
|
282
|
+
railties (>= 6.0.0)
|
|
283
|
+
tzinfo (2.0.5)
|
|
284
|
+
concurrent-ruby (~> 1.0)
|
|
285
|
+
unicode-display_width (2.3.0)
|
|
286
|
+
warden (1.2.9)
|
|
287
|
+
rack (>= 2.0.9)
|
|
288
|
+
web-console (4.2.0)
|
|
289
|
+
actionview (>= 6.0.0)
|
|
290
|
+
activemodel (>= 6.0.0)
|
|
291
|
+
bindex (>= 0.4.0)
|
|
292
|
+
railties (>= 6.0.0)
|
|
293
|
+
webdrivers (5.2.0)
|
|
294
|
+
nokogiri (~> 1.6)
|
|
295
|
+
rubyzip (>= 1.3.0)
|
|
296
|
+
selenium-webdriver (~> 4.0)
|
|
297
|
+
websocket (1.2.9)
|
|
298
|
+
websocket-driver (0.7.5)
|
|
299
|
+
websocket-extensions (>= 0.1.0)
|
|
300
|
+
websocket-extensions (0.1.5)
|
|
301
|
+
xpath (3.2.0)
|
|
302
|
+
nokogiri (~> 1.8)
|
|
303
|
+
zeitwerk (2.6.1)
|
|
304
|
+
|
|
305
|
+
PLATFORMS
|
|
306
|
+
x86_64-linux
|
|
307
|
+
|
|
308
|
+
DEPENDENCIES
|
|
309
|
+
activerecord-import
|
|
310
|
+
bootsnap (~> 1.13)
|
|
311
|
+
capybara (~> 3.37)
|
|
312
|
+
database_cleaner-active_record (~> 2.0)
|
|
313
|
+
debug (~> 1.6)
|
|
314
|
+
devise (~> 4.8)
|
|
315
|
+
factory_bot_rails (~> 6.2)
|
|
316
|
+
faker (~> 2.23)
|
|
317
|
+
importmap-rails (~> 1.1)
|
|
318
|
+
jbuilder (~> 2.11)
|
|
319
|
+
pg (~> 1.4)
|
|
320
|
+
puma (~> 5.6)
|
|
321
|
+
rails (~> 7.0)
|
|
322
|
+
rails-controller-testing (~> 1.0)
|
|
323
|
+
rspec-rails (~> 6.0)
|
|
324
|
+
rubocop-rails (~> 2.16)
|
|
325
|
+
rubocop-rspec (~> 2.13)
|
|
326
|
+
selenium-webdriver (~> 4.5)
|
|
327
|
+
shoulda-matchers (~> 5.0)
|
|
328
|
+
sidekiq (~> 6.5)
|
|
329
|
+
simplecov (~> 0.21)
|
|
330
|
+
slim-rails (~> 3.5)
|
|
331
|
+
sprockets-rails (~> 3.4)
|
|
332
|
+
stimulus-rails (~> 1.1)
|
|
333
|
+
tailwindcss-rails (~> 2.0)
|
|
334
|
+
turbo-rails (~> 1.3)
|
|
335
|
+
tzinfo-data
|
|
336
|
+
web-console (~> 4.2)
|
|
337
|
+
webdrivers (~> 5.2)
|
|
338
|
+
|
|
339
|
+
RUBY VERSION
|
|
340
|
+
ruby 3.0.3p157
|
|
341
|
+
|
|
342
|
+
BUNDLED WITH
|
|
343
|
+
2.2.32
|
data/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Igor Lima de Jesus
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 JesusGautamah
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/Procfile
ADDED
data/Procfile.dev
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# <img src="https://outerspace-coding.herokuapp.com/assets/pq-70825bc795d25668cf4f11b06b990ed0d1c2cae887acce0625e5059226a7946a.png" width="25" height="25"> Outerspace Blockchain
|
|
2
|
+
<!-- Outerspace Logo -->
|
|
3
|
+
### A Ruby implementation of web blockchain framework.
|
|
4
|
+
#### Developed using TDD (Test Driven Development).
|
|
5
|
+
#### Github Actions CI/CD pipeline.
|
|
6
|
+
#### Chrome Selenium tests are used to test the blockchain in a browser and its interaction with the blockchain.
|
|
7
|
+
#### Chrome Selenium are included in the docker compose without any additional setup.
|
|
8
|
+
#### Simplecov is used to test code coverage.
|
|
9
|
+
|
|
10
|
+
#### Rails Engine is used to create the blockchain.
|
|
11
|
+
#### Tailwind CSS is used to style the blockchain web interface.
|
|
12
|
+
|
|
13
|
+
#### Rspec is used to test the blockchain.
|
|
14
|
+
|
|
15
|
+
## System dependencies
|
|
16
|
+
1. Docker
|
|
17
|
+
2. Postgresql
|
|
18
|
+
3. Ruby
|
|
19
|
+
4. Redis
|
|
20
|
+
|
|
21
|
+
* Ruby 3.0.3
|
|
22
|
+
* Compose Version 3.3
|
|
23
|
+
* Docker Image: ruby:3.0.3
|
|
24
|
+
|
|
25
|
+
* [Installation](#installation)
|
|
26
|
+
- [Docker](#docker) https://docs.docker.com/engine/install/
|
|
27
|
+
- [RVM](#rvm) https://rvm.io/rvm/install
|
|
28
|
+
- [Redis](#redis) https://redis.io/download
|
|
29
|
+
- [Postgres](#postgres) https://www.postgresql.org/download/
|
|
30
|
+
- [Rails](#rails) https://guides.rubyonrails.org/getting_started.html
|
|
31
|
+
|
|
32
|
+
### Compile OSBC from source
|
|
33
|
+
========================
|
|
34
|
+
<!-- Compile OSBC from source -->
|
|
35
|
+
Compile the gem from source with the following commands:
|
|
36
|
+
```bash
|
|
37
|
+
git clone
|
|
38
|
+
cd outerspace-blockchain
|
|
39
|
+
bundle install
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Run OSBC
|
|
43
|
+
========================
|
|
44
|
+
<!-- Run OSBC -->
|
|
45
|
+
Run the gem with the following command:
|
|
46
|
+
```bash
|
|
47
|
+
bin/osbc
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Installation
|
|
51
|
+
========================
|
|
52
|
+
<!-- Installation -->
|
|
53
|
+
Build and install the gem with the following commands:
|
|
54
|
+
```bash
|
|
55
|
+
gem build osbc.gemspec
|
|
56
|
+
gem install osbc-GENERATED_VERSION.gem
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use the gem with the following command:
|
|
60
|
+
```bash
|
|
61
|
+
osbc PATH_TO_GENERATE_BLOCKCHAIN
|
|
62
|
+
```
|
|
63
|
+
## RVM Commands to install Ruby 3.0.3 and Compile the Gem
|
|
64
|
+
* `rvm install 3.0.3`
|
|
65
|
+
* `rvm use 3.0.3`
|
|
66
|
+
* `rvm gemset create outerspace`
|
|
67
|
+
* `rvm gemset use outerspace`
|
|
68
|
+
* `gem install bundler`
|
|
69
|
+
* `bundle install`
|
|
70
|
+
## Environment Variables
|
|
71
|
+
The application has a .env file in root folder with the following environment variables:
|
|
72
|
+
|
|
73
|
+
FIRST_CHAIN_NAME=YOUR_CHAIN_NAME
|
|
74
|
+
FIRST_CHAIN_MAINTAINER=YOUR_NAME
|
|
75
|
+
CONTRACTS_LIMIT=100
|
|
76
|
+
SIGNATURES_LIMIT=5
|
|
77
|
+
## Configuration
|
|
78
|
+
### Rake tasks
|
|
79
|
+
|
|
80
|
+
This application has rake tasks to help you with the development process with docker.
|
|
81
|
+
The tasks are:
|
|
82
|
+
#### Docker actions
|
|
83
|
+
* `rake compose:install` - build docker compose and migrate the database
|
|
84
|
+
* `rake compose:build` - build docker compose services
|
|
85
|
+
* `rake compose:up` - start the docker compose services
|
|
86
|
+
* `rake compose:down` - stop the docker compose services
|
|
87
|
+
* `rake compose:db_detach` - detach the database from the docker compose services
|
|
88
|
+
* `rake compose:redis_detach` - detach the redis from the docker compose services
|
|
89
|
+
* `rake compose:back_detach` - detach the backend(redis, sidekiq, db) from the docker compose services
|
|
90
|
+
* `rake compose:restart` - restart the docker compose services
|
|
91
|
+
* `rake compose:clean_all` - clean all docker compose services
|
|
92
|
+
#### Database actions
|
|
93
|
+
* `rake compose_db:migrate` - migrate the database
|
|
94
|
+
* `rake compose_db:reset` - reset the database
|
|
95
|
+
* `rake compose_db:drop` - drop the database
|
|
96
|
+
* `rake compose_db:create` - create the database
|
|
97
|
+
* `rake compose_db:seed` - seed the database
|
|
98
|
+
* `rake compose_db:rollback` - rollback the database
|
|
99
|
+
* `rake compose_db:setup` - setup the database
|
|
100
|
+
* `rake compose_db:complete_setup` - complete setup the database
|
|
101
|
+
* `rake compose_db:reset_setup` - drop and setup the database
|
|
102
|
+
* `rake compose_db:reset` - reset the database
|
|
103
|
+
|
|
104
|
+
### Tests actions
|
|
105
|
+
* `rake compose_test:all` - run all tests
|
|
106
|
+
* `rake compose_test:clean_all` - run all tests after cleaning docker compose services
|
|
107
|
+
* `rake compose_test:controllers` - run controllers tests
|
|
108
|
+
* `rake compose_test:models` - run models tests
|
|
109
|
+
* `rake compose_test:requests` - run requests tests
|
|
110
|
+
* `rake compose_test:helpers` - run helpers tests
|
|
111
|
+
* `rake compose_test:mailers` - run mailers tests
|
|
112
|
+
* `rake compose_test:routing` - run routing tests
|
|
113
|
+
* `rake compose_test:views` - run views tests
|
|
114
|
+
|
|
115
|
+
### LOGS actions
|
|
116
|
+
* `rake compose_logs:web` - show web logs
|
|
117
|
+
* `rake compose_logs:db` - show db logs
|
|
118
|
+
* `rake compose_logs:redis` - show redis logs
|
|
119
|
+
* `rake compose_logs:sidekiq` - show sidekiq logs
|
|
120
|
+
* `rake compose_logs:all` - show all logs
|
|
121
|
+
* `rake compose_logs:tail_web` - tail web logs
|
|
122
|
+
* `rake compose_logs:tail_db` - tail db logs
|
|
123
|
+
* `rake compose_logs:tail_redis` - tail redis logs
|
|
124
|
+
* `rake compose_logs:tail_sidekiq` - tail sidekiq logs
|
|
125
|
+
* `rake compose_logs:tail_all` - tail all logs
|
|
126
|
+
* `rake compose_logs:follow_web` - follow web logs
|
|
127
|
+
* `rake compose_logs:follow_db` - follow db logs
|
|
128
|
+
* `rake compose_logs:follow_redis` - follow redis logs
|
|
129
|
+
* `rake compose_logs:follow_sidekiq` - follow sidekiq logs
|
|
130
|
+
* `rake compose_logs:follow_all` - follow all logs
|
|
131
|
+
|
|
132
|
+
## Start the blockchain
|
|
133
|
+
````bash
|
|
134
|
+
$ rake compose:up
|
|
135
|
+
````
|
|
136
|
+
### Access the blockchain web interface
|
|
137
|
+
http://localhost
|
|
138
|
+
|
|
139
|
+
## Mining Concept
|
|
140
|
+
- Every user will have a **randomized acceptable word list**
|
|
141
|
+
- This word list will have three classes of words
|
|
142
|
+
1. Common words
|
|
143
|
+
2. Symbol Sequence
|
|
144
|
+
3. Number Sequence
|
|
145
|
+
|
|
146
|
+
<p>
|
|
147
|
+
When a user want to mine a block, the user will open a ticket in the server
|
|
148
|
+
and after the ticket is open, the user will start to mine the block
|
|
149
|
+
</p>
|
|
150
|
+
|
|
151
|
+
<p>
|
|
152
|
+
The mine will depend of the contract signatures that will be formed by the server using the word list of the user
|
|
153
|
+
</p>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## Steps to mine a block:
|
|
157
|
+
|
|
158
|
+
1. The user will open a TICKET in the server
|
|
159
|
+
2. The server will send a message to the user to start mining if the POOL is open
|
|
160
|
+
3. The users will load the RANDOM WORD LIST provided by the server API
|
|
161
|
+
4. The user have to use 1 common word, 1 symbol sequence and 1 number sequence, randomize the characters
|
|
162
|
+
5. Transform the chartacters in a SHA256 hash
|
|
163
|
+
6. Transform the block info in before ticket opened in a SHA256 hash
|
|
164
|
+
5. Transform (Chars SHA256 hash + block info hash) in a SHA256 hash
|
|
165
|
+
6. If the hash is valid, the user will send the hash to the server
|
|
166
|
+
7. The server will check if the hash is valid
|
|
167
|
+
8. If the hash is valid, check if the same transactions have the same block state confirmation
|
|
168
|
+
9. If this transactions was not confirmed at this point at block history the server will add the user signature to the transaction contract
|
|
169
|
+
10. The block only can be hashed when the minimum number of contracts valids with minimum number of signatures is reached
|
|
170
|
+
11. The server will use the signature timeline to determine what transactions will be added to the block
|
|
171
|
+
12. The server will calculate the master hash after confirm all valid contracts signatures
|
|
172
|
+
13. The server will add the block to the blockchain and create a new one with last block unconfirmed transactions but completely unsigned
|
|
173
|
+
13. The server will start a open/closed pool cycle
|
|
174
|
+
14. The server will send a message to the user to start mining when the POOL is open and user has a ticket
|
|
175
|
+
<p>
|
|
176
|
+
The timestamps of the signatures will be usefull to version the block, checking it as a timeline
|
|
177
|
+
</p>
|
|
178
|
+
|
|
179
|
+
**The miners will be rewarded with the block reward distributed by the number of signatures**
|
|
180
|
+
## Contributing
|
|
181
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/outerspace-coding/outerspace-blockchain
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
185
|
+
* [LICENSE](LICENSE) - MIT License
|
data/Rakefile
ADDED
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|