Skip to content

Commit

Permalink
Merge branch '0.8.8update'
Browse files Browse the repository at this point in the history
Update to newest version 0.8.8. See change log for details.
  • Loading branch information
mydesktop committed May 29, 2014
2 parents 26292c5 + 2475ec8 commit 5c1b7c7
Show file tree
Hide file tree
Showing 50 changed files with 1,177 additions and 415 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.DS_Store
/build
/tags
/tags
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ else()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DEBUG_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${RELEASE_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${RELEASE_FLAGS}")
if(STATIC)
set_static_flags()
if(STATIC AND NOT APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif()
endif()

if(STATIC)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
find_package(Boost 1.53 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization atomic program_options)
find_package(Boost 1.53 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options)
if((${Boost_MAJOR_VERSION} EQUAL 1) AND (${Boost_MINOR_VERSION} EQUAL 54))
message(SEND_ERROR "Boost version 1.54 is unsupported, more details are available here http://goo.gl/RrCFmA")
endif()
Expand Down
32 changes: 21 additions & 11 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
Bitmonero

Release notes 0.8.8

- JSON RPC v2.0 compatibility
- JSON RPC over TCP added- Further optimizations
- Fixed a bug with checkpoints behavior
- UI improvements for daemon
- Fixed COIN value (10^12)
- Raised minimum fee to 5 * (10^9)
- Temporary fix for block reward DoS attack

Release notes 0.8.7

- Slow hash optimizations

Release notes 0.8.6

- Simplwallet can set extra for transfers
Expand All @@ -21,17 +35,13 @@ Release notes 0.8.4
Release notes 0.8.3

- JSON RPC for wallet
- fixed bug with blockchain storing
- fixed bug with correct display of transfer's change
- bug fix in simple wallet
- Fixed bug with blockchain storing
- Fixed bug with correct display of transfer's change
- Bug fix in simple wallet

Release notes 0.8.2

- now wallet is still working when daemon stores blockchain and can't serve clients;
- no-console option for a daemon;
- fixed problem with network synchronization;
- major bug fix in simple wallet.

Release notes 0.8.1

Bytecoin project is moved to GitHub
- Now wallet is still working when daemon stores blockchain and can't serve clients
- No-console option for a daemon
- Fixed problem with network synchronization
- Major bug fix in simple wallet
17 changes: 0 additions & 17 deletions contrib/epee/include/console_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,23 +267,6 @@ namespace epee
if(0 == command.compare("exit") || 0 == command.compare("q"))
{
continue_handle = false;
}else if (!command.compare(0, 7, "set_log"))
{
//parse set_log command
if(command.size() != 9)
{
std::cout << "wrong syntax: " << command << std::endl << "use set_log n" << std::endl;
continue;
}
uint16_t n = 0;
if(!string_tools::get_xtype_from_string(n, command.substr(8, 1)))
{
std::cout << "wrong syntax: " << command << std::endl << "use set_log n" << std::endl;
continue;
}
log_space::get_set_log_detalisation_level(true, n);
std::cout << "New log level set " << n;
LOG_PRINT_L2("New log level set " << n);
}else if (command.empty())
{
continue;
Expand Down
4 changes: 2 additions & 2 deletions contrib/epee/include/net/abstract_tcp_server2.inl
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ PRAGMA_WARNING_DISABLE_VS(4355)
typename t_protocol_handler::config_type& config, volatile uint32_t& sock_count, i_connection_filter* &pfilter)
: strand_(io_service),
socket_(io_service),
m_protocol_handler(this, config, context),
m_want_close_connection(0),
m_was_shutdown(0),
m_ref_sockets_count(sock_count),
m_pfilter(pfilter)
m_pfilter(pfilter),
m_protocol_handler(this, config, context)
{
boost::interprocess::ipcdetail::atomic_inc32(&m_ref_sockets_count);
}
Expand Down
45 changes: 22 additions & 23 deletions contrib/epee/include/net/http_protocol_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@ namespace net_utils
/************************************************************************/
/* */
/************************************************************************/
template<class t_connection_context = net_utils::connection_context_base>
template<class t_connection_context = net_utils::connection_context_base>
class simple_http_connection_handler
{
public:
typedef t_connection_context connection_context;//t_connection_context net_utils::connection_context_base connection_context;
typedef t_connection_context connection_context;//t_connection_context net_utils::connection_context_base connection_context;
typedef http_server_config config_type;

simple_http_connection_handler(i_service_endpoint* psnd_hndlr, config_type& config);
virtual ~simple_http_connection_handler(){}

bool release_protocol()
{
return true;
}
bool release_protocol()
{
return true;
}

virtual bool thread_init()
{
Expand All @@ -85,10 +85,6 @@ namespace net_utils
}
virtual bool handle_recv(const void* ptr, size_t cb);
virtual bool handle_request(const http::http_request_info& query_info, http_response_info& response);


//temporary here
//bool parse_uri(const std::string uri, uri_content& content);

private:
enum machine_state{
Expand Down Expand Up @@ -142,34 +138,37 @@ namespace net_utils
i_service_endpoint* m_psnd_hndlr;
};

template<class t_connection_context>
template<class t_connection_context>
struct i_http_server_handler
{
virtual ~i_http_server_handler(){}
virtual bool handle_http_request(const http_request_info& query_info, http_response_info& response, t_connection_context& m_conn_context)=0;
virtual bool init_server_thread(){return true;}
virtual bool handle_http_request(const http_request_info& query_info,
http_response_info& response,
t_connection_context& m_conn_context) = 0;
virtual bool init_server_thread(){return true;}
virtual bool deinit_server_thread(){return true;}
};

template<class t_connection_context>
template<class t_connection_context>
struct custum_handler_config: public http_server_config
{
i_http_server_handler<t_connection_context>* m_phandler;
};

/************************************************************************/
/* */
/************************************************************************/
/************************************************************************/
/* */
/************************************************************************/

template<class t_connection_context = net_utils::connection_context_base>
template<class t_connection_context = net_utils::connection_context_base>
class http_custom_handler: public simple_http_connection_handler<t_connection_context>
{
public:
typedef custum_handler_config<t_connection_context> config_type;

http_custom_handler(i_service_endpoint* psnd_hndlr, config_type& config, t_connection_context& conn_context):simple_http_connection_handler<t_connection_context>(psnd_hndlr, config),
m_config(config),
m_conn_context(conn_context)
http_custom_handler(i_service_endpoint* psnd_hndlr, config_type& config, t_connection_context& conn_context)
: simple_http_connection_handler<t_connection_context>(psnd_hndlr, config),
m_config(config),
m_conn_context(conn_context)
{}
inline bool handle_request(const http_request_info& query_info, http_response_info& response)
{
Expand All @@ -191,8 +190,8 @@ namespace net_utils
{
return m_config.m_phandler->deinit_server_thread();
}
void handle_qued_callback()
{}
void handle_qued_callback()
{}
bool after_init_connection()
{
return true;
Expand Down
99 changes: 4 additions & 95 deletions contrib/epee/include/net/http_server_handlers_map2.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@


#pragma once
#include "serialization/keyvalue_serialization.h"
#include "storages/portable_storage_template_helper.h"
#include "http_base.h"
#include "jsonrpc_structs.h"
#include "storages/portable_storage.h"
#include "storages/portable_storage_template_helper.h"


#define CHAIN_HTTP_TO_MAP2(context_type) bool handle_http_request(const epee::net_utils::http::http_request_info& query_info, \
Expand Down Expand Up @@ -109,98 +110,6 @@
#define END_URI_MAP2() return handled;}




namespace epee
{
namespace json_rpc
{
template<typename t_param>
struct request
{
std::string jsonrpc;
std::string method;
epee::serialization::storage_entry id;
t_param params;

BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(jsonrpc)
KV_SERIALIZE(id)
KV_SERIALIZE(method)
KV_SERIALIZE(params)
END_KV_SERIALIZE_MAP()
};

struct error
{
int64_t code;
std::string message;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(code)
KV_SERIALIZE(message)
END_KV_SERIALIZE_MAP()
};

struct dummy_error
{
BEGIN_KV_SERIALIZE_MAP()
END_KV_SERIALIZE_MAP()
};

struct dummy_result
{
BEGIN_KV_SERIALIZE_MAP()
END_KV_SERIALIZE_MAP()
};

template<typename t_param, typename t_error>
struct response
{
std::string jsonrpc;
t_param result;
epee::serialization::storage_entry id;
t_error error;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(jsonrpc)
KV_SERIALIZE(id)
KV_SERIALIZE(result)
KV_SERIALIZE(error)
END_KV_SERIALIZE_MAP()
};

template<typename t_param>
struct response<t_param, dummy_error>
{
std::string jsonrpc;
t_param result;
epee::serialization::storage_entry id;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(jsonrpc)
KV_SERIALIZE(id)
KV_SERIALIZE(result)
END_KV_SERIALIZE_MAP()
};

template<typename t_error>
struct response<dummy_result, t_error>
{
std::string jsonrpc;
t_error error;
epee::serialization::storage_entry id;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(jsonrpc)
KV_SERIALIZE(id)
KV_SERIALIZE(error)
END_KV_SERIALIZE_MAP()
};

typedef response<dummy_result, error> error_response;
}
}




#define BEGIN_JSON_RPC_MAP(uri) else if(query_info.m_URI == uri) \
{ \
uint64_t ticks = epee::misc_utils::get_tick_count(); \
Expand Down Expand Up @@ -315,6 +224,6 @@ namespace epee
rsp.error.message = "Method not found"; \
epee::serialization::store_t_to_json(static_cast<epee::json_rpc::error_response&>(rsp), response_info.m_body); \
return true; \
}
}


Loading

0 comments on commit 5c1b7c7

Please sign in to comment.