彩虹溯源

xielin ec4cc3f8cf 更新 'readme.md' 5 anos atrás
.rocketeer 6a5ee2f22a Merge branch 'develop' 5 anos atrás
app 8696985dcf fix 5 anos atrás
bootstrap b0e27aadf2 fix 5 anos atrás
config 2d472e7254 fix 5 anos atrás
database 04fb7ffb0f fix 5 anos atrás
deploy c5aad3b374 first commit 5 anos atrás
public b0e27aadf2 fix 5 anos atrás
resources c5aad3b374 first commit 5 anos atrás
routes 523a4b5762 fix 5 anos atrás
storage 67ca2ba2a1 fix 5 anos atrás
tests c5aad3b374 first commit 5 anos atrás
.DS_Store c5aad3b374 first commit 5 anos atrás
.editorconfig c5aad3b374 first commit 5 anos atrás
.env.example ed0cb75843 develop 5 anos atrás
.gitignore ffc03f68ff fix 5 anos atrás
artisan c5aad3b374 first commit 5 anos atrás
composer.json b0e27aadf2 fix 5 anos atrás
docker-compose-beta.yml c5aad3b374 first commit 5 anos atrás
docker-compose-dev.yml c5aad3b374 first commit 5 anos atrás
monitor.sh 2548e193b5 fix 5 anos atrás
phpunit.xml c5aad3b374 first commit 5 anos atrás
readme.md ec4cc3f8cf 更新 'readme.md' 5 anos atrás

readme.md

彩虹溯源

该项目前后台包含在一个项目中

EOS 开发者网址: https://developers.eos.io/eosio-home/docs

EOS扩展包使用:

composer require linland/php-eos-rpc-sdk

EOS RPC使用可参考example中的例子

https://github.com/linland/php-eos-rpc-sdk

1.启动keosd--钱包服务

*/5 * * * * root /data/wwwroot/uptoyo/api/platform-trace/current/monitor.sh >> /dev/null 2>&1 自动监控运行keosd钱包服务 keosd --http-server-address=localhost:8911 --config-dir /data/eos/keosd/ —wallet-dir /data/eos/keosd/ —data-dir /data/eos/keosd/data/ config --verbose-http-errors >> keosd.log 2>&1 & 手动启动服务

2.运行nodeos--节点服务

nodeos -e --genesis-json /data/eos/nodeos/config/genesis.json --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin --plugin eosio::state_history_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --data-dir /data/eos/nodeos/data --config-dir /data/eos/nodeos/config --access-control-allow-origin='' --contracts-console --http-validate-host=false --state-history-dir /data/eos/nodeos/shpdata --trace-history --chain-state-history --verbose-http-errors --filter-on='' --disable-replay-opts >> nodeos.log 2>&1 &

3.配置项目定时任务

  • * * * * www /usr/bin/php /data/wwwroot/uptoyo/api/platform-trace/current/artisan schedule:run >> /dev/null 2>&1

接口文档

http://confluence.caihongxingqiu.com/pages/viewpage.action?pageId=10396230

业务逻辑

1.后台录入元数据信息
2.系统自动对元数据进行zip打包,并将zip包存入oss
3.对打包好的zip进行md5,取得md5后用于存入区块链交易的memo中
4.交易成功后回填交易信息(交易哈希,交易时间,区块高度)

注意:
1.由于EOS服务器资源根据当前交易量动态调整交易所耗费的资源手续费,可能会交易失败,系统会自动重试3次,每次间隔10S
2.由于钱包服务运行一段时间会自动停止,引入自动检测脚本,停止后重新启动
3.溯源二维码地址(鸡蛋上喷涂):http://uptoyo.com/qw2 会自动跳转到 http://trace.uptoyo.com/qw2