Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
KEP-774 Remove raft and json wrapper
Browse files Browse the repository at this point in the history
* http server & raft from protobuf messages removed
  • Loading branch information
ebruck committed Feb 1, 2019
1 parent 268f618 commit 774712d
Show file tree
Hide file tree
Showing 26 changed files with 9 additions and 1,002 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ script:
after_success:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
coveralls -r ${TRAVIS_BUILD_DIR} -e 'build/boost' -e 'build/openssl' -e 'build/rocksdb' -e 'build/jsoncpp' -e 'build/googletest' -e 'build/proto' -e 'build/CMakeFiles' -e 'build/swarm_version.hpp' -e 'audit/test' -e 'bootstrap/test' -e 'chaos/test' -e 'crud/test' -e 'crypto/test' -e 'ethereum/test' -e 'http/test' -e 'mocks' -e 'node/test' -e 'options/test' -e 'pbft/test' -e 'raft/test' -e 'status/test' -e 'storage/test' -e 'swarm' -e 'include' -e 'utils/test' --gcov-options '\-lp'
coveralls -r ${TRAVIS_BUILD_DIR} -e 'build/boost' -e 'build/openssl' -e 'build/rocksdb' -e 'build/jsoncpp' -e 'build/googletest' -e 'build/proto' -e 'build/CMakeFiles' -e 'build/swarm_version.hpp' -e 'audit/test' -e 'bootstrap/test' -e 'chaos/test' -e 'crud/test' -e 'crypto/test' -e 'ethereum/test' -e 'http/test' -e 'mocks' -e 'node/test' -e 'options/test' -e 'pbft/test' -e 'status/test' -e 'storage/test' -e 'swarm' -e 'include' -e 'utils/test' --gcov-options '\-lp'
fi
- echo ${TRAVIS_BRANCH}
- if [ "$TRAVIS_BRANCH" = "master" ] ; then PACKAGE_COMPONENT="stable" ; else PACKAGE_COMPONENT="unstable" ; fi
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ endif()
add_subdirectory(bootstrap)
add_subdirectory(crud)
add_subdirectory(ethereum)
add_subdirectory(http)
add_subdirectory(node)
add_subdirectory(options)
add_subdirectory(pkg)
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ The complete documentation of the options available for this file is given by

but the properties likely useful for a minimal swarm are summarized here:

- "use_pbft" - use pbft consensus (instead of legacy raft code)
- "bootstrap_file" - path to peers file (see below)
- "debug_logging" - show more log info
- "ethereum" - is your Ethereum block chain address, used to pay for transactions. For now, you will not be charged, and you do not actually need to own this address.
Expand Down Expand Up @@ -149,22 +148,19 @@ nodes as seen in the following example:
[
{
"host": "127.0.0.1",
"http_port": 9082,
"name": "peer0",
"port": 49152,
"uuid": "d6707510-8ac6-43c1-b9a5-160cf54c99f5"
},
{
"host": "127.0.0.1",
"http_port": 9083,
"name": "peer1",
"port": 49153,
"uuid": "5c63dfdc-e251-4b9c-8c36-404972c9b4ec"
},
...
{
"host": "127.0.0.1",
"http_port": 9083,
"name": "peer1",
"port": 49153,
"uuid": "ce4bfdc-63c7-5b9d-1c37-567978e9b893a"
Expand All @@ -173,7 +169,6 @@ nodes as seen in the following example:

where the Peer object parameters are (ALL PARAMETERS MUST MATCH THE PEER CONFIGURATION):
- "host" - the IP address associated with the external node
- "http_port" - the HTTP port on which the external node listens for HTTP client requests.
- "name" - the human readable name that the external node uses
- "port" - the socket address that the external node will listen for protobuf and web socket requests. (listen_port in the config file)
- "uuid" - the universally unique identifier that the external node uses to uniquely identify itself. This is required to be unique per node and consistent between the peerlist and the config.
Expand Down Expand Up @@ -513,7 +508,6 @@ positional arguments:
optional arguments:
-h, --help show this help message and exit
-p, --use_pbft Direct message to pbft instead of raft
-i ID, --id ID Crud script sender id (default 0)
required arguments:
Expand Down
2 changes: 1 addition & 1 deletion audit/audit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ audit::start()
{
std::call_once(this->start_once, [this]()
{
this->node->register_for_message(bzn_envelope::PayloadCase::kAudit,
this->node->register_for_message(bzn_envelope::kAudit,
std::bind(&audit::handle, shared_from_this(), std::placeholders::_1, std::placeholders::_2));

if (this->monitor_endpoint)
Expand Down
31 changes: 0 additions & 31 deletions crud/crud_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,6 @@

namespace bzn
{
// this interface is tied too closely with raft usage and will eventually be removed...
namespace deprecated
{
const std::string MSG_INVALID_RAFT_STATE = "INVALID_RAFT_STATE";
const std::string MSG_INVALID_CRUD_COMMAND = "INVALID_CRUD";
const std::string MSG_ELECTION_IN_PROGRESS = "ELECTION_IN_PROGRESS";
const std::string MSG_RECORD_EXISTS = "RECORD_EXISTS";
const std::string MSG_RECORD_NOT_FOUND = "RECORD_NOT_FOUND";
const std::string MSG_INVALID_ARGUMENTS = "INVALID_ARGUMENTS";
const std::string MSG_VALUE_SIZE_TOO_LARGE = "VALUE_SIZE_TOO_LARGE";
const std::string MSG_KEY_SIZE_TOO_LARGE = "KEY_SIZE_TOO_LARGE";

class crud_base
{
public:
virtual ~crud_base() = default;

virtual void handle_create(const bzn::json_message& msg, const database_msg& request, database_response& response) = 0;

virtual void handle_read(const bzn::json_message& msg, const database_msg& request, database_response& response) = 0;

virtual void handle_update(const bzn::json_message& msg, const database_msg& request, database_response& response) = 0;

virtual void handle_delete(const bzn::json_message& msg, const database_msg& request, database_response& response) = 0;

virtual void start() = 0;
};


} // namespace deprecated

class crud_base
{
public:
Expand Down
14 changes: 0 additions & 14 deletions http/CMakeLists.txt

This file was deleted.

272 changes: 0 additions & 272 deletions http/connection.cpp

This file was deleted.

0 comments on commit 774712d

Please sign in to comment.