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

SQL plugin #3882

Closed
wants to merge 69 commits into
base: master
from

Conversation

Projects
None yet
@kesar
Copy link
Contributor

kesar commented Jun 6, 2018

Dump blockchain into SQL database

Fixes #3450
Fixes #3030

@newbieh4cker

This comment has been minimized.

Copy link

newbieh4cker commented Jun 22, 2018

@kesar

When I run below command, "eosio" accounts spends '1.0 BOT token' for tester user, to give cpu,net,ram bandwidth.

After running command with 'cleos get account eosio', I can get precise balance. But When I query balance from mysql(using sql_db_plugin) balance is not correct.

it looks like your 'sql_db_plugin" plugin doesn't catch 'cleos system' command.

Do you have plan to fix this? Or am I doing something wrong?

cleos system newaccount eosio tester EOS5uVevzEMdDLEkyF26mFkxg5dfXnkiBVe7h8WSS9tJzaVjYsjgd EOS5uVevzEMdDLEkyF26mFkxg5dfXnkiBVe7h8WSS9tJzaVjYsjgd --stake-net "0.3 BOT" --stake-cpu "0.3 BOT" --buy-ram "0.4 BOT"

@kesar

This comment has been minimized.

Copy link
Contributor

kesar commented Jun 25, 2018

Do you have plan to fix this? Or am I doing something wrong?

Yes, that's because we are not tracking inline actions for now, but its top 1 priority right now :)

@rangershi rangershi referenced this pull request Jul 5, 2018

Closed

we need the sql_pugin #4501

@brianjohnson5972

This comment has been minimized.

Copy link
Contributor

brianjohnson5972 commented Jul 6, 2018

Please resubmit these changes off of the release/1.1 branch and select the base for the pull request to be release/1.1. Also, please fix the test failures

@dbarobin

This comment has been minimized.

Copy link
Contributor

dbarobin commented Jul 7, 2018

Some sql error exists in the nodeos log, and the nodeos force quit. Yet I have to delete blocks file of EOS blockchain and eos database in MySQL to force resync, how to avoid and solve this problem?

When sync to zhengjinhua1, and nodoes exit. The log as follows:

terminate called after throwing an instance of 'soci::mysql_soci_error'                                                                            
  what():  Out of range value for column 'amount' at row 1 while executing "INSERT INTO tokens(account, amount, symbol) VALUES (:ac, :am, :as) " with :ac="zhengjinhua1", :am=1e+10, :as="UXB".  

The amount filed of tokens table defines double(14,4), but 1e+10 means 10 billion, it exceed the maximum. It should change to double(64,4), the command as follows:

ALTER TABLE tokens CHANGE amount amount double(64,4) DEFAULT NULL;

In addition, I sync the data of maninnet using this sql_db_plugin.

Submit a pr, see at: NebulaProtocol#2

dbarobin and others added some commits Jul 7, 2018

Merge pull request #2 from vrwio/sql_plugin
[EOS] Fix token amount issue
@asiniscalchi

This comment has been minimized.

Copy link
Contributor

asiniscalchi commented Jul 17, 2018

@ericiles I hope the creation of the docket with libsoci-dev will be an easy one.
Thanks for your help.

@ericiles

This comment has been minimized.

Copy link
Member

ericiles commented Jul 17, 2018

@asiniscalchi the CICD docker images have been updated, and the failing tests have been re-ran. Looks like everything has passed.

@trungtt1981

This comment has been minimized.

Copy link

trungtt1981 commented on 35fbdb0 Jul 22, 2018

@asiniscalchi
@kesar
I've followed your instruction on this link: https://gist.github.com/kesar/35eb26f6863494e62200e943f6b184ff

Unfortunately, I've got exception when starting the nodeos instance as follows:

1240943ms thread-0   http_plugin.cpp:447           add_handler          ] add api url: /v1/history/get_actions
1240943ms thread-0   http_plugin.cpp:447           add_handler          ] add api url: /v1/history/get_controlled_accounts
1240943ms thread-0   http_plugin.cpp:447           add_handler          ] add api url: /v1/history/get_key_accounts
1240943ms thread-0   http_plugin.cpp:447           add_handler          ] add api url: /v1/history/get_transaction
1240944ms thread-0   net_plugin.cpp:3049           plugin_startup       ] starting listener, max clients is 25
1240944ms thread-0   net_plugin.cpp:749            connection           ] created connection to 138.197.194.220:9002
1240944ms thread-0   net_plugin.cpp:1962           connect              ] host: 138.197.194.220 port: 9002 
terminate called after throwing an instance of 'eosio::chain::abi_serialization_deadline_exception'
./script_client_nodeos.sh: line 7: 15709 Aborted                 (core dumped) $NODEOS --genesis-json genesis.json --config-dir . --data-dir . --plugin eosio::chain_api_plugin --plugin eosio::sql_db_plugin --sql_db-uri="mysql://db=eos user=root password=feesimple host=127.0.0.1"

I don't know if my currently-used config.ini is wrong or not.
If possible, please provide your config.ini file so that I can compare
Thanks

@newbieh4cker

This comment has been minimized.

Copy link

newbieh4cker commented Jul 23, 2018

@kesar
as @trungtt1981 mentioned.

'eosio::chain::abi_serialization_deadline_exception' error occurs

@trungtt1981

This comment has been minimized.

Copy link

trungtt1981 commented Jul 23, 2018

@newbieh4cker
@kesar
@asiniscalchi
If possible, please inform me the revision which I can run the nodeos client without this kind of exception.
I see that the https://eostracker.io/ is running well.
So, which revision is it using?

Thanks

@asiniscalchi
Copy link
Contributor

asiniscalchi left a comment

@newbieh4cker
@trungtt1981

should be fixed

@@ -88,9 +88,10 @@ void actions_table::add(chain::action action, chain::transaction_id_type transac
return; // no ABI no party. Should we still store it?
}

abis.set_abi(abi);
static const fc::microseconds abi_serializer_max_time;

This comment has been minimized.

@asiniscalchi

asiniscalchi Jul 23, 2018

Contributor

@kesar I think it is better you set a value... I have no clue of the magnitude of a reasonable value

@trungtt1981

This comment has been minimized.

Copy link

trungtt1981 commented Jul 23, 2018

@asiniscalchi
Thanks very much for your fix of this bug.
It works now fine!
Cheers

@asiniscalchi

This comment has been minimized.

Copy link
Contributor

asiniscalchi commented Jul 24, 2018

@ericiles is there any way to speed up the merging into master ?
This pull request makes me do nightmares.

@mirror222

This comment has been minimized.

Copy link

mirror222 commented Jul 24, 2018

@trungtt1981
could you please kindly tell me how to fix the "eosio::chain::abi_serialization_deadline_exception' bug?

@heifner

This comment has been minimized.

Copy link
Contributor

heifner commented Jul 27, 2018

@asiniscalchi @kesar We just discussed this PR. First, we would like to thank you for your support of EOSIO! It really is much appreciated. Our hope was (and still is) to provide easier plugin integration support.

You may have noticed that there is some github repro reorg in progress. As such we would like to remove this plugin from the EOSIO/eos repro and ask you to host it separately. Either by itself or in a fork of eos, whatever you like and is the easiest.

In the future we actually hope to provide similar seperation for the other plugins. During this process please help us with what is needed so external plugins like the sql_plugin can be integrated by users as easily as possible. We are hoping you will help us by being a "guinea pig" for this process.

@kesar

This comment has been minimized.

Copy link
Contributor

kesar commented Jul 27, 2018

sounds good 👍

@kesar kesar closed this Jul 27, 2018

@newbieh4cker

This comment has been minimized.

Copy link

newbieh4cker commented Aug 6, 2018

@kesar

what is isolated github address for sql_db_plugin??

@trungtt1981

This comment has been minimized.

@cppfuns

This comment has been minimized.

Copy link

cppfuns commented Aug 15, 2018

nodeos --sql_db-uri="mysql://db=eos user=root host=127.0.0.1 password='password'" --data-dir /mnt/data/data --hard-replay-blockchain

1250174ms thread-0 wasm_interface.cpp:929 eosio_assert ] message: refund request not found
1250192ms thread-0 controller.cpp:625 push_scheduled_trans ] 3050003 eosio_assert_message_exception: eosio_assert_message assertion failure
assertion failure with message: refund request not found
{"s":"refund request not found"}
thread-0 wasm_interface.cpp:930 eosio_assert
pending console output:
{"console":""}
thread-0 apply_context.cpp:61 exec_one
terminate called after throwing an instance of 'eosio::chain::abi_serialization_deadline_exception'
Aborted

Try many times, basically all around 5000000, error
@kesar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment