Skip to content

Commit

Permalink
Merge pull request #2453 from bitshares/release
Browse files Browse the repository at this point in the history
Merge release branch into master for 5.2.1 release
  • Loading branch information
abitmore authored May 5, 2021
2 parents 1f3e2e9 + 64432df commit c06d09c
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 30 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ ioBanker <[email protected]>
Karl Semich <[email protected]>
SahkanDesertHawk <[email protected]>
Scott Howard <[email protected]>
TechnoL0g <[email protected]>
Tydus <[email protected]>
William <[email protected]>
bangzi1001 <[email protected]>
d.yakovitsky <[email protected]>
ddylko <ddylko@ddylkoPC>
iHashFury <[email protected]>
necklace <[email protected]>
xiao93 <[email protected]>
xuquan316 <[email protected]>
Bartek Wrona <[email protected]>
BhuzOr <[email protected]>
Expand All @@ -80,4 +82,3 @@ lafona <[email protected]>
liondani <[email protected]>
lososeg <[email protected]>
sinetek <[email protected]>
xiao93 <[email protected]>
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "BitShares-Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "5.2.0"
PROJECT_NUMBER = "5.2.1"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
BitShares Core
==============

BitShares Core is the BitShares blockchain implementation and command-line interface.
[BitShares Core](https://github.com/bitshares/bitshares-core) is the BitShares blockchain implementation and command-line interface.
The web browser based wallet is [BitShares UI](https://github.com/bitshares/bitshares-ui).

Visit [BitShares.org](https://bitshares.org/) to learn about BitShares and join the community at [BitSharesTalk.org](https://bitsharestalk.org/).

Information for developers can be found in the [Wiki](https://github.com/bitshares/bitshares-core/wiki) and the [BitShares Developer Portal](https://dev.bitshares.works/). Users interested in how BitShares works can go to the [BitShares Documentation](https://how.bitshares.works/) site.

Visit [Awesome BitShares](https://github.com/bitshares/awesome-bitshares) to find more resources and links.
Visit [Awesome BitShares](https://github.com/bitshares/awesome-bitshares) to find more resources and links E.G. chat groups, client libraries and extended APIs.

* [Getting Started](#getting-started)
* [Support](#support)
Expand Down Expand Up @@ -193,6 +193,8 @@ Technical support is available in the [BitSharesTalk technical support subforum]

BitShares Core bugs can be reported directly to the [issue tracker](https://github.com/bitshares/bitshares-core/issues).

Questions can be posted in [Github Discussions](https://github.com/bitshares/bitshares-core/discussions).

BitShares UI bugs should be reported to the [UI issue tracker](https://github.com/bitshares/bitshares-ui/issues).

Up to date online Doxygen documentation can be found at [Doxygen.BitShares.org](https://doxygen.bitshares.org/hierarchy.html).
Expand Down
4 changes: 2 additions & 2 deletions libraries/app/application_impl.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ class application_impl : public net::node_delegate, public std::enable_shared_fr
void startup_plugins() const;
void shutdown_plugins() const;

/// Initialize genesis state. Called by @ref open_chain_database.
/// Initialize genesis state. Called by open_chain_database().
graphene::chain::genesis_state_type initialize_genesis_state() const;
/// Open the chain database. Called by @ref startup.
void open_chain_database() const;

friend graphene::app::application;
friend class graphene::app::application;

application& _self;

Expand Down
2 changes: 2 additions & 0 deletions libraries/egenesis/seed-nodes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"seed.roelandp.nl:1776", // roelandp (Canada)
"seed1.xbts.io:1776", // xbts.io (Germany)
"seed2.xbts.io:1776", // xbts.io (Germany)
"seed4.xbts.io:1776", // xbts.io (Germany)
"seed1.bitshares.im:1776", // clone (USA)
"seed2.bitshares.im:1776", // clone (Japan)
"seed.bitshares.org:666", // bitshares.org (France)
"seed.bitshares.rocks:1776", // bitshares.rocks (USA)
"seeds.btsnodes.com:1776", // Community
20 changes: 13 additions & 7 deletions libraries/net/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1600,17 +1600,19 @@ namespace graphene { namespace net { namespace detail {
}
}

void node_impl::on_connection_accepted_message(peer_connection* originating_peer, const connection_accepted_message& connection_accepted_message_received)
void node_impl::on_connection_accepted_message( peer_connection* originating_peer,
const connection_accepted_message& )
{
VERIFY_CORRECT_THREAD();
dlog("Received a connection_accepted in response to my \"hello\" from ${peer}",
("peer", originating_peer->get_remote_endpoint()));
originating_peer->negotiation_status = peer_connection::connection_negotiation_status::peer_connection_accepted;
originating_peer->our_state = peer_connection::our_connection_state::connection_accepted;
originating_peer->send_message(address_request_message());
fc::time_point now = fc::time_point::now();
auto now = fc::time_point::now();
constexpr int64_t five = 5;
if (_is_firewalled == firewalled_state::unknown &&
_last_firewall_check_message_sent < now - fc::minutes(5) &&
_last_firewall_check_message_sent < ( now - fc::minutes(five) ) &&
originating_peer->core_protocol_version >= 106)
{
wlog("I don't know if I'm firewalled. Sending a firewall check message to peer ${peer}",
Expand Down Expand Up @@ -1939,7 +1941,8 @@ namespace graphene { namespace net { namespace detail {
std::vector<item_hash_t> blockchain_synopsis = create_blockchain_synopsis_for_peer( peer );

item_hash_t last_item_seen = blockchain_synopsis.empty() ? item_hash_t() : blockchain_synopsis.back();
dlog( "sync: sending a request for the next items after ${last_item_seen} to peer ${peer}, (full request is ${blockchain_synopsis})",
dlog( "sync: sending a request for the next items after ${last_item_seen} to peer ${peer}, "
"(full request is ${blockchain_synopsis})",
( "last_item_seen", last_item_seen )
( "peer", peer->get_remote_endpoint() )
( "blockchain_synopsis", blockchain_synopsis ) );
Expand Down Expand Up @@ -2169,7 +2172,7 @@ namespace graphene { namespace net { namespace detail {
originating_peer->last_block_time_delegate_has_seen + // timestamp of the block immediately before the first unfetched block
originating_peer->number_of_unfetched_item_ids * GRAPHENE_MIN_BLOCK_INTERVAL;
fc::time_point_sec now = fc::time_point::now();
if (minimum_time_of_last_offered_block > now + GRAPHENE_NET_FUTURE_SYNC_BLOCKS_GRACE_PERIOD_SEC)
if (minimum_time_of_last_offered_block > (now + GRAPHENE_NET_FUTURE_SYNC_BLOCKS_GRACE_PERIOD_SEC))
{
wlog("Disconnecting from peer ${peer} who offered us an implausible number of blocks, their last block would be in the future (${timestamp})",
("peer", originating_peer->get_remote_endpoint())
Expand Down Expand Up @@ -2359,6 +2362,7 @@ namespace graphene { namespace net { namespace detail {
auto sync_item_iter = originating_peer->sync_items_requested_from_peer.find(requested_item.item_hash);
if (sync_item_iter != originating_peer->sync_items_requested_from_peer.end())
{
_active_sync_requests.erase(*sync_item_iter);
originating_peer->sync_items_requested_from_peer.erase(sync_item_iter);

if (originating_peer->peer_needs_sync_items_from_us)
Expand All @@ -2379,11 +2383,13 @@ namespace graphene { namespace net { namespace detail {
{
VERIFY_CORRECT_THREAD();

// expire old inventory so we'll be making decisions our about whether to fetch blocks below based only on recent inventory
// expire old inventory
// so we'll be making our decisions about whether to fetch blocks below based only on recent inventory
originating_peer->clear_old_inventory();

dlog( "received inventory of ${count} items from peer ${endpoint}",
( "count", item_ids_inventory_message_received.item_hashes_available.size() )("endpoint", originating_peer->get_remote_endpoint() ) );
("count", item_ids_inventory_message_received.item_hashes_available.size())
("endpoint", originating_peer->get_remote_endpoint() ) );
for( const item_hash_t& item_hash : item_ids_inventory_message_received.item_hashes_available )
{
item_id advertised_item_id(item_ids_inventory_message_received.item_type, item_hash);
Expand Down
32 changes: 16 additions & 16 deletions libraries/net/node_impl.hxx
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#pragma once
#include <memory>
#include <mutex>
#include <fc/thread/thread.hpp>
#include <fc/log/logger.hpp>
#include <fc/network/tcp_socket.hpp>
#include <graphene/chain/config.hpp>
#include <graphene/protocol/types.hpp>
#include <graphene/net/node.hpp>
#include <graphene/net/core_messages.hpp>
#include <graphene/net/peer_connection.hpp>

namespace graphene { namespace net { namespace detail {

namespace bmi = boost::multi_index;

#define P2P_IN_DEDICATED_THREAD

Expand All @@ -30,6 +16,21 @@ namespace bmi = boost::multi_index;
#define testnetlog(...) do {} while (0)
#endif

#include <memory>
#include <mutex>
#include <fc/thread/thread.hpp>
#include <fc/log/logger.hpp>
#include <fc/network/tcp_socket.hpp>
#include <graphene/chain/config.hpp>
#include <graphene/protocol/types.hpp>
#include <graphene/net/node.hpp>
#include <graphene/net/core_messages.hpp>
#include <graphene/net/peer_connection.hpp>

namespace graphene { namespace net { namespace detail {

namespace bmi = boost::multi_index;

/*******
* A class to wrap std::unordered_set for multithreading
*/
Expand Down Expand Up @@ -646,8 +647,7 @@ class node_impl : public peer_connection_delegate, public std::enable_shared_fro
void on_hello_message( peer_connection* originating_peer,
const hello_message& hello_message_received );

void on_connection_accepted_message( peer_connection* originating_peer,
const connection_accepted_message& connection_accepted_message_received );
void on_connection_accepted_message( peer_connection* originating_peer, const connection_accepted_message& );

void on_connection_rejected_message( peer_connection* originating_peer,
const connection_rejected_message& connection_rejected_message_received );
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sonar.organization=bitshares-on-github
sonar.projectKey=bitshares_bitshares-core
sonar.projectName=BitShares-Core
sonar.projectDescription=BitShares Blockchain implementation and command-line interface
sonar.projectVersion=5.2.0
sonar.projectVersion=5.2.x

sonar.host.url=https://sonarcloud.io

Expand Down

0 comments on commit c06d09c

Please sign in to comment.