Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Dawn 4.0 mongo_db_plugin does't work #3030

Closed
red-butterfly opened this issue May 14, 2018 · 18 comments
Closed

Dawn 4.0 mongo_db_plugin does't work #3030

red-butterfly opened this issue May 14, 2018 · 18 comments
Assignees
Milestone

Comments

@red-butterfly
Copy link

red-butterfly commented May 14, 2018

The mongo_db_plugin does't work in EOS Dawn 4.0:

2629991ms thread-0 main.cpp:101 main ] /mnt/500G/project/blockchain/EOS/eos-4.0/libraries/appbase/application.cpp(290): Throw in function appbase::abstract_plugin &appbase::application::get_plugin(const string &) const
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error >
std::exception::what: unable to find plugin: eosio::mongo_db_plugin

@red-butterfly red-butterfly changed the title Draw 4.0 mongo_db_plugin does't work Dawn 4.0 mongo_db_plugin does't work May 14, 2018
@BH4EHN
Copy link

BH4EHN commented May 14, 2018

I've got exactly same issue here (issue#3018)

@rise-worlds
Copy link

rise-worlds commented May 14, 2018

change CMakeLists.txt mongo_db_plugin compile error #

`[100%] Building CXX object plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/mongo_db_plugin.cpp.o
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:134:31: error: no member named 'block' in 'eosio::chain::block_trace'
process_block(bt, bt.block);
~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:137:63: error: no member named 'block' in 'eosio::chain::block_trace'
block_trace_queue.emplace_back(std::make_pair(bt, bt.block));
~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:406:42: error: no member named 'receiver' in 'eosio::chain::action_trace'
kvp("receiver", act.receiver.to_string()),
~~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:410:38: error: no member named 'data_access' in 'eosio::chain::action_trace'
for (const auto& data : act.data_access) {
~~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:412:62: error: no member named 'data_access_info' in namespace 'eosio::chain'
subdoc.append(kvp("type", data.type == chain::data_access_info::read ? "read" : "write"),
~~~~~~~^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:466:28: error: no member named 'region_traces' in 'eosio::chain::block_trace'
for (const auto& rt: bt.region_traces) {
~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:477:28: error: no template named 'contains'; did you mean 'boost::contains'?
if ( req.containschain::deferred_transaction() ) {
^~~~~~~~
boost::contains
/home/server123/opt/boost_1_66_0/include/boost/algorithm/string/predicate.hpp:464:22: note: 'boost::contains' declared here
using algorithm::contains;
^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:478:68: error: expected '(' for function-style cast or type construction
auto trx = req.getchain::deferred_transaction();
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:478:70: error: expected expression
auto trx = req.getchain::deferred_transaction();
^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:489:69: error: expected '(' for function-style cast or type construction
auto cancel = req.getchain::deferred_reference();
~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:489:71: error: expected expression
auto cancel = req.getchain::deferred_reference();
^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:519:40: error: no member named 'input_transactions' in 'eosio::chain::signed_block'; did you mean 'transactions'?
for (const auto& packed_trx : block.input_transactions) {
^~~~~~~~~~~~~~~~~~
transactions
/home/server123/eos/libraries/chain/include/eosio/chain/block.hpp:58:37: note: 'transactions' declared here
vector<transaction_receipt> transactions; /// new or generated transactions
^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:520:50: error: no member named 'get_signed_transaction' in 'eosio::chain::transaction_receipt'
const signed_transaction& trx = packed_trx.get_signed_transaction();
~~~~~~~~~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:533:39: error: no member named 'implicit_transactions' in 'eosio::chain::block_trace'
for (const auto& implicit_trx : bt.implicit_transactions ){
~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:592:30: error: no member named 'regions' in 'eosio::chain::signed_block'
for (const auto& r: block.regions) {
~~~~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:831:34: error: no member named 'applied_block_callbacks' in 'eosio::chain::controller::config'
chain_plug->chain_config().applied_block_callbacks.emplace_back(
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/home/server123/eos/plugins/mongo_db_plugin/mongo_db_plugin.cpp:833:34: error: no member named 'applied_irreversible_block_callbacks' in 'eosio::chain::controller::config'
chain_plug->chain_config().applied_irreversible_block_callbacks.emplace_back(
~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
17 errors generated.
plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/build.make:62: recipe for target 'plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/mongo_db_plugin.cpp.o' failed
make[2]: *** [plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/mongo_db_plugin.cpp.o] Error 1
CMakeFiles/Makefile2:5547: recipe for target 'plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/all' failed
make[1]: *** [plugins/mongo_db_plugin/CMakeFiles/mongo_db_plugin.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.

`

@paritygeeker
Copy link

programs/nodeos/CMakeLists.txt:60
the code have been commented。
so will not make the target object.
And added db_size_api_plugin, so there will be something change on database.

@ripley
Copy link

ripley commented May 24, 2018

I've got identical issue as @rise-worlds trying to build mongodb plugin in docker, after modifying some makefiles to have it compiled / linked.

Will the plugin be phased out ? Is there any alternative to query historical block / transaction ?

@rise-worlds
Copy link

@ripley use the new sql_db_plugin

@ripley
Copy link

ripley commented May 25, 2018

@rise-worlds
Thank you for the info, I just took a quick look at the files under directory plugins/sql_db_plugin, seems most of the them are skeletons for now. Did you successfully poll data and save to db via the plugin?

@trungtt198x
Copy link

I've got the same error although in Ubuntu the MongoDB plugin is compiled and built by default.
I'm at this commit ID on master branch cd21f12e539452ff405729a4bf8bde0391172264
My nodeos version:

nodeos -v
3441553710

@andr11111
Copy link

Do you plan to enable the mongo_db_plugin? If I understand it correctly, without it there is no way to explore transactions (other than through the limited history API).

@noprom
Copy link
Contributor

noprom commented Jun 24, 2018

Maybe this PR will solve this: #4304

@heifner
Copy link
Contributor

heifner commented Jun 24, 2018

@noprom that is the idea. Try it out and let us know.

@noprom
Copy link
Contributor

noprom commented Jun 24, 2018

@heifner , will try that out immediately.

@gustavomick
Copy link

@heifner hi, wondering if there is a way to rebase this branch to have the mongo plugin isolated from other changes, or if you can suggest a way to merge this with 1.0.8 version. thanks!

@noprom
Copy link
Contributor

noprom commented Jul 4, 2018

HI @gustavomick, you can try our docker image to setup the mongo in 5 seconds:
https://github.com/EOSpace/eos-sync

@gustavomick
Copy link

@heifner is mongo plugin filtering using filter-on config.ini setting? is there a way to filter? thanks

@heifner
Copy link
Contributor

heifner commented Jul 5, 2018

  • I just rebased with release/1.1.
  • There is currently no filter capability. What kind of filter capability are you interested in? A filter of which collections get populated?

@gustavomick
Copy link

@heifner thanks , yeah i would like to know if is possible to filter using the config.ini filter-on parameter, i think is really handy for dapp that has a full node and only whant specific transactions on their history (like only those related to the dapps contract) so together with that history filtering should be very useful that mongoplugin would be replicating only those in the same fashion. or is other way to do that? thanks!

@blocksbarcelona
Copy link

agreed with @gustavomick

@wanderingbort
Copy link
Contributor

see #4304

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests