Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/3.0.x #174

Merged
merged 40 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f4bec14
Merge pull request #143 from boscore/release/3.0.x
Thaipanda Feb 14, 2020
3c0567c
Merge pull request #151 from boscore/release/3.0.x
Thaipanda Mar 18, 2020
c09d025
Merge pull request #156 from boscore/master
Thaipanda Apr 27, 2020
9509dd7
check llvm version >= 7 and install automatically
Thaipanda May 1, 2020
748c377
Merge pull request #21 from boscore/release/3.0.x
Frank-AFN May 2, 2020
c9e6641
Remove bytes in flight
Frank-AFN May 5, 2020
7af85d4
Merge pull request #161 from eosiosg/getinfobusyfix
Thaipanda May 6, 2020
a7e2158
Upgrade: name apply context transaction context and plugins
Frank-AFN May 11, 2020
c8c27f4
FIX: unittests
Frank-AFN May 11, 2020
07e60de
fix a potential crash in fetching lib.
May 13, 2020
e7056d2
emit lib in ascending order.
May 13, 2020
e1cf1f3
Merge pull request #162 from boscore/fix-emit-lib
Frank-AFN May 19, 2020
9e01179
fix a potential crash in fetching lib.
May 13, 2020
483b9ea
emit lib in ascending order.
May 13, 2020
6f51cc1
Change abi-serializer-max-time-us to abi-serializer-max-time-ms
Frank-AFN May 19, 2020
931235f
Fix: TODO
Frank-AFN May 20, 2020
e757b8a
Fix: mongodb plugin
Frank-AFN May 20, 2020
5366d8a
Fix: cleos name issue
Frank-AFN May 20, 2020
982cf82
Fix: tests
Frank-AFN May 20, 2020
20c3c17
Add back get block detail in history plugin
Frank-AFN May 20, 2020
03e03c5
Merge pull request #163 from eosiosg/statehistoryplugin
Thaipanda May 27, 2020
d33bb6c
update connected lib channels of plugins
May 27, 2020
1e7fb89
Fix: state history plugin issues
Frank-AFN Jun 3, 2020
7d432d0
Merge pull request #164 from eosiosg/statehistoryplugin
Thaipanda Jun 3, 2020
58ff806
Change: applied transaction channel for statehistory plugin
Frank-AFN Jun 5, 2020
6f91e2c
fix: exclude invalid cert; shuffle view changes before generation; ad…
Jun 5, 2020
ecc2fb6
Merge pull request #166 from boscore/fix-cert-generation
Thaipanda Jun 6, 2020
68ca592
Merge pull request #165 from boscore/plugins-update-lib-channel
Thaipanda Jun 6, 2020
7d5a128
Fix: state history get block from forkdb null
Frank-AFN Jun 6, 2020
064a989
reset docker file
Frank-AFN Jun 6, 2020
dc3b8e4
Merge pull request #167 from eosiosg/statehistoryplugin
Thaipanda Jun 6, 2020
353d311
prepare v3.0.8
Thaipanda Jun 6, 2020
fba8580
merge v3.0.8 into develop branch (#169)
Thaipanda Jun 6, 2020
c242cbc
Add: account query database
Frank-AFN Jun 10, 2020
87d1c1f
Merge pull request #171 from eosiosg/accountquerydb
Thaipanda Jun 12, 2020
9397c0c
update the version
Thaipanda Jun 12, 2020
57aa42a
Fix: test build bug
Frank-AFN Jun 12, 2020
a78aa0f
Merge pull request #173 from eosiosg/accountquerydb
Thaipanda Jun 12, 2020
39c7e82
Merge branch 'master' into release/3.0.x
Frank-AFN Jun 15, 2020
b3e2280
Merge branch 'develop' into release/3.0.x
Frank-AFN Jun 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ set( CXX_STANDARD_REQUIRED ON)

set(VERSION_MAJOR 3)
set(VERSION_MINOR 0)
set(VERSION_PATCH 8)
set(VERSION_PATCH 9)

if(VERSION_SUFFIX)
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}")
Expand Down
5 changes: 2 additions & 3 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ cd bos/Docker
docker build . -t boscore/bos -s BOS
```

The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v3.0.8 tag, you could do the following:
The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v3.0.9 tag, you could do the following:

```bash
docker build -t boscore/bos:v3.0.8 --build-arg branch=v3.0.8 .

docker build -t boscore/bos:v3.0.9 --build-arg branch=v3.0.9 .
```

By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BOSCore - Blockchain financial center building a trusted business ecosystem.

## BOSCore Version: v3.0.8
## BOSCore Version: v3.0.9
### Basic EOSIO Version: v2.0 (support REX & EOSVM, llvm v90)

# Background
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BOSCore - 区块链自由港,构建可信商业生态。

## BOSCore Version: v3.0.8
## BOSCore Version: v3.0.9
### Basic EOSIO Version: v2.0 (support REX & EOSVM, llvm v90)

# 背景
Expand Down
43 changes: 41 additions & 2 deletions plugins/chain_api_plugin/chain_api_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ struct async_result_visitor : public fc::visitor<fc::variant> {
}
};

namespace {
template<typename T>
T parse_params(const std::string& body) {
if (body.empty()) {
EOS_THROW(chain::invalid_http_request, "A Request body is required");
}

try {
try {
return fc::json::from_string(body).as<T>();
} catch (const chain::chain_exception& e) { // EOS_RETHROW_EXCEPTIONS does not re-type these so, re-code it
throw fc::exception(e);
}
} EOS_RETHROW_EXCEPTIONS(chain::invalid_http_request, "Unable to parse valid input from POST body");
}
}

#define CALL(api_name, api_handle, api_namespace, call_name, http_response_code) \
{std::string("/v1/" #api_name "/" #call_name), \
[api_handle](string, string body, url_response_callback cb) mutable { \
Expand All @@ -48,6 +65,19 @@ struct async_result_visitor : public fc::visitor<fc::variant> {
} \
}}

#define CALL_WITH_400(api_name, api_handle, api_namespace, call_name, http_response_code) \
{std::string("/v1/" #api_name "/" #call_name), \
[api_handle](string, string body, url_response_callback cb) mutable { \
api_handle.validate(); \
try { \
auto params = parse_params<api_namespace::call_name ## _params>(body);\
fc::variant result( api_handle.call_name( std::move(params) ) ); \
cb(http_response_code, std::move(result)); \
} catch (...) { \
http_plugin::handle_exception(#api_name, #call_name, body, cb); \
} \
}}

#define CALL_ASYNC(api_name, api_handle, api_namespace, call_name, call_result, http_response_code) \
{std::string("/v1/" #api_name "/" #call_name), \
[api_handle](string, string body, url_response_callback cb) mutable { \
Expand All @@ -73,11 +103,14 @@ struct async_result_visitor : public fc::visitor<fc::variant> {
#define CHAIN_RO_CALL_ASYNC(call_name, call_result, http_response_code) CALL_ASYNC(chain, ro_api, chain_apis::read_only, call_name, call_result, http_response_code)
#define CHAIN_RW_CALL_ASYNC(call_name, call_result, http_response_code) CALL_ASYNC(chain, rw_api, chain_apis::read_write, call_name, call_result, http_response_code)

#define CHAIN_RO_CALL_WITH_400(call_name, http_response_code) CALL_WITH_400(chain, ro_api, chain_apis::read_only, call_name, http_response_code)

void chain_api_plugin::plugin_startup() {
ilog( "starting chain_api_plugin" );
my.reset(new chain_api_plugin_impl(app().get_plugin<chain_plugin>().chain()));
auto ro_api = app().get_plugin<chain_plugin>().get_read_only_api();
auto rw_api = app().get_plugin<chain_plugin>().get_read_write_api();
auto& chain = app().get_plugin<chain_plugin>();
auto ro_api = chain.get_read_only_api();
auto rw_api = chain.get_read_write_api();

auto& _http_plugin = app().get_plugin<http_plugin>();
ro_api.set_shorten_abi_errors( !_http_plugin.verbose_errors() );
Expand Down Expand Up @@ -107,6 +140,12 @@ void chain_api_plugin::plugin_startup() {
CHAIN_RW_CALL_ASYNC(push_transaction, chain_apis::read_write::push_transaction_results, 202),
CHAIN_RW_CALL_ASYNC(push_transactions, chain_apis::read_write::push_transactions_results, 202)
});

if (chain.account_queries_enabled()) {
_http_plugin.add_async_api({
CHAIN_RO_CALL_WITH_400(get_accounts_by_authorizers, 200),
});
}
}

void chain_api_plugin::plugin_shutdown() {}
Expand Down
1 change: 1 addition & 0 deletions plugins/chain_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
file(GLOB HEADERS "include/eosio/chain_plugin/*.hpp")
add_library( chain_plugin
account_query_db.cpp
chain_plugin.cpp
${HEADERS} )

Expand Down
Loading