把已经上链的数据修改掉,比如把下面的input属性中的65改为56:
把已经上链的数据修改掉,比如把下面的input属性中的65改为56:
原数据:
blockHash: 0xd6e8b6ca32f070169aa044d04455dc9ecbb73362e0a7f3aeaba3347131c88258
blockNumber: 0x6
gas: 0x11e1a300
from: 0x8554566216d3a85e4ed46084fc744cd177524bfe
transactionIndex: 0x0
to: 0x57a6e72c5cb194e1027427a4c9395d41683d7306
nonce: 0x903e745366997d55acf317484e92ea7268de4ea05b2389da6022649b8e3a5e
value: 0x0
hash: 0xff5c565141e0f78187f07fb43f95f262aac39955c7b47e1d8a1184990f21040c
gasPrice: 0x11e1a300
input:
0x4ed3885e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000066269616f67650000000000000000000000000000000000000000000000000000
修改后的数据:
blockHash: 0xd6e8b6ca32f070169aa044d04455dc9ecbb73362e0a7f3aeaba3347131c88258
blockNumber: 0x6
gas: 0x11e1a300
from: 0x8554566216d3a85e4ed46084fc744cd177524bfe
transactionIndex: 0x0
to: 0x57a6e72c5cb194e1027427a4c9395d41683d7306
nonce: 0x903e745366997d55acf317484e92ea7268de4ea05b2389da6022649b8e3a5e
value: 0x0
hash: 0xff5c565141e0f78187f07fb43f95f262aac39955c7b47e1d8a1184990f21040c
gasPrice: 0x11e1a300
input:
0x4ed3885e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000066269616f67560000000000000000000000000000000000000000000000000000
1.下载建链脚本
curl -#LO https://github.com/FISCO-BCOS/FISCO-BCOS/releases/download/v2.6.0/build_chain.sh && chmod u+x build_chain.sh
2.安装以mysql底层存储的链
bash build_chain.sh -s mysql -l 127.0.0.1:2 -p 30300,20200,8545
3.宝塔安装mysql并创建2个数据库(node1 node2),因为有2个节点
4.修改数据库配置信息(node0 node1都要改),注意这个的mysql的用户需要root权限才能启动链
node0:
node1:
5.启动底层链
6.查看数据库表
1.在节点目录下执行 download_console.sh
2./root/test/nodes/127.0.0.1/console/conf 目录下重命名applicationContext-sample.xml为applicationContext.xml
3.复制/root/test/nodes/127.0.0.1/sdk 下的所有文件到/root/test/nodes/127.0.0.1/console/conf 下
4.启动控制台并部署调用合约
发现mysql中存储的是blog类型如下图所示:
node1:
node2:
发现node1和node2的表数据经过共识后完全一致
1.克隆相关的代码
git clone https://github.com/FISCO-BCOS/fisco-bcos-browser.git
2.修改common.properties中的配置
3.安装
[root@localhost deploy]# python deploy.py installAll
===================== envrionment check... =====================
check git...
check finished Sucessfully.
check wget...
check finished Sucessfully.
check openssl...
check finished Sucessfully.
check curl...
check finished Sucessfully.
check nginx...
check finished sucessfully.
check java...
check finished sucessfully.
check server port..
check finished Sucessfully.
check web port...
check finished Sucessfully.
check db connection...
check finished Sucessfully.
===================== envrionment ready... =====================
===================== deploy start... =====================
fisco-bcos-browser.zip编译包已经存在,是否重新下载?[y/n]:n
fisco-bcos-browser.zip编译包已解压过,是否重新解压?[y/n]:n
数据库db_browser已经存在,是否删除重建?[y/n]:n
======= server start success! =======
======= web start success! =======
===================== deploy end... =====================
============== 通过以下链接访问,IP改成服务器IP ================
[root@localhost deploy]#
4.访问http://192.168.119.132:5100/ 新建群组
5.新建节点
1.想办法篡改相关的数据试试。
把hash最后一条数据的最后一位9改为8试试会发生什么
修改后:
2.我们再调用合约查询一下看看,貌似没什么问题
同时发现最后一位为9也能访问
7.猜测数据应该是存在value字段中(transactions中的input属性),但是类型为blob还没深入研究怎么修改,所以把值设为null,看看情况
node1:
node2:
再看看浏览器(貌似没作用,难得是我们弄错表或者字段了?):
怀疑区块链浏览器有缓存重启一波服务在看看:
还是一样:
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!