Skip to content

Commit

Permalink
Merge branch 'develop' into 'beatrice'
Browse files Browse the repository at this point in the history
Merge develop to beatrice 2022-11

See merge request PBSA/peerplays!180
  • Loading branch information
serkixenos committed Nov 24, 2022
2 parents d234c3a + 804376b commit d76b752
Show file tree
Hide file tree
Showing 127 changed files with 7,334 additions and 5,951 deletions.
4 changes: 0 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ test-mainnet:

dockerize-mainnet:
stage: dockerize
dependencies:
- test-mainnet
variables:
IMAGE: $CI_REGISTRY_IMAGE/mainnet/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
before_script:
Expand Down Expand Up @@ -105,8 +103,6 @@ test-testnet:

dockerize-testnet:
stage: dockerize
dependencies:
- test-testnet
variables:
IMAGE: $CI_REGISTRY_IMAGE/testnet/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
before_script:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
[submodule "libraries/fc"]
path = libraries/fc
url = https://gitlab.com/PBSA/tools-libs/peerplays-fc.git
branch = latest-fc
branch = develop
ignore = dirty
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN \
expect \
git \
graphviz \
libboost1.67-all-dev \
libboost-all-dev \
libbz2-dev \
libcurl4-openssl-dev \
libncurses-dev \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.18.04
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ EXPOSE 22
WORKDIR /home/peerplays/

RUN \
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.bz2/download' -O boost_1_67_0.tar.bz2 && \
tar xjf boost_1_67_0.tar.bz2 && \
cd boost_1_67_0/ && \
wget -c 'https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2' -O boost_1_71_0.tar.bz2 && \
tar xjf boost_1_71_0.tar.bz2 && \
cd boost_1_71_0/ && \
./bootstrap.sh && \
./b2 install

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ sudo apt-get install \

Install Boost libraries from source
```
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.bz2/download' -O boost_1_67_0.tar.bz2
tar xjf boost_1_67_0.tar.bz2
cd boost_1_67_0/
wget -c 'https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2' -O boost_1_71_0.tar.bz2
tar xjf boost_1_71_0.tar.bz2
cd boost_1_71_0/
./bootstrap.sh
sudo ./b2 install
```
Expand Down
1 change: 1 addition & 0 deletions libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ add_subdirectory( egenesis )
add_subdirectory( fc )
add_subdirectory( net )
add_subdirectory( plugins )
add_subdirectory( sha3 )
add_subdirectory( time )
add_subdirectory( utilities )
add_subdirectory( wallet )
57 changes: 0 additions & 57 deletions libraries/app/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ template class fc::api<graphene::app::block_api>;
template class fc::api<graphene::app::network_broadcast_api>;
template class fc::api<graphene::app::network_node_api>;
template class fc::api<graphene::app::history_api>;
template class fc::api<graphene::app::crypto_api>;
template class fc::api<graphene::app::asset_api>;
template class fc::api<graphene::debug_witness::debug_api>;
template class fc::api<graphene::app::login_api>;
Expand Down Expand Up @@ -90,8 +89,6 @@ void login_api::enable_api(const std::string &api_name) {
_history_api = std::make_shared<history_api>(_app);
} else if (api_name == "network_node_api") {
_network_node_api = std::make_shared<network_node_api>(std::ref(_app));
} else if (api_name == "crypto_api") {
_crypto_api = std::make_shared<crypto_api>();
} else if (api_name == "asset_api") {
_asset_api = std::make_shared<asset_api>(_app);
} else if (api_name == "debug_api") {
Expand Down Expand Up @@ -289,11 +286,6 @@ fc::api<history_api> login_api::history() const {
return *_history_api;
}

fc::api<crypto_api> login_api::crypto() const {
FC_ASSERT(_crypto_api);
return *_crypto_api;
}

fc::api<asset_api> login_api::asset() const {
FC_ASSERT(_asset_api);
return *_asset_api;
Expand Down Expand Up @@ -522,55 +514,6 @@ vector<bucket_object> history_api::get_market_history(std::string asset_a, std::
FC_CAPTURE_AND_RETHROW((asset_a)(asset_b)(bucket_seconds)(start)(end))
}

crypto_api::crypto_api(){};

commitment_type crypto_api::blind(const blind_factor_type &blind, uint64_t value) {
return fc::ecc::blind(blind, value);
}

blind_factor_type crypto_api::blind_sum(const std::vector<blind_factor_type> &blinds_in, uint32_t non_neg) {
return fc::ecc::blind_sum(blinds_in, non_neg);
}

bool crypto_api::verify_sum(const std::vector<commitment_type> &commits_in, const std::vector<commitment_type> &neg_commits_in, int64_t excess) {
return fc::ecc::verify_sum(commits_in, neg_commits_in, excess);
}

verify_range_result crypto_api::verify_range(const commitment_type &commit, const std::vector<char> &proof) {
verify_range_result result;
result.success = fc::ecc::verify_range(result.min_val, result.max_val, commit, proof);
return result;
}

std::vector<char> crypto_api::range_proof_sign(uint64_t min_value,
const commitment_type &commit,
const blind_factor_type &commit_blind,
const blind_factor_type &nonce,
int8_t base10_exp,
uint8_t min_bits,
uint64_t actual_value) {
return fc::ecc::range_proof_sign(min_value, commit, commit_blind, nonce, base10_exp, min_bits, actual_value);
}

verify_range_proof_rewind_result crypto_api::verify_range_proof_rewind(const blind_factor_type &nonce,
const commitment_type &commit,
const std::vector<char> &proof) {
verify_range_proof_rewind_result result;
result.success = fc::ecc::verify_range_proof_rewind(result.blind_out,
result.value_out,
result.message_out,
nonce,
result.min_val,
result.max_val,
const_cast<commitment_type &>(commit),
proof);
return result;
}

range_proof_info crypto_api::range_get_info(const std::vector<char> &proof) {
return fc::ecc::range_get_info(proof);
}

// asset_api
asset_api::asset_api(graphene::app::application &app) :
_app(app),
Expand Down
10 changes: 7 additions & 3 deletions libraries/app/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ class application_impl : public net::node_delegate {
wild_access.allowed_apis.push_back("database_api");
wild_access.allowed_apis.push_back("network_broadcast_api");
wild_access.allowed_apis.push_back("history_api");
wild_access.allowed_apis.push_back("crypto_api");
wild_access.allowed_apis.push_back("bookie_api");
wild_access.allowed_apis.push_back("affiliate_stats_api");
wild_access.allowed_apis.push_back("sidechain_api");
Expand Down Expand Up @@ -765,6 +764,10 @@ class application_impl : public net::node_delegate {
FC_CAPTURE_AND_RETHROW((block_id))
}

virtual fc::time_point_sec get_last_known_hardfork_time() override {
return _chain_db->_hardfork_times[_chain_db->_hardfork_times.size() - 1];
}

/**
* Returns the time a block was produced (if block_id = 0, returns genesis time).
* If we don't know about the block, returns time_point_sec::min()
Expand Down Expand Up @@ -914,7 +917,8 @@ void application::initialize(const fc::path &data_dir, const boost::program_opti
wanted.insert("accounts_list");
wanted.insert("affiliate_stats");
}
wanted.insert("witness");
if (!wanted.count("delayed_node") && !wanted.count("debug_witness") && !wanted.count("witness")) // explicitly requested delayed_node or debug_witness functionality suppresses witness functions
wanted.insert("witness");
wanted.insert("bookie");

int es_ah_conflict_counter = 0;
Expand Down Expand Up @@ -946,7 +950,7 @@ void application::startup() {
}

std::shared_ptr<abstract_plugin> application::get_plugin(const string &name) const {
return my->_active_plugins[name];
return is_plugin_enabled(name) ? my->_active_plugins[name] : nullptr;
}

bool application::is_plugin_enabled(const string &name) const {
Expand Down
Loading

0 comments on commit d76b752

Please sign in to comment.