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

SQL plugin #3882

Closed
wants to merge 69 commits into from
Closed

SQL plugin #3882

wants to merge 69 commits into from

Conversation

@kesar
Copy link
Contributor

@kesar kesar commented Jun 6, 2018

Dump blockchain into SQL database

Fixes #3450
Fixes #3030

@liliyongleo
Copy link

@liliyongleo liliyongleo commented Jun 22, 2018

hi, I got an error with sql_plugin. and it will crash the nodeos process, and core dump.
given that eosio.token contract is deployed by eosio, and user eosio create user1 account, and user user1 create another user2 account. after that. we tried to transfer EOS from user1 to user2, it will lead to some problem in mysql, something related to foreign-key.
default

please help. Thanks.

any update?

@newbieh4cker
Copy link

@newbieh4cker 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
Copy link
Contributor Author

@kesar 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 mentioned this pull request Jul 5, 2018
@brianjohnson5972
Copy link
Collaborator

@brianjohnson5972 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
Copy link
Contributor

@dbarobin 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: https://github.com/NebulaProtocol/eos/pull/2

dbarobin and others added 2 commits Jul 7, 2018
[EOS] Fix token amount issue
@asiniscalchi
Copy link
Contributor

@asiniscalchi 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
Copy link
Contributor

@ericiles 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.

@newbieh4cker
Copy link

@newbieh4cker newbieh4cker commented Jul 23, 2018

@kesar
as @trungtt1981 mentioned.

'eosio::chain::abi_serialization_deadline_exception' error occurs

@trungtt1981
Copy link

@trungtt1981 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

Copy link
Contributor

@asiniscalchi 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
Copy link

@trungtt1981 trungtt1981 commented Jul 23, 2018

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

@asiniscalchi
Copy link
Contributor

@asiniscalchi 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
Copy link

@mirror222 mirror222 commented Jul 24, 2018

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

@heifner
Copy link
Contributor

@heifner 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
Copy link
Contributor Author

@kesar kesar commented Jul 27, 2018

sounds good 👍

@kesar kesar closed this Jul 27, 2018
@newbieh4cker
Copy link

@newbieh4cker newbieh4cker commented Aug 6, 2018

@kesar

what is isolated github address for sql_db_plugin??

@cppfuns
Copy link

@cppfuns 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet