eosessentials / eostracker-api Goto Github PK
View Code? Open in Web Editor NEWEOS Tracker API is a PHP Backend based on Symfony3 that connects to a SQL database.
Home Page: http://eostracker.io/
License: GNU General Public License v3.0
EOS Tracker API is a PHP Backend based on Symfony3 that connects to a SQL database.
Home Page: http://eostracker.io/
License: GNU General Public License v3.0
@kesar
Please allow me to ask that, the latest commit of the EOS source code on master branch cbf28a237f3f2605b4ac34c5bb0c98a4d931e99f
has disabled the mongo_db_plugin
.
So, how can still your EOSTracker tool work?
The sql_db_plugin
is also disabled by default.
according to latest commit of sql_db_plugin(https://github.com/EOSIO/eos/blob/6a2014aaac65bbd8d40459c44976d6e7c77eaa21/plugins/sql_db_plugin/db/actions_table.cpp#L32) there is no 'parent_Id' column in 'action' table but 'parent'
but since EOSTracker-API commit from "Jul 15, 2018 / commit id : 6a12125" api uses "parent_Id" columns.
Suggest account names feature
Where does the data of mongodb come from?
error:Driver->connect(array('url' => 'mysql://tic@localhost/tic@tic', 'driver' => 'pdo_mysql', 'charset' => 'UTF8', 'host' => 'localhost', 'port' => null, 'user' => 'tic', 'password' => null, 'driverOptions' => array(), 'serverVersion' => 5.7, 'defaultTableOptions' => array(), 'dbname' => 'tic'), 'tic', null, array())
password is null!where set password?
In the ./src/AppBundle/Services/ActionService.php
file, there is getToAccount function
public function getToAccount(Account $account, int $page = 1, int $limit = 30)
{
return $this->getEntityManager()->createQuery(<<<DQL
SELECT a, aa, att, ac
FROM AppBundle\Entity\Action a
LEFT JOIN a.authorizations aa
JOIN a.transaction att
JOIN a.account ac
WHERE a.account = :ACCOUNT
ORDER BY a.id DESC
DQL
)
->setParameter('ACCOUNT', $account)
->setFirstResult($limit * ($page - 1))
->setMaxResults($limit)
->getResult();
}
The ./src/AppBundle/Controller/AccountController.php
define a route:
/**
* @Route("/accounts/{name}/actions/to", name="account_actions_to")
*/
But post a request to http://xxx.xxx.xxx.xxx:8000/accounts/xxxxxx/actions/to get nothing.
In addition, both exists from and to transfer action.
Thanks.
Please could you add a LICENSE file to this project to clarify the terms that this code may be used under. If you need to choose an appropriate open source license I recommend looking at https://choosealicense.com/.
Hello Kesar
May I ask how did you implement the /messages API?
I managed to set up a down 3.0 local testnet and your Tracker-API. I just find /actions interface but no /messages API as in you eostracker.io website.
I didn't find message table in mongo db either.
$ show collections
Accounts
ActionTraces
Actions
Blocks
Transactions
Thank you.
I run the program, but not data in mysql , what should do , and how to change ip to connect eos
Messages has been renamed to actions in dawn 3.x. The /messages api endpoint will need to be retooled to account for this.
Allow to upload contract code + verify that code its the one stored in the blockchain.
I passed the following order
--sql_db-uri="mysql://db=eos user=root host=127.0.0.1 password=password" --data-dir /mnt/data/data --hard-replay-blockchain
But always the following error
1768468ms thread-0 wasm_interface.cpp:929 eosio_assert ] message: refund request not found
1768469ms thread-0 controller.cpp:612 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
1800227ms thread-0 controller.cpp:153 emit ] bad alloc
Segmentation fault
I am using the https://github.com/NebulaProtocol/eos.git sql_plugin branch
I originally wanted to copy NebulaProtocol/plugins/sql_plugin directly to the EOSIO project, compile directly, and open add_subdirectory(sql_db_plugin), but the plugin was not compiled correctly. And there are no errors.So directly use the sql_plugin branch of NebulaProtocol.
I have seen similar problems with EOSIO.
EOSIO/eos#4539
Do you suspect that you need to upgrade the version of eos?
So how do you use NebulaProtocol's sql_plugin in EOSIO?
In the TransactionController, the transactionsAction should aggregate data from the Block collection to enable the timestamp from the transaction's containing block to be returned with the transaction data.
Here is an example mongo query that can be used as a starting point:
//this requires at least Mongo 3.2
db.Transactions.aggregate([
{$lookup: {
from: "Blocks",
localField: "block_id",
foreignField: "block_id",
as: "block_docs"
}},
{$unwind: '$block_docs'},
{$project: {
timestamp: '$block_docs.timestamp',
transaction_id: 1,
sequence_num: 1,
block_id: 1,
ref_block_num: 1,
ref_block_prefix: 1,
expiration: 1,
signatures: 1,
actions: 1,
createdAt: 1
}}
])
There's probably a more concise way to say "select the timestamp field from Block record and all of the fields from the Transaction record."
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?
Thanks.
I'm running eostracker api on aws with cloudflare.
But I really can't find ways to run eostracker api(php bin/console server:start 0.0.0.0) that listen "https" connection
Write readme about how to install this API + eosd + mongodb
Inject a cache component (possible nullable) and allow choose cache times.
We currently store timestamps in local timezone instead of UTC. I understand it would be difficult to update all of them in UTC considering the amount of data we have. However, we can do some datetime transformation on the API, e.g., in the Entity to map out correct unix timestamp? Also, should we use unix timestamp instead of ISO 8601 format? If we use unix timestamp, it would be a loss transformation since EOS produce 2 blocks every second and unix timestamp is in second. It would be better to return ISO 8601 format like EOS chain API (they should have "Z" appended at the end, which I think is a bug on EOSIO plugin).
@kesar You can view the information from the URL of this test.
http://47.75.202.46:8000/actions?page=1
mysql> SELECT count(a.id) as cant FROM actions a JOIN transactions t ON a.transaction_id = t.id WHERE a.parent_id = 0;
ERROR 1054 (42S22): Unknown column 'a.parent_id' in 'where clause'
@kesar
I'd very like to ask if you plan to add again support for MongoDB as the mongo_db_plugin has been re-enabled in EOSIO software.
Many thanks and cheers
No entities have been created, it would be great to have entities coming from mongodb
the local timezone is CST, but the timestamp through EOSTracker-API is CST+8.. which is not correct. please help. thx
I tried to parse blocks with Dawn4 testnet, but seems all DB plugins for Dawn4 are broken now, sql_db_plugin and mongo_plugin.
May I ask how to fetch data from mainnet? without that the API is not functional.
Right now everything is in the same controller.
Split into controllers and move to a REST architecture.
is that true the mysql server is eosio mainnet's ? or just local mysql db that would pull data from eosio mainnet? thank
I edit parameters.yml to see support for 3 kinds of databases,
I want to use the mysql database and get the following data through the installation wizard
parameters:
secret: ThisTokenIsNotSoSecretChangeIt
env(DB_URL): 'mysql://root:password@localhost/eos'
env(MONGO_URL): 'mongodb://localhost:27017/EOS'
env(REDIS_URL): 'redis://root@localhost:423432'
But always use Redis configuration after running
How will I set mysql to the current database?
In the app/config/parameters.yml
file, have the env(REDIS_URL) configuration. How about this config? Is this necessary?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.