Giter VIP home page Giter VIP logo

revpop-core's Introduction

RevPop Core

RevPop Core is the RevPop blockchain implementation and command-line interface.

Branch Build Status
master
development

Quick start using Docker

A Dockerfile can be used to build and run a fully functional blockchain node. Refer to the instructions.

Getting Started

Build instructions and additional documentation are available in the Wiki.

We recommend building on Ubuntu 18.04 LTS (64-bit)

Build Dependencies:

sudo apt-get update
sudo apt-get install autoconf cmake make automake libtool git libboost-all-dev libssl-dev g++ libcurl4-openssl-dev doxygen

Build Script:

git clone https://github.com/Revolution-Populi/revpop-core.git
cd revpop-core
git checkout master # may substitute "master" with current release tag
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

Upgrade Script: (prepend to the Build Script above if you built a prior release):

git remote set-url origin https://github.com/Revolution-Populi/revpop-core.git
git checkout master
git remote set-head origin --auto
git pull
git submodule update --init --recursive # this command may fail
git submodule sync --recursive
git submodule update --init --recursive

NOTE: Versions of Boost since 1.58 are supported. Newer versions may work, but have not been tested well. If your system came pre-installed with a version of Boost that you do not wish to use, you may manually build your preferred version and use it with RevPop by specifying it on the CMake command line.

Example: cmake -DBOOST_ROOT=/path/to/boost ..

NOTE: RevPop requires a 64-bit operating system to build, and will not build on a 32-bit OS.

After Building, the witness_node can be launched with:

./programs/witness_node/witness_node

The node will automatically create a data directory including a config file. You can exit the node using Ctrl+C and setup the command-line wallet by editing witness_node_data_dir/config.ini as follows:

rpc-endpoint = 127.0.0.1:8090

After starting the witness node again, in a separate terminal you can run:

./programs/cli_wallet/cli_wallet

Set your inital password:

>>> set_password <PASSWORD>
>>> unlock <PASSWORD>

IMPORTANT: The cli_wallet or API interfaces to the witness node wouldn't be fully functional unless the witness node is fully synchronized with the blockchain. The cli_wallet command info will show result head_block_age which will tell you how far you are from the live current block of the blockchain.

To check your current block:

>>> info

To import your initial balance:

>>> import_balance <ACCOUNT NAME> [<WIF_KEY>] true

If you send private keys over this connection, rpc-endpoint should be bound to localhost for security.

Use help to see all available wallet commands. Source definition and listing of all commands is available here.

Using the API

We provide several different API's. Each API has its own ID. When running witness_node, initially two API's are available: API 0 provides read-only access to the database, while API 1 is used to login and gain access to additional, restricted API's.

Here is an example using wscat package from npm for websockets:

$ npm install -g wscat
$ wscat -c ws://127.0.0.1:8090
> {"id":1, "method":"call", "params":[0,"get_accounts",[["1.2.0"]]]}
< {"id":1,"result":[{"id":"1.2.0","annotations":[],"membership_expiration_date":"1969-12-31T23:59:59","registrar":"1.2.0","referrer":"1.2.0","lifetime_referrer":"1.2.0","network_fee_percentage":2000,"lifetime_referrer_fee_percentage":8000,"referrer_rewards_percentage":0,"name":"committee-account","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[],"address_auths":[]},"active":{"weight_threshold":6,"account_auths":[["1.2.5",1],["1.2.6",1],["1.2.7",1],["1.2.8",1],["1.2.9",1],["1.2.10",1],["1.2.11",1],["1.2.12",1],["1.2.13",1],["1.2.14",1]],"key_auths":[],"address_auths":[]},"options":{"memo_key":"GPH1111111111111111111111111111111114T1Anm","voting_account":"1.2.0","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"statistics":"2.7.0","whitelisting_accounts":[],"blacklisting_accounts":[]}]}

We can do the same thing using an HTTP client such as curl for API's which do not require login or other session state:

$ curl --data '{"jsonrpc": "2.0", "method": "call", "params": [0, "get_accounts", [["1.2.0"]]], "id": 1}' http://127.0.0.1:8090/rpc
{"id":1,"result":[{"id":"1.2.0","annotations":[],"membership_expiration_date":"1969-12-31T23:59:59","registrar":"1.2.0","referrer":"1.2.0","lifetime_referrer":"1.2.0","network_fee_percentage":2000,"lifetime_referrer_fee_percentage":8000,"referrer_rewards_percentage":0,"name":"committee-account","owner":{"weight_threshold":1,"account_auths":[],"key_auths":[],"address_auths":[]},"active":{"weight_threshold":6,"account_auths":[["1.2.5",1],["1.2.6",1],["1.2.7",1],["1.2.8",1],["1.2.9",1],["1.2.10",1],["1.2.11",1],["1.2.12",1],["1.2.13",1],["1.2.14",1]],"key_auths":[],"address_auths":[]},"options":{"memo_key":"GPH1111111111111111111111111111111114T1Anm","voting_account":"1.2.0","num_witness":0,"num_committee":0,"votes":[],"extensions":[]},"statistics":"2.7.0","whitelisting_accounts":[],"blacklisting_accounts":[]}]}

API 0 is accessible using regular JSON-RPC:

$ curl --data '{"jsonrpc": "2.0", "method": "get_accounts", "params": [["1.2.0"]], "id": 1}' http://127.0.0.1:8090/rpc

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

revpop-core's People

Contributors

goodwien avatar opensrce1 avatar revpopcommunity avatar tedthecreator avatar tropikalmonkey avatar walteratwork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

revpop-core's Issues

Saving personal data on Web UI

Hi ,
I'm the same user that use the current version of testnet and web UI. For the web UI, the saving personal data feature seems not working. Are there any solution to this issue?
Thanks.

Show version number while the witness start

Like this:

1290115ms th_a       witness.cpp:232               plugin_startup       ] witness plugin:  plugin_startup() end
1290115ms th_a       application.cpp:1124          startup_plugins      ] Plugin witness started
1290115ms th_a       main.cpp:181                  main                 ] Started RevPop node v0.6.3 on a chain with 4041382 blocks.
1290115ms th_a       main.cpp:182                  main                 ] Chain ID is 3eb7485cde282aabdfaf41d54fa4fedb1fe2537c598c969b0f4dce412f8ad29d

Query re working Functionality of Multisig txns

Description:
Multisig does not 'seem' to function as expected and/or perhaps an issue with 'help' instructions.

Instructions:

  • All based on Bionic Beaver and latest Revpop-Core as of 15-NOV-21
  • Using Safari Browser

Expected Behaviour/Steps to Reproduce:

  • Having made x3 testnet accounts (for ex AC1/AC2/AC3), I followed basic instructions to create a weighted hierarchy of 51 with AC1 = 51, AC2 = 49 and AC3 = 2. I performed all these weightings only in Active/Owner permissions of AC1. AC2 and AC3 were left with their own keys only.
  1. I tried the following tests and viewed the following results using the 'SEND TAB' Within Send Popup:
    a) Using AC2 to attempt to send RVP from AC1 to AC3, no memo. Received 'Execution Error' related to AC1 permissions
    b) Using AC2 to attempt to send RVP from AC1 to AC3, with memo. Received Memo Key error

  2. I tried the following tests and viewed the following results using the 'PROPOSE TAB' Within Send Popup:
    c) Using AC2 to attempt to send RVP from AC1 to AC3, with memo. After pressing 'Proceed' nothing happens. No txn on blockchain, no notification or message to either AC3 or AC1 to approve AC2's txn proposal. Disappears into ether.
    d) Using AC2 to attempt to send RVP from AC1 to AC3, no memo. Again, after pressing 'Proceed' nothing happens. No txn on blockchain, no notification or message to either AC3 or AC1 to approve AC2's txn proposal. Disappears into ether.

  3. I tried the following tests and viewed the following results using the 'SEND TAB' Within Send Popup and the propose toggle on Approving Txn:
    e) Using AC2 to attempt to send RVP from AC1 to AC3, no memo and Press 'Send' Button. Then in Confirmation window I changed 'Propose' Toggle to 'on', Select Proposer as AC2 and then press 'Propose' Button. Nothing at all happens; the window stays present. One can only cancel it.

As said, I am unsure if the procedure followed above is correct or whether I have made a mistake in setting up Multisig. Having read the instructions and tried doing this, using AC1, by, first, putting weighting and users in only the 'Active' permissions side and, then, observed the same functionality when I added the same to the 'Owner' Permissions I am unsure what the issue is.

Again, being a testnet, I am unsure as to what extent this is expected to work as so.

Cheers Guys - W.Hale;)

Paper wallet PDF output formatted incorrectly and misbranded

Bug Description
See title

Impacts
Describe which portion(s) of RevPop Core may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

Steps To Reproduce
Steps to reproduce the behavior (example outlined below):

  • enter menu item 'permissions' after creation of a testnet account or login with an existing account
  • click on the button "create paper wallet" to get an PDF output for the respective testnet account

See error in attached screenshot.

screenshot
screenshot

CORE TEAM TASK LIST

  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation

Error when pushing block: 3080000 unlinkable_block_exception: unlinkable block block does not link to known chain

*** Bug Description**

After running stable for a day to multiple weeks i sporadically get this error on either of my two nodes (martinl420 and sorry-for-botting), which (after the first time of it happening) kicked me off the witness/voting list due to it not running/communicating for long enough. After that i started watching it, it happens every so and so. I let martinl420 run just for testing and it happens on both nodes, both made by following the guides to a dot. The normal Got block: #54XXXXX is nowhere to be seen, so i assume i'm right to think that its not functioning properly.

Seeing as our goal is to have maximum uptime, this is kinda worrying me. Is there something i can do about this or do we have a bug on our hands here?

*** Impacts**

  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)

*** Steps To Reproduce**

  1. Follow guides provided to get a witness up in the air
  2. Let 'er run for an amount of time (1 to ? days, i've seen it run stable for multiple weeks or for days. it varies.)
  3. Get the unlinable_block_exception error

*** Expected Behavior**

To keep having blocks come in every 250ms :)

*** Host Environment (optional)**

Ubuntu 18.04 LTSC

Tesntet account creation

There seems to be an issue creating new accounts on the testnet.
I have tried creating accounts but keep getting this error.

Failed to create account: sentnl-agents - Execution error: Assert Exception: !self.is_locked():

Tried multiple browser, each time a wallet is created but not an account.
Also tried logging in and then creating an account, same issue occurs.

Add the ability to sign commit/reveal operations with a witness key

At the moment, we can use only the user's active key to sign the commits and the reveals. This is not good from a security point of view: the key must be stored in clear-text on the server.

It is necessary to add the ability to sign transactions with a public witness key.

Synchronize with the upstream and get the latest operations

Make available upstream operations. This will include restoring some old ones, adding new operations and network layer objects, as well as removing unneeded operations as we go. Also need to make sure that the auto-tests are working after completing the work.

Complete the migration to Amazon ECR

Since we got an alias for our public docker registry on Amazon, we need to check that everything is working as expected and update the active links in the documentation and scripts.

Witness in top 63 not being selected; Similar to -> #26 Witness block generation issue, seeing "broadcast_commit" and "broadcast_reveal" but not generating

Witness Node up and running 24/7 for 2+ days (w-haleys-node-t and I believe martinl420 has same issue). Both running on Ubuntu 18.04.6 (Bionic B), with full setup install, albeit on different host machines.

Each of these two nodes has enough votes to be in the top 63 potential (51 and 52 last I checked) witnesses so I would expect both of our nodes to be included in the top 21 multiple times over the last couple of days. Neither of us have been selected at all, akin to Issue #26, and I do not know whether it is because the 'main' 21 nodes generally chosen have a ridiculous amount of votes or something else. Obviously 'we' understand the votes being required to get into the top 63 but assume, after that, it should be random selection otherwise favouritism/money equals no chance for any other node starting up and 'just' getting in the top 63. I've also noticed, whether unrelated or not, that, of the 7200RVP/Hr distributed for block creation for the top 21 nodes, none actually seems to be paid, but 'disappears'?

Our nodes are pinging the blockchain, consistently, twice per hour. The first one, every hour, has the comment:

'Commit Operation was send'

The second, one states:

'Reveal Operation was send'

I hope that the information given helps this be fixed. Any information needed, please contact me.

Keep it up guys;)

PS I have also noticed, having sat and counted each node's blocks for an hour straight, that, on the start of the new hour (and supposed new witnesses) that, on the change, exactly the same witnesses were chosen and even in the same order!

=> ERROR [build 5/5] RUN Docker Visual Studio Code Mac OS

I have macOS 10.15.7, building a container in docker, but when creating an image in Visual Studio Code, it gives this error

[build 5/5] RUN ( git submodule sync --recursive || find pwd -type f -name .git | while read f; do rel="$(echo "${f#$PWD/}" | sed 's=[^/]/=../=g')"; sed -i "s=: ./.git/=: $rel/=" "$f"; done && git submodule sync --recursive ) && git submodule update --init --recursive && cmake -DCMAKE_BUILD_TYPE=Release -DGRAPHENE_DISABLE_UNITY_BUILD=ON . && make witness_node cli_wallet get_dev_key && install -s programs/witness_node/witness_node programs/genesis_util/get_dev_key programs/cli_wallet/cli_wallet /usr/local/bin && mkdir /etc/revpop && git rev-parse --short HEAD > /etc/revpop/version && cd / && rm -rf /revpop-core:
#10 0.523 fatal: not a git repository (or any of the parent directories): .git
#10 0.556 fatal: not a git repository (or any of the parent directories): .git

executor failed running [/bin/sh -c ( git submodule sync --recursive || find pwd -type f -name .git | while read f; do rel="$(echo "${f#$PWD/}" | sed 's=[^/]/=../=g')"; sed -i "s=: ./.git/=: $rel/=" "$f"; done && git submodule sync --recursive ) && git submodule update --init --recursive && cmake -DCMAKE_BUILD_TYPE=Release -DGRAPHENE_DISABLE_UNITY_BUILD=ON . && make witness_node cli_wallet get_dev_key && install -s programs/witness_node/witness_node programs/genesis_util/get_dev_key programs/cli_wallet/cli_wallet /usr/local/bin && mkdir /etc/revpop && git rev-parse --short HEAD > /etc/revpop/version && cd / && rm -rf /revpop-core]: exit code: 128
The terminal process "zsh '-c', 'docker build --pull --rm -f "Dockerfile" -t revpop-core:latest "."'" terminated with exit code: 1.

Clean up testing code

Remove unused variables from code

/opt/tests/tests/simple_maker_taker_fee_tests.cpp: In member function ‘void simple_maker_taker_fee_tests::simple_match_and_fill_with_different_fees_uia_1::test_method()’:
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:649:25: warning: unused variable ‘JILL_PRECISION’ [-Wunused-variable]
          const uint16_t JILL_PRECISION = 100;
                         ^~~~~~~~~~~~~~
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:654:25: warning: unused variable ‘IZZY_PRECISION’ [-Wunused-variable]
          const uint16_t IZZY_PRECISION = 1000;
                         ^~~~~~~~~~~~~~
/opt/tests/tests/simple_maker_taker_fee_tests.cpp: In member function ‘void simple_maker_taker_fee_tests::simple_match_and_fill_with_different_fees_uia_2::test_method()’:
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:743:25: warning: unused variable ‘JILL_PRECISION’ [-Wunused-variable]
          const uint16_t JILL_PRECISION = 100;
                         ^~~~~~~~~~~~~~
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:748:25: warning: unused variable ‘IZZY_PRECISION’ [-Wunused-variable]
          const uint16_t IZZY_PRECISION = 1000;
                         ^~~~~~~~~~~~~~
/opt/tests/tests/simple_maker_taker_fee_tests.cpp: In member function ‘void simple_maker_taker_fee_tests::simple_match_and_fill_with_different_fees_uia_3::test_method()’:
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:839:25: warning: unused variable ‘JILL_PRECISION’ [-Wunused-variable]
          const uint16_t JILL_PRECISION = 100;
                         ^~~~~~~~~~~~~~
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:844:25: warning: unused variable ‘IZZY_PRECISION’ [-Wunused-variable]
          const uint16_t IZZY_PRECISION = 1000;
                         ^~~~~~~~~~~~~~
/opt/tests/tests/simple_maker_taker_fee_tests.cpp: In member function ‘void simple_maker_taker_fee_tests::simple_match_and_fill_with_different_fees_uia_4::test_method()’:
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:967:19: warning: unused variable ‘izzy_maker_fee_percent’ [-Wunused-variable]
          uint16_t izzy_maker_fee_percent = izzy_market_fee_percent;
                   ^~~~~~~~~~~~~~~~~~~~~~
/opt/tests/tests/simple_maker_taker_fee_tests.cpp: In member function ‘void simple_maker_taker_fee_tests::simple_match_and_fill_with_different_fees_smart_asset::test_method()’:
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:1012:25: warning: unused variable ‘JILL_PRECISION’ [-Wunused-variable]
          const uint16_t JILL_PRECISION = 100;
                         ^~~~~~~~~~~~~~
/opt/tests/tests/simple_maker_taker_fee_tests.cpp: In member function ‘void simple_maker_taker_fee_tests::partial_maker_partial_taker_fills_2::test_method()’:
/opt/tests/tests/simple_maker_taker_fee_tests.cpp:1271:19: warning: unused variable ‘jill_taker_fee_percent’ [-Wunused-variable]
          uint16_t jill_taker_fee_percent = jill_market_fee_percent;

Lifetime Membership Subscription does not reflect in subsequent txn fees

*** Bug Description**
As above

*** Steps To Reproduce**
Create User and either get RVP from Faucet or another, previously created, user. Then upgrade user to 'Lifetime Member'.

*** Expected Behavior**
According to the fee structure one would expect, after doing the above, that subsequent fees of any type should be subject to the cheaper fee column shown on Testnet. However this does not seem to be happening. i.e. Creating Witness out of same user account or any Txn fees still seem to be deducted as if one was 'not' a lifetime member.

*** Host Environment (optional)**
Current testnet 0.6.3 as of 17-NOV-21.

Thanks Guys, W.Hale:)

Recommend Hardware

What hardware do you recommend for running a node? Would it be different by using Docker than by compiling directly? Someone from the RVP community failed to compile twice using an RPI4 with 2GB RAM, but when running a node in another device it barely uses 100-200MB.

unlinkable block

Node is no longer syncing and logs show unlinkable block.

{"new_block":{"previous":"003f5d348a4dc4d4de5de7d1ed2fe419022f2f7b","timestamp":"2021-09-14T05:02:30","witness":"1.6.14","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"1f48659cda458543b697c620f54fa592b76304b35b1668c6ff48f98731718e031b4f927fab215c4dbe989246fd6fe0a295541bba70fe2fb4403429b4d0c936ac13","transactions":[]}}
th_a db_block.cpp:227 _push_block
181745ms th_a application.cpp:551 handle_block ] Error when pushing block:
3080000 unlinkable_block_exception: unlinkable block
block does not link to known chain
{}
th_a db_block.cpp:140 _push_block

info

  "head_block_num": 4152512,
  "head_block_id": "003f5cc02488f9eb2dead4822c75dfff6da8029b",
  "head_block_age": "13 minutes old",
  "next_maintenance_time": "5 minutes ago",
  "chain_id": "3eb7485cde282aabdfaf41d54fa4fedb1fe2537c598c969b0f4dce412f8ad29d",

Host Environment

  • Host OS: Ubuntu 18.04 LTS
  • Host Physical RAM 32GB
  • RevPop Core Version: v0.6.3
  • OpenSSL Version: OpenSSL 1.1.1 11 Sep 2018
  • Boost Version: 1.65.1
  • Websocket++: 0.7.0

Updated witness, "failed to push new block", "hash is broken", "pushing block to fork database that failed to link"

Hi all, I have been running a witness for the last few months and although I've had success with prior updates, ever since I've updated to v0.6.3 my node has been acting up. Here is a snippet of the console after I start my witness now:

1290115ms th_a       witness.cpp:194               plugin_startup       ] witness plugin:  plugin_startup() begin
1290115ms th_a       witness.cpp:198               plugin_startup       ] Launching block production for 1 witnesses.
1290115ms th_a       witness.cpp:232               plugin_startup       ] witness plugin:  plugin_startup() end
1290115ms th_a       application.cpp:1124          startup_plugins      ] Plugin witness started
1290115ms th_a       main.cpp:181                  main                 ] Started RevPop node on a chain with 4041382 blocks.
1290115ms th_a       main.cpp:182                  main                 ] Chain ID is 3eb7485cde282aabdfaf41d54fa4fedb1fe2537c598c969b0f4dce412f8ad29d
1291000ms th_a       witness.cpp:881               block_production_loo ] Not producing block because production is disabled until we receive a recent block (see: --enable-stale-production)
1291232ms th_a       db_block.cpp:221              _push_block          ] Failed to push new block:
10 assert_exception: Assert Exception
cr_itr->hash == hash: Hash is broken.
    {}
    th_a  commit_reveal_v3_evaluator.cpp:150 do_evaluate

    {"op":{"fee":{"amount":0,"asset_id":"1.3.0"},"account":"1.2.53","value":"15614816026826025587","maintenance_time":1631037110,"witness_key":"RVP78y22G5rGsmHevqYttvjWfDkMFcpzntH3kyrBbHUa4qvNqM3v4"}}
    th_a  commit_reveal_v3_evaluator.cpp:162 do_evaluate

    {}
    th_a  evaluator.cpp:48 start_evaluate

    {"op":[62,{"fee":{"amount":0,"asset_id":"1.3.0"},"account":"1.2.53","value":"15614816026826025587","maintenance_time":1631037110,"witness_key":"RVP78y22G5rGsmHevqYttvjWfDkMFcpzntH3kyrBbHUa4qvNqM3v4"}]}
    th_a  db_block.cpp:766 apply_operation

    {"trx":{"ref_block_num":43686,"ref_block_prefix":1947504880,"expiration":"2021-09-07T17:52:20","operations":[[62,{"fee":{"amount":0,"asset_id":"1.3.0"},"account":"1.2.53","value":"15614816026826025587","maintenance_time":1631037110,"witness_key":"RVP78y22G5rGsmHevqYttvjWfDkMFcpzntH3kyrBbHUa4qvNqM3v4"}]],"extensions":[],"signatures":["1f37b20225be6dbd4ecf697b60fa357ab5821fdaf7709bb38a4099d108fb99ddbe10370de83f2ea9f4ac7a13a75f28ce69f24d8f0c97ffabe33e3c37833f399145"]}}
    th_a  db_block.cpp:752 _apply_transaction

    {"next_block.block_num()":4041383}
    th_a  db_block.cpp:659 _apply_block
1291232ms th_a       application.cpp:556           handle_block         ] Error when pushing block:
10 assert_exception: Assert Exception
cr_itr->hash == hash: Hash is broken.
    {}
    th_a  commit_reveal_v3_evaluator.cpp:150 do_evaluate

    {"op":{"fee":{"amount":0,"asset_id":"1.3.0"},"account":"1.2.53","value":"15614816026826025587","maintenance_time":1631037110,"witness_key":"RVP78y22G5rGsmHevqYttvjWfDkMFcpzntH3kyrBbHUa4qvNqM3v4"}}
    th_a  commit_reveal_v3_evaluator.cpp:162 do_evaluate

    {}
    th_a  evaluator.cpp:48 start_evaluate

    {"op":[62,{"fee":{"amount":0,"asset_id":"1.3.0"},"account":"1.2.53","value":"15614816026826025587","maintenance_time":1631037110,"witness_key":"RVP78y22G5rGsmHevqYttvjWfDkMFcpzntH3kyrBbHUa4qvNqM3v4"}]}
    th_a  db_block.cpp:766 apply_operation

    {"trx":{"ref_block_num":43686,"ref_block_prefix":1947504880,"expiration":"2021-09-07T17:52:20","operations":[[62,{"fee":{"amount":0,"asset_id":"1.3.0"},"account":"1.2.53","value":"15614816026826025587","maintenance_time":1631037110,"witness_key":"RVP78y22G5rGsmHevqYttvjWfDkMFcpzntH3kyrBbHUa4qvNqM3v4"}]],"extensions":[],"signatures":["1f37b20225be6dbd4ecf697b60fa357ab5821fdaf7709bb38a4099d108fb99ddbe10370de83f2ea9f4ac7a13a75f28ce69f24d8f0c97ffabe33e3c37833f399145"]}}
    th_a  db_block.cpp:752 _apply_transaction

    {"next_block.block_num()":4041383}
    th_a  db_block.cpp:659 _apply_block

    {"new_block":{"previous":"003daaa6f0901474f977d81f68f5c43b824d74f0","timestamp":"2021-09-07T17:51:55","witness":"1.6.20","transaction_merkle_root":"7d8bf4402636cc5417f117604e6df676b8765afd","extensions":[],"witness_signature":"1f323e7b8d162c96c8808551d69869599a45fb0bfe675117bb25376ca6d6a575d0041e6ea1a78817706212b471e8a96229e16196d33af723555ee892fe6ff30fda","transactions":[{"ref_block_num":43686,"ref_block_prefix":1947504880,"expiration":"2021-09-07T17:52:20","operations":[[62,{"fee":{"amount":0,"asset_id":"1.3.0"},"account":"1.2.53","value":"15614816026826025587","maintenance_time":1631037110,"witness_key":"RVP78y22G5rGsmHevqYttvjWfDkMFcpzntH3kyrBbHUa4qvNqM3v4"}]],"extensions":[],"signatures":["1f37b20225be6dbd4ecf697b60fa357ab5821fdaf7709bb38a4099d108fb99ddbe10370de83f2ea9f4ac7a13a75f28ce69f24d8f0c97ffabe33e3c37833f399145"],"operation_results":[[1,"1.25.55"]]}]}}
    th_a  db_block.cpp:227 _push_block
1291266ms th_a       fork_database.cpp:64          push_block           ] Pushing block to fork database that failed to link: 003daaa82de064b8c888f126c0b3dc0dc24a93b0, 4041384
1291266ms th_a       fork_database.cpp:65          push_block           ] Head: 4041382, 003daaa6f0901474f977d81f68f5c43b824d74f0
1291266ms th_a       application.cpp:551           handle_block         ] Error when pushing block:
3080000 unlinkable_block_exception: unlinkable block
block does not link to known chain
    {}
    th_a  fork_database.cpp:84 _push_block

    {"new_block":{"previous":"003daaa7b1263e08ae9f9d338792cf43ee14c3d8","timestamp":"2021-09-07T17:52:00","witness":"1.6.15","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"1f3cbebc3b57baeeb3f607eefb5241e7b6bf477364dbf838866b214bc3b7c7e8f06c190c55341eb84a8d80b09ee82d85aed9f52669a888590be0ee84285c97c4f1","transactions":[]}}
    th_a  db_block.cpp:227 _push_block
1291269ms th_a       fork_database.cpp:64          push_block           ] Pushing block to fork database that failed to link: 003daaa97f441bef94b09dba257806dfc563da25, 4041385
1291269ms th_a       fork_database.cpp:65          push_block           ] Head: 4041382, 003daaa6f0901474f977d81f68f5c43b824d74f0
1291269ms th_a       application.cpp:551           handle_block         ] Error when pushing block:
3080000 unlinkable_block_exception: unlinkable block
block does not link to known chain

Eventually this leads to a lot of this:

1583000ms th_a       witness.cpp:881               block_production_loo ] Not producing block because production is disabled until we receive a recent block (see: --enable-stale-production)
1584001ms th_a       witness.cpp:881               block_production_loo ] Not producing block because production is disabled until we receive a recent block (see: --enable-stale-production)
1585000ms th_a       witness.cpp:881               block_production_loo ] Not producing block because production is disabled until we receive a recent block (see: --enable-stale-production)
1586001ms th_a       witness.cpp:881               block_production_loo ] Not producing block because production is disabled until we receive a recent block (see: --enable-stale-production)
1587000ms th_a       witness.cpp:881               block_production_loo ] Not producing block because production is disabled until we receive a recent block (see: --enable-stale-production)

Am I stuck on an old fork pre 0.6.3? Do you think I need to delete my chain and resync? Thank you for any advice.

Missing CD in getting started guide after opening second terminal to open cli wallet

Hi guys, just popping in. Wanted to try and get a node running, have to verify something. When opening cli_wallet by your instructions, wouldn't you first need to cd into revpop-core/build/revpop-core, and then run ./programs/cli_wallet/cli_wallet, otherwhise cli_wallet (or witness_node for that matter) will not be found.

Second Q, How can i verify if everything is working allright after doing all that is instructed? I dont see Witness x production slot has arrived; generating a block now...
Generated block #x with timestamp x at time x

I'll rebuild today to see if i made any errors. Thanks for your time!

Implement consistency mechanism for the witness key and the user active key

To ensure key consistency after #2 , need to avoid storing the witness's public key in two places. It seems like a good solution to transfer the witness key to the authority level, where there is already the active keys and the owner keys.

As part of this task, need to check the correctness of all operations that relate to witnesses and their keys (create witness, update witness...)

Witness plugin should send commit and reveal operations according to exponential distribution rule

For better network throughput, we need to have operations distributed between maintenance intervals.
Linear for commit operations and exponential for reveal operations.

  • send no more than 1 commit during commit time (use crypto secure RNG, openssl library is better)
  • send no more than 1 reveal during reveal time (save previously generated number in memory)
  • randomly decide whether or not send on current block
  • send only if synchronized
  • cover the function with tests

Witness block generation issue, seeing "broadcast_commit" and "broadcast_reveal" but not generating

I know that this is something on my side that I probably messed up, but I figured I would reach out for help. I followed the instructions to become a witness on the testnet here https://github.com/Revolution-Populi/revpop-core/wiki/How-to-become-a-witness-(Block-Producer) (which were very well written by the way!) but alas I am facing some issues. When I get to the point to where I start up my witness node, which is setup with my witness-id and private-key pair, instead of seeing a message like:

"Witness 1.6.10 production slot has arrived; generating a block now...
Generated block #367 with timestamp 2021-06-08T20:46:30 at time 2021-06-08T20:46:30"

I am seeing blocks confirmed by other witnesses and two other messages similar to the below (minus some hashes and my account name):

"witness.cpp:489 broadcast_commit Commit operation for the current maintenance period has already been made"

and then:

"witness.cpp:612 broadcast_reveal Double reveal operations is prohibited" (I only saw this message once)

I have confirmed that my account is upgraded to a "Lifetime Member" and also upgraded to a Witness on my account dashboard (https://testnet.revolutionpopuli.com/account/fire-gargoyle). I see many events after that whose block numbers match up with the block numbers in the broadcast_commit messages.

I tried to vote again to check and make sure that it went through and the wallet confirmed for me that I had already voted for myself. I also tried recreating the witness but the wallet confirmed for me that I was already a witness. Yet when I check the get_global_properties I am not on the active witness list, even after the next maintenance period which I see with get_dynamic_global_properties. However when I start my witness node I do see a line that states "Launching block production for 1 witnesses" in the witness plugin startup function and then "Plugin witness started".

Did I bork it? Can I provide more information? Maybe I just need more votes? laugh Thank you for any assistance.

Race conditions in the test case "two_node_network"

Entering test module "Test Application"
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(56): Entering test case "load_configuration_options_test_config_logging_files_created"
1404618ms th_a       config_util.cpp:250           create_new_config_fi ] Writing new config file at /tmp/graphene-tmp/b9d4-790f-514c-107e/config.ini
1404619ms th_a       config_util.cpp:312           create_logging_confi ] Writing new config file at /tmp/graphene-tmp/b9d4-790f-514c-107e/logging.ini
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(56): Leaving test case "load_configuration_options_test_config_logging_files_created"; testing time: 2228us
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(84): Entering test case "load_configuration_options_test_config_ini_options"
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(84): Leaving test case "load_configuration_options_test_config_ini_options"; testing time: 293us
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(121): Entering test case "load_configuration_options_test_logging_ini_options"
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(121): Leaving test case "load_configuration_options_test_logging_ini_options"; testing time: 932us
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(159): Entering test case "load_configuration_options_test_legacy_config_ini_options"
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(159): Leaving test case "load_configuration_options_test_legacy_config_ini_options"; testing time: 361us
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(213): Entering test case "two_node_network"
Creating and initializing app1
Starting app1 and waiting 500 ms
Creating and initializing app2
Starting app2 and waiting 500 ms
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(254): fatal error: in "two_node_network": critical check app1.p2p_node()->get_connection_count() == 1u has failed [0 != 1]
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(213): Leaving test case "two_node_network"; testing time: 142357us
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(331): Entering test case "application_impl_breakout"

*** 1 failure is detected in the test module "Test Application"
/home/runner/work/revpop-core/revpop-core/tests/app/main.cpp(331): Leaving test case "application_impl_breakout"; testing time: 216us

rdPOS: Blacklisting witnesses seems doesn't work

Bug Description
As it is stated in WP, when new active witnesses are chosen, "candidates who don’t send a RN during the reveal period cannot be selected". It doesn't seem to work or isn't working properly.

Impacts
Describe which portion(s) of RevPop Core may be impacted by this bug. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

Steps To Reproduce
Steps to reproduce the behavior (example outlined below):

  1. Register a new witness.
  2. Make sure a new witness is in TOP63 list by stake.
  3. Other witnesses should keep sending commits/reveals.
  4. A new witness will be chosen randomly as active, even if it never send commits/reveals.

Expected Behavior
A new witness should never be selected as active as long as it is not participating in commit/reveal logic.

Errors trying to "make" on Ubuntu 21

Build Environment
Details about the build environment, including the relevant required libraries. Much of this information can be found in the CMakeFiles/CMakeOutput.log.

  • Host OS: Ubuntu 21.04
  • Host Physical RAM 32gb
  • Source Branch/Tag: I dont know
  • OpenSSL Version: I dont know
  • Boost Version: I installed 1.58 script says its found 1.74
  • C++ Compiler: I dont know

Im using the instructions in this link...

https://github.com/Revolution-Populi/revpop-core/blob/master/README.md

My first attempt at installing failed. I spotted in your instructions possible issues with Boost. So i installed Boost 1.58

Iif i run this command.....

cat /usr/local/include/boost/version.hpp | grep "BOOST_LIB_VERSION"

I get the below results which suggest I am using 1.58

// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
#define BOOST_LIB_VERSION "1_58"

When I try again and specify the path to 1.58 for the cmake command that you put in your instructions.....

cmake -DBOOST_ROOT=/usr/local/include/boost ..

The script stillreports back to me that it wants to use 1.74

Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.58") found components: thread iostreams date_time system filesystem program_options chrono unit_test_framework context coroutine regex


When I run the Make command it starts OK,  but then I get a few errors like this..............


In file included from /usr/include/openssl/bio.h:20,
             from /usr/include/openssl/conf.h:13,
             from /usr/local/include/boost/asio/ssl/detail/openssl_types.hpp:19,
             from /usr/local/include/boost/asio/ssl/context_base.hpp:19,
             from /usr/local/include/boost/asio/ssl/context.hpp:27,
             from /usr/local/include/boost/asio/ssl.hpp:19,
             from /home/plotter2/revpop-core/libraries/fc/vendor/websocketpp/websocketpp/common/asio_ssl.hpp:36,
             from /home/plotter2/revpop-core/libraries/fc/vendor/websocketpp/websocketpp/transport/asio/security/tls.hpp:35,
             from /home/plotter2/revpop-core/libraries/fc/vendor/websocketpp/websocketpp/config/asio_client.hpp:33,
             from /home/plotter2/revpop-core/libraries/fc/src/network/http/websocket.cpp:2:

/usr/local/include/boost/asio/ssl/detail/impl/openssl_init.ipp: In constructor ‘boost::asio::ssl::detail::openssl_init_base::do_init::do_init()’:
/usr/local/include/boost/asio/ssl/detail/impl/openssl_init.ipp:43:23: error: expected id-expression before ‘(’ token
43 | mutexes_.resize(::CRYPTO_num_locks());

There's several of these "error: expected id-expression before" errors

I getafew of these as well, but i assume these arecaused by the errorsthat have already happened
In file included from /usr/local/include/boost/asio/ssl/context.hpp:786,
from /usr/local/include/boost/asio/ssl.hpp:19,
from /home/plotter2/revpop-core/libraries/fc/vendor/websocketpp/websocketpp/common/asio_ssl.hpp:36,
from /home/plotter2/revpop-core/libraries/fc/vendor/websocketpp/websocketpp/transport/asio/security/tls.hpp:35,
from /home/plotter2/revpop-core/libraries/fc/vendor/websocketpp/websocketpp/config/asio_client.hpp:33,
from /home/plotter2/revpop-core/libraries/fc/src/network/http/websocket.cpp:2:
/usr/local/include/boost/asio/ssl/impl/context.ipp: In constructor ‘boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)’:
/usr/local/include/boost/asio/ssl/impl/context.ipp:83:31: error: ‘::SSLv2_method’ has not been declared; did you mean ‘SSLv23_method’?
83 | handle_ = ::SSL_CTX_new(::SSLv2_method());
| ^~~~~~~~~~~~
| SSLv23_method
/usr/local/include/boost/asio/ssl/impl/context.ipp:86:31: error: ‘::SSLv2_client_method’ has not been declared; did you mean ‘SSLv23_client_method’?
86 | handle_ = ::SSL_CTX_new(::SSLv2_client_method());
| ^~~~~~~~~~~~~~~~~~~
| SSLv23_client_method
/usr/local/include/boost/asio/ssl/impl/context.ipp:89:31: error: ‘::SSLv2_server_method’ has not been declared; did you mean ‘SSLv23_server_method’?
89 | handle_ = ::SSL_CTX_new(::SSLv2_server_method());
| ^~~~~~~~~~~~~~~~~~~
| SSLv23_server_method
/usr/local/include/boost/asio/ssl/impl/context.ipp:93:31: error: ‘::SSLv3_method’ has not been declared; did you mean ‘SSLv23_method’?
93 | handle_ = ::SSL_CTX_new(::SSLv3_method());
| ^~~~~~~~~~~~
| SSLv23_method
/usr/local/include/boost/asio/ssl/impl/context.ipp:96:31: error: ‘::SSLv3_client_method’ has not been declared; did you mean ‘SSLv23_client_method’?
96 | handle_ = ::SSL_CTX_new(::SSLv3_client_method());
| ^~~~~~~~~~~~~~~~~~~
| SSLv23_client_method
/usr/local/include/boost/asio/ssl/impl/context.ipp:99:31: error: ‘::SSLv3_server_method’ has not been declared; did you mean ‘SSLv23_server_method’?
99 | handle_ = ::SSL_CTX_new(::SSLv3_server_method());
| ^~~~~~~~~~~~~~~~~~~
| SSLv23_server_method
/usr/local/include/boost/asio/ssl/impl/context.ipp: In destructor ‘boost::asio::ssl::context::~context()’:
/usr/local/include/boost/asio/ssl/impl/context.ipp:199:16: error: invalid use of incomplete type ‘SSL_CTX’ {aka ‘struct ssl_ctx_st’}
199 | if (handle_->default_passwd_callback_userdata)

faucet2 doesn't have rvp

There's a minor issue in the Testnet. New users aren't getting 10,000 RVP since faucet2 ran out of funds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.