搭建多租户网络
官网地址:https://besu.hyperledger.org/en/stable/Tutorials/Private-Network/Create-IBFT-Network/
下载以及测试镜像
[root@localhost IBFT-Network]# docker run --rm hyperledger/besu:latest --version
besu/v20.10.4/linux-x86_64/oracle_openjdk-java-11
- Create directories
[root@localhost IBFT-Network]# mkdir -p Node-1/data
[root@localhost IBFT-Network]# mkdir -p Node-2/data
[root@localhost IBFT-Network]# mkdir -p Node-3/data
[root@localhost IBFT-Network]# mkdir -p Node-4/data
[root@localhost IBFT-Network]# tree
.
├── Node-1
│ └── data
├── Node-2
│ └── data
├── Node-3
│ └── data
└── Node-4
└── data
- Create a configuration file
Copy the following configuration file definition to a file called ibftConfigFile.json and save it in the IBFT-Network directory:
{
"genesis": {
"config": {
"chainId": 2018,
"muirglacierblock": 0,
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 4
}
},
"nonce": "0x0",
"timestamp": "0x58ee40ba",
"gasLimit": "0x47b760",
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"fe3b557e8fb62b89f4916b721be55ceb828dbd73": {
"privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",
"balance": "0xad78ebc5ac6200000"
},
"627306090abaB3A6e1400e9345bC60c78a8BEf57": {
"privateKey": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",
"balance": "90000000000000000000000"
},
"f17f52151EbEF6C7334FAD080c5704D77216b732": {
"privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",
"comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",
"balance": "90000000000000000000000"
}
}
},
"blockchain": {
"nodes": {
"generate": true,
"count": 4
}
}
}
- Generate node keys and a genesis file
docker run --rm -v $PWD:/data hyperledger/besu:latest operator generate-blockchain-config --config-file=/data/ibftConfigFile.json --to=/data/networkFiles --private-key-file-name=key
# outputs:
[root@localhost IBFT-Network]# tree networkFiles/
networkFiles/
├── genesis.json
└── keys
├── 0x01b15ba8fc494cb2bed40781ed74bfb3ac4cbaaa
│ ├── key
│ └── key.pub
├── 0xa29c9687f5932e980494286629be366e1ef4535d
│ ├── key
│ └── key.pub
├── 0xbb7383a375d9b64e7b780d06b8e995ce0a3726cb
│ ├── key
│ └── key.pub
└── 0xcf9c02998344d9add4239c9814ebafdab11da15c
├── key
└── key.pub
出现异常信息denied exception,需要加个权限 chmod -R 777 *
- Copy the genesis file to the IBFT-Network directory
Copy the genesis.json file to the IBFT-Network directory.
[root@localhost IBFT-Network]# cp networkFiles/genesis.json ./
- Copy the node private keys to the node directories
cp ./networkFiles/keys/0xc2bb7dfb1affbad023840297ee81a7d72dbb8ab0/* ./Node-1/data/
cp ./networkFiles/keys/0xd1ead610ebcb93ca97deccf3b84ee30da8c73f11/* ./Node-2/data/
cp ./networkFiles/keys/0xf01c07b23ca6b391af0765a6ea53f4d4fb1d4d3e/* ./Node-3/data/
cp ./networkFiles/keys/0xf4a2c2aeaf6207a0f9dee85ec9d155d34b087763/* ./Node-4/data/
创建Orion目录:
[root@localhost IBFT-Network]# mkdir Node-1/Orion
[root@localhost IBFT-Network]# mkdir Node-2/Orion
[root@localhost IBFT-Network]# mkdir Node-3/Orion
[root@localhost IBFT-Network]# mkdir Node-4/Orion
echo '123456' > Node-1/Orion/passwordFile
echo '123456' > Node-2/Orion/passwordFile
echo '123456' > Node-3/Orion/passwordFile
echo '123456' > Node-4/Orion/passwordFile
- Generate Orion keys
In each Orion directory, generate a public/private key pair for the Orion node:
docker run -i --rm --mount type=bind,source=/home/besu/IBFT-Network/Node-1/Orion,target=/data pegasyseng/orion:latest -g /data/nodeKey
docker run -i --rm --mount type=bind,source=/home/besu/IBFT-Network/Node-2/Orion,target=/data pegasyseng/orion:latest -g /data/nodeKey
docker run -i --rm --mount type=bind,source=/home/besu/IBFT-Network/Node-3/Orion,target=/data pegasyseng/orion:latest -g /data/nodeKey
docker run -i --rm --mount type=bind,source=/home/besu/IBFT-Network/Node-4/Orion,target=/data pegasyseng/orion:latest -g /data/nodeKey
# output :
[root@localhost IBFT-Network]# tree
.
├── genesis.json
├── ibftConfigFile.json
├── networkFiles
│ ├── genesis.json
│ └── keys
│ ├── 0xc2bb7dfb1affbad023840297ee81a7d72dbb8ab0
│ │ ├── key
│ │ └── key.pub
│ ├── 0xd1ead610ebcb93ca97deccf3b84ee30da8c73f11
│ │ ├── key
│ │ └── key.pub
│ ├── 0xf01c07b23ca6b391af0765a6ea53f4d4fb1d4d3e
│ │ ├── key
│ │ └── key.pub
│ └── 0xf4a2c2aeaf6207a0f9dee85ec9d155d34b087763
│ ├── key
│ └── key.pub
├── Node-1
│ ├── data
│ │ ├── key
│ │ └── key.pub
│ └── Orion
│ ├── nodeKey.key
│ ├── nodeKey.pub
│ ├── orion.conf
│ └── passwordFile
├── Node-2
│ ├── data
│ │ ├── key
│ │ └── key.pub
│ └── Orion
│ ├── nodeKey.key
│ ├── nodeKey.pub
│ └── passwordFile
├── Node-3
│ ├── data
│ │ ├── key
│ │ └── key.pub
│ └── Orion
│ ├── nodeKey.key
│ ├── nodeKey.pub
│ └── passwordFile
└── Node-4
├── data
│ ├── key
│ └── key.pub
└── Orion
├── nodeKey.key
├── nodeKey.pub
└── passwordFile
18 directories, 32 files
In the Node-1/Orion directory, generate a public/private key pair for each tenant.
Name the key pair nodeKey2 and nodeKey3.
docker run -i --rm --mount type=bind,source=/home/besu/IBFT-Network/Node-1/Orion,target=/data pegasyseng/orion:latest -g /data/nodeKey2
docker run -i --rm --mount type=bind,source=/home/besu/IBFT-Network/Node-1/Orion,target=/data pegasyseng/orion:latest -g /data/nodeKey3
# output:
[root@localhost IBFT-Network]# tree Node-1/
Node-1/
├── data
│ ├── key
│ └── key.pub
└── Orion
├── nodeKey2.key
├── nodeKey2.pub
├── nodeKey3.key
├── nodeKey3.pub
├── nodeKey.key
├── nodeKey.pub
├── orion.conf
└── passwordFile
注:出现以下错误时需要加权限。(chmod -R 777 Node-1/Orion)
[ERROR] [main] 04-07-2021 03:02:28 n.c.o.c.Orion - /data/nodeKey.pub
java.nio.file.AccessDeniedException: /data/nodeKey.pub
at sun.nio.fs.UnixException.translateToIOException(Unknown Source) ~[?:?]
- Create Orion configuration files
In the Node-1/Orion directory, create a file called orion.conf and add the following properties:
nodeurl = "http://127.0.0.1:8080/"
nodeport = 8080
clienturl = "http://127.0.0.1:8888/"
clientport = 8888
publickeys = ["/data/nodeKey.pub"]
privatekeys = ["/data/nodeKey.key"]
passwords = "/data/passwordFile"
tls = "off"
In the Node-2/Orion directory, create a file called orion.conf and add the following properties:
nodeurl = "http://127.0.0.1:8081/"
nodeport = 8081
clienturl = "http://127.0.0.1:8889/"
clientport = 8889
publickeys = ["/data/nodeKey.pub"]
privatekeys = ["/data/nodeKey.key"]
passwords = "/data/passwordFile"
othernodes = ["http://127.0.0.1:8080/"]
tls = "off"
In the Node-3/Orion directory, create a file called orion.conf and add the following properties:
nodeurl = "http://127.0.0.1:8082/"
nodeport = 8082
clienturl = "http://127.0.0.1:8890/"
clientport = 8890
publickeys = ["/data/nodeKey.pub"]
privatekeys = ["/data/nodeKey.key"]
passwords = "/data/passwordFile"
othernodes = ["http://127.0.0.1:8080/"]
tls = "off"
Update the Orion configuration file
In the Node-1/Orion directory, update the orion.conf file by adding the new key pairs:
[root@localhost IBFT-Network]# cat Node-1/Orion/orion.conf
nodeurl = "http://0.0.0.0:5080/"
nodeport = 5080
nodenetworkinterface = "0.0.0.0"
clienturl = "http://0.0.0.0:5888/"
clientport = 5888
clientnetworkinterface = "0.0.0.0"
publickeys = ["/data/nodeKey.pub", "/data/nodeKey2.pub", "/data/nodeKey3.pub"]
privatekeys = ["/data/nodeKey.key", "/data/nodeKey2.key", "/data/nodeKey3.key"]
passwords = "/data/passwordFile"
workdir = "/data"
tls = "off"
- Start the Orion nodes
使用host模式启动:成功调通
docker run -d --network host -v /home/besu/IBFT-Network/Node-1/Orion:/data --name orion1 pegasyseng/orion:latest /data/orion.conf
docker run -d --network host -v /home/besu/IBFT-Network/Node-2/Orion:/data --name orion2 pegasyseng/orion:latest /data/orion.conf
docker run -d --network host -v /home/besu/IBFT-Network/Node-3/Orion:/data --name orion3 pegasyseng/orion:latest /data/orion.conf
- Start Besu Node-1 (using JWT public key authentication.)
In the Node-1 directory, start Besu Node-1:
- Generate a private and public key pair
openssl genrsa -out privateKey.pem 2048
openssl rsa -pubout -in privateKey.pem -pubout -out publicKey.pem
#output:
[root@localhost data]# tree
.
├── genesis.json
├── key
├── key.pub
├── privateKey.pem
└── publicKey.pem
0 directories, 5 files
[root@localhost data]#
- start besu1
docker run -d --network host -v /home/besu/IBFT-Network/Node-1/data:/opt/besu/data --name besu1 hyperledger/besu:latest --data-path=/opt/besu/data --genesis-file=/opt/besu/data/genesis.json --rpc-http-authentication-enabled --rpc-http-authentication-jwt-public-key-file=/opt/besu/data/publicKey.pem --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --privacy-enabled --privacy-url=http://0.0.0.0:5888 --privacy-multi-tenancy-enabled --min-gas-price=0
#outputs:
[root@localhost Node-1]# docker logs -f besu1
2021-04-07 12:08:02.117+00:00 | main | INFO | AbstractAltBnPrecompiledContract | Using LibEthPairings native alt bn128
2021-04-07 12:08:03.059+00:00 | main | INFO | SECP256K1 | Using native secp256k1
2021-04-07 12:08:03.067+00:00 | main | INFO | Besu | Starting Besu version: besu/v20.10.4/linux-x86_64/oracle_openjdk-java-11
2021-04-07 12:08:03.314+00:00 | main | WARN | Besu | --min-gas-price has been ignored because --miner-enabled was not defined on the command line.
2021-04-07 12:08:03.388+00:00 | main | INFO | Besu | Static Nodes file = /opt/besu/data/static-nodes.json
2021-04-07 12:08:03.390+00:00 | main | INFO | StaticNodesParser | StaticNodes file /opt/besu/data/static-nodes.json does not exist, no static connections will be created.
2021-04-07 12:08:03.390+00:00 | main | INFO | Besu | Connecting to 0 static nodes.
2021-04-07 12:08:03.394+00:00 | main | INFO | Besu | Security Module: localfile
2021-04-07 12:08:03.458+00:00 | main | INFO | KeyPairUtil | Loaded public key 0x85b2e15af9b615306fed066d0e9a3b58595b3c313368dd5941104386325ac7022f0ebc456b9c7ac26974de7f553c8596c326aecd8f8169d00276067626e82122 from /opt/besu/data/key
2021-04-07 12:08:03.466+00:00 | main | INFO | RocksDBKeyValuePrivacyStorageFactory | No existing private database detected at /opt/besu/data. Using version 1
2021-04-07 12:08:03.555+00:00 | main | INFO | DatabaseMetadata | Lookup database metadata file in data directory: /opt/besu/data
2021-04-07 12:08:03.556+00:00 | main | INFO | RocksDBKeyValueStorageFactory | Existing database detected at /opt/besu/data. Version 1
2021-04-07 12:08:04.156+00:00 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [MuirGlacier: 0]
2021-04-07 12:08:04.322+00:00 | main | INFO | RunnerBuilder | Detecting NAT service.
2021-04-07 12:08:04.557+00:00 | main | INFO | Runner | Starting Ethereum main loop ...
2021-04-07 12:08:04.557+00:00 | main | INFO | DockerNatManager | Starting docker NAT manager.
2021-04-07 12:08:04.613+00:00 | main | INFO | NetworkRunner | Starting Network.
2021-04-07 12:08:04.727+00:00 | nioEventLoopGroup-2-1 | INFO | RlpxAgent | P2P RLPx agent started and listening on /0:0:0:0:0:0:0:0:30303.
2021-04-07 12:08:04.730+00:00 | main | INFO | PeerDiscoveryAgent | Starting peer discovery agent on host=0.0.0.0, port=30303
2021-04-07 12:08:04.798+00:00 | vert.x-eventloop-thread-0 | INFO | VertxPeerDiscoveryAgent | Started peer discovery agent successfully, on effective host=0:0:0:0:0:0:0:0 and port=30303
2021-04-07 12:08:04.801+00:00 | vert.x-eventloop-thread-0 | INFO | PeerDiscoveryAgent | P2P peer discovery agent started and listening on /0:0:0:0:0:0:0:0:30303
2021-04-07 12:08:04.866+00:00 | main | INFO | DefaultP2PNetwork | Enode URL enode://85b2e15af9b615306fed066d0e9a3b58595b3c313368dd5941104386325ac7022f0ebc456b9c7ac26974de7f553c8596c326aecd8f8169d00276067626e82122@127.0.0.1:30303
2021-04-07 12:08:04.866+00:00 | main | INFO | DefaultP2PNetwork | Node address 0xc2bb7dfb1affbad023840297ee81a7d72dbb8ab0
2021-04-07 12:08:04.871+00:00 | main | INFO | DefaultSynchronizer | Starting synchronizer.
2021-04-07 12:08:04.873+00:00 | main | INFO | FullSyncDownloader | Starting full sync.
2021-04-07 12:08:04.884+00:00 | main | INFO | FullSyncTargetManager | No sync target, waiting for peers: 0
2021-04-07 12:08:04.937+00:00 | main | INFO | JsonRpcHttpService | Starting JSON-RPC service on 0.0.0.0:8545
2021-04-07 12:08:05.083+00:00 | vert.x-eventloop-thread-2 | INFO | JsonRpcHttpService | JSON-RPC service started and listening on 0.0.0.0:8545
2021-04-07 12:08:05.088+00:00 | main | INFO | Runner | Ethereum main loop is up.
2021-04-07 12:08:05.095+00:00 | main | INFO | AutoTransactionLogBloomCachingService | Starting auto transaction log bloom caching service.
2021-04-07 12:08:05.096+00:00 | main | INFO | LogBloomCacheMetadata | Lookup cache metadata file in data directory: /opt/besu/data/caches
2021-04-07 12:08:09.927+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 0
^C
[root@localhost Node-1]#
- Start Besu Node-2
In the Node-2 directory, start Besu Node-2 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:
*. Generate a private and public key pair
openssl genrsa -out privateKey.pem 2048
openssl rsa -pubout -in privateKey.pem -pubout -out publicKey.pem
#output:
[root@localhost data]# tree
.
├── genesis.json
├── key
├── key.pub
├── privateKey.pem
└── publicKey.pem
0 directories, 5 files
[root@localhost data]#
- start besu2
docker run -d --network host -v /home/besu/IBFT-Network/Node-2/data:/opt/besu/data --name besu2 hyperledger/besu:latest --data-path=/opt/besu/data --genesis-file=/opt/besu/data/genesis.json --rpc-http-authentication-enabled --rpc-http-authentication-jwt-public-key-file=/opt/besu/data/publicKey.pem --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --bootnodes=enode://85b2e15af9b615306fed066d0e9a3b58595b3c313368dd5941104386325ac7022f0ebc456b9c7ac26974de7f553c8596c326aecd8f8169d00276067626e82122@127.0.0.1:30303 --p2p-port=30304 --rpc-http-port=8546 --privacy-enabled --privacy-url=http://0.0.0.0:5889 --privacy-multi-tenancy-enabled --min-gas-price=0
# outputs:
[root@localhost data]# docker logs -f besu2
2021-04-07 12:09:08.112+00:00 | main | INFO | AbstractAltBnPrecompiledContract | Using LibEthPairings native alt bn128
2021-04-07 12:09:08.999+00:00 | main | INFO | SECP256K1 | Using native secp256k1
2021-04-07 12:09:09.006+00:00 | main | INFO | Besu | Starting Besu version: besu/v20.10.4/linux-x86_64/oracle_openjdk-java-11
2021-04-07 12:09:09.209+00:00 | main | WARN | Besu | --min-gas-price has been ignored because --miner-enabled was not defined on the command line.
2021-04-07 12:09:09.268+00:00 | main | INFO | Besu | Static Nodes file = /opt/besu/data/static-nodes.json
2021-04-07 12:09:09.269+00:00 | main | INFO | StaticNodesParser | StaticNodes file /opt/besu/data/static-nodes.json does not exist, no static connections will be created.
2021-04-07 12:09:09.269+00:00 | main | INFO | Besu | Connecting to 0 static nodes.
2021-04-07 12:09:09.272+00:00 | main | INFO | Besu | Security Module: localfile
2021-04-07 12:09:09.330+00:00 | main | INFO | KeyPairUtil | Loaded public key 0xe21944470a9349ec157933fc62b7ef786d6b3585940f602c4ee73dfacf519f642152e247e13ca916647e5e786735f8d6d057756a15fff0ea592b506a4476dbf0 from /opt/besu/data/key
2021-04-07 12:09:09.340+00:00 | main | INFO | RocksDBKeyValuePrivacyStorageFactory | No existing private database detected at /opt/besu/data. Using version 1
2021-04-07 12:09:09.399+00:00 | main | INFO | RocksDBKeyValueStorageFactory | No existing database detected at /opt/besu/data. Using version 1
2021-04-07 12:09:09.848+00:00 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [MuirGlacier: 0]
2021-04-07 12:09:10.043+00:00 | main | INFO | RunnerBuilder | Detecting NAT service.
2021-04-07 12:09:10.217+00:00 | main | INFO | Runner | Starting Ethereum main loop ...
2021-04-07 12:09:10.218+00:00 | main | INFO | DockerNatManager | Starting docker NAT manager.
2021-04-07 12:09:10.273+00:00 | main | INFO | NetworkRunner | Starting Network.
2021-04-07 12:09:10.404+00:00 | nioEventLoopGroup-2-1 | INFO | RlpxAgent | P2P RLPx agent started and listening on /0:0:0:0:0:0:0:0:30304.
2021-04-07 12:09:10.406+00:00 | main | INFO | PeerDiscoveryAgent | Starting peer discovery agent on host=0.0.0.0, port=30304
2021-04-07 12:09:10.480+00:00 | vert.x-eventloop-thread-0 | INFO | VertxPeerDiscoveryAgent | Started peer discovery agent successfully, on effective host=0:0:0:0:0:0:0:0 and port=30304
2021-04-07 12:09:10.481+00:00 | vert.x-eventloop-thread-0 | INFO | PeerDiscoveryAgent | P2P peer discovery agent started and listening on /0:0:0:0:0:0:0:0:30304
2021-04-07 12:09:10.557+00:00 | main | INFO | DefaultP2PNetwork | Enode URL enode://e21944470a9349ec157933fc62b7ef786d6b3585940f602c4ee73dfacf519f642152e247e13ca916647e5e786735f8d6d057756a15fff0ea592b506a4476dbf0@127.0.0.1:30304
2021-04-07 12:09:10.558+00:00 | main | INFO | DefaultP2PNetwork | Node address 0xd1ead610ebcb93ca97deccf3b84ee30da8c73f11
2021-04-07 12:09:10.565+00:00 | main | INFO | DefaultSynchronizer | Starting synchronizer.
2021-04-07 12:09:10.568+00:00 | main | INFO | FullSyncDownloader | Starting full sync.
2021-04-07 12:09:10.571+00:00 | main | INFO | FullSyncTargetManager | No sync target, waiting for peers: 0
2021-04-07 12:09:10.707+00:00 | main | INFO | JsonRpcHttpService | Starting JSON-RPC service on 0.0.0.0:8546
2021-04-07 12:09:10.816+00:00 | vert.x-eventloop-thread-2 | INFO | JsonRpcHttpService | JSON-RPC service started and listening on 0.0.0.0:8546
2021-04-07 12:09:10.822+00:00 | main | INFO | Runner | Ethereum main loop is up.
2021-04-07 12:09:10.854+00:00 | main | INFO | AutoTransactionLogBloomCachingService | Starting auto transaction log bloom caching service.
2021-04-07 12:09:10.855+00:00 | main | INFO | LogBloomCacheMetadata | Lookup cache metadata file in data directory: /opt/besu/data/caches
2021-04-07 12:09:11.485+00:00 | nioEventLoopGroup-3-2 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:09:16.488+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:09:21.489+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
^C
[root@localhost data]#
- Start Besu Node-3
In the Node-3 directory, start Besu Node-3 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:
*. Generate a private and public key pair
openssl genrsa -out privateKey.pem 2048
openssl rsa -pubout -in privateKey.pem -pubout -out publicKey.pem
#output:
[root@localhost data]# tree
.
├── genesis.json
├── key
├── key.pub
├── privateKey.pem
└── publicKey.pem
0 directories, 5 files
[root@localhost data]#
- start besu3
docker run -d --network host -v /home/besu/IBFT-Network/Node-3/data:/opt/besu/data --name besu3 hyperledger/besu:latest --data-path=/opt/besu/data --genesis-file=/opt/besu/data/genesis.json --rpc-http-authentication-enabled --rpc-http-authentication-jwt-public-key-file=/opt/besu/data/publicKey.pem --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --bootnodes=enode://85b2e15af9b615306fed066d0e9a3b58595b3c313368dd5941104386325ac7022f0ebc456b9c7ac26974de7f553c8596c326aecd8f8169d00276067626e82122@127.0.0.1:30303 --p2p-port=30305 --rpc-http-port=8547 --privacy-enabled --privacy-url=http://0.0.0.0:5890 --privacy-multi-tenancy-enabled --min-gas-price=0
#outputs:
[root@localhost data]# docker logs -f besu3
2021-04-07 12:10:42.431+00:00 | main | INFO | AbstractAltBnPrecompiledContract | Using LibEthPairings native alt bn128
2021-04-07 12:10:43.542+00:00 | main | INFO | SECP256K1 | Using native secp256k1
2021-04-07 12:10:43.553+00:00 | main | INFO | Besu | Starting Besu version: besu/v20.10.4/linux-x86_64/oracle_openjdk-java-11
2021-04-07 12:10:43.814+00:00 | main | WARN | Besu | --min-gas-price has been ignored because --miner-enabled was not defined on the command line.
2021-04-07 12:10:43.875+00:00 | main | INFO | Besu | Static Nodes file = /opt/besu/data/static-nodes.json
2021-04-07 12:10:43.877+00:00 | main | INFO | StaticNodesParser | StaticNodes file /opt/besu/data/static-nodes.json does not exist, no static connections will be created.
2021-04-07 12:10:43.877+00:00 | main | INFO | Besu | Connecting to 0 static nodes.
2021-04-07 12:10:43.880+00:00 | main | INFO | Besu | Security Module: localfile
2021-04-07 12:10:43.931+00:00 | main | INFO | KeyPairUtil | Loaded public key 0x9a9d3f28469e76df9f0f3882860907b9bf0a43aa12ba68c124621728f80e2f1fbc2cea8897ce212cb8e0f50e7bdfa805cae08253ba85184bd742e8db955d9c81 from /opt/besu/data/key
2021-04-07 12:10:43.948+00:00 | main | INFO | RocksDBKeyValuePrivacyStorageFactory | No existing private database detected at /opt/besu/data. Using version 1
2021-04-07 12:10:44.053+00:00 | main | INFO | DatabaseMetadata | Lookup database metadata file in data directory: /opt/besu/data
2021-04-07 12:10:44.054+00:00 | main | INFO | RocksDBKeyValueStorageFactory | Existing database detected at /opt/besu/data. Version 1
2021-04-07 12:10:44.571+00:00 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [MuirGlacier: 0]
2021-04-07 12:10:44.798+00:00 | main | INFO | RunnerBuilder | Detecting NAT service.
2021-04-07 12:10:45.010+00:00 | main | INFO | Runner | Starting Ethereum main loop ...
2021-04-07 12:10:45.011+00:00 | main | INFO | DockerNatManager | Starting docker NAT manager.
2021-04-07 12:10:45.066+00:00 | main | INFO | NetworkRunner | Starting Network.
2021-04-07 12:10:45.185+00:00 | nioEventLoopGroup-2-1 | INFO | RlpxAgent | P2P RLPx agent started and listening on /0:0:0:0:0:0:0:0:30305.
2021-04-07 12:10:45.189+00:00 | main | INFO | PeerDiscoveryAgent | Starting peer discovery agent on host=0.0.0.0, port=30305
2021-04-07 12:10:45.264+00:00 | vert.x-eventloop-thread-0 | INFO | VertxPeerDiscoveryAgent | Started peer discovery agent successfully, on effective host=0:0:0:0:0:0:0:0 and port=30305
2021-04-07 12:10:45.266+00:00 | vert.x-eventloop-thread-0 | INFO | PeerDiscoveryAgent | P2P peer discovery agent started and listening on /0:0:0:0:0:0:0:0:30305
2021-04-07 12:10:45.440+00:00 | main | INFO | DefaultP2PNetwork | Enode URL enode://9a9d3f28469e76df9f0f3882860907b9bf0a43aa12ba68c124621728f80e2f1fbc2cea8897ce212cb8e0f50e7bdfa805cae08253ba85184bd742e8db955d9c81@127.0.0.1:30305
2021-04-07 12:10:45.440+00:00 | main | INFO | DefaultP2PNetwork | Node address 0xf01c07b23ca6b391af0765a6ea53f4d4fb1d4d3e
2021-04-07 12:10:45.465+00:00 | main | INFO | DefaultSynchronizer | Starting synchronizer.
2021-04-07 12:10:45.467+00:00 | main | INFO | FullSyncDownloader | Starting full sync.
2021-04-07 12:10:45.474+00:00 | main | INFO | FullSyncTargetManager | No sync target, waiting for peers: 0
2021-04-07 12:10:45.580+00:00 | main | INFO | JsonRpcHttpService | Starting JSON-RPC service on 0.0.0.0:8547
2021-04-07 12:10:45.679+00:00 | vert.x-eventloop-thread-2 | INFO | JsonRpcHttpService | JSON-RPC service started and listening on 0.0.0.0:8547
2021-04-07 12:10:45.683+00:00 | main | INFO | Runner | Ethereum main loop is up.
2021-04-07 12:10:45.773+00:00 | main | INFO | AutoTransactionLogBloomCachingService | Starting auto transaction log bloom caching service.
2021-04-07 12:10:45.774+00:00 | main | INFO | LogBloomCacheMetadata | Lookup cache metadata file in data directory: /opt/besu/data/caches
2021-04-07 12:10:46.235+00:00 | nioEventLoopGroup-3-1 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:10:51.238+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:10:56.240+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:11:01.241+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:11:06.243+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:11:11.244+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:11:16.245+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
^C
[root@localhost data]#
- start besu4
openssl genrsa -out privateKey.pem 2048
openssl rsa -pubout -in privateKey.pem -pubout -out publicKey.pem
docker run -d --network host -v /home/besu/IBFT-Network/Node-4/data:/opt/besu/data --name besu4 hyperledger/besu:latest --data-path=/opt/besu/data --genesis-file=/opt/besu/data/genesis.json --rpc-http-authentication-enabled --rpc-http-authentication-jwt-public-key-file=/opt/besu/data/publicKey.pem --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --bootnodes=enode://85b2e15af9b615306fed066d0e9a3b58595b3c313368dd5941104386325ac7022f0ebc456b9c7ac26974de7f553c8596c326aecd8f8169d00276067626e82122@127.0.0.1:30303 --p2p-port=30306 --rpc-http-port=8548 --privacy-enabled --privacy-url=http://0.0.0.0:5891 --privacy-multi-tenancy-enabled --min-gas-price=0
#outputs:
[root@localhost IBFT-Network]# docker logs -f besu4
2021-04-07 12:11:46.515+00:00 | main | INFO | AbstractAltBnPrecompiledContract | Using LibEthPairings native alt bn128
2021-04-07 12:11:47.563+00:00 | main | INFO | SECP256K1 | Using native secp256k1
2021-04-07 12:11:47.572+00:00 | main | INFO | Besu | Starting Besu version: besu/v20.10.4/linux-x86_64/oracle_openjdk-java-11
2021-04-07 12:11:47.792+00:00 | main | WARN | Besu | --min-gas-price has been ignored because --miner-enabled was not defined on the command line.
2021-04-07 12:11:47.854+00:00 | main | INFO | Besu | Static Nodes file = /opt/besu/data/static-nodes.json
2021-04-07 12:11:47.855+00:00 | main | INFO | StaticNodesParser | StaticNodes file /opt/besu/data/static-nodes.json does not exist, no static connections will be created.
2021-04-07 12:11:47.855+00:00 | main | INFO | Besu | Connecting to 0 static nodes.
2021-04-07 12:11:47.859+00:00 | main | INFO | Besu | Security Module: localfile
2021-04-07 12:11:47.917+00:00 | main | INFO | KeyPairUtil | Loaded public key 0x17a571b6a0de28f0e18f5b5cd397c0176667083846a6de2ee120b84edb803dc9e36fc74d4b1f97c43adbcc695462d0713e2395de51ba74e8b37b21690ffd0e8b from /opt/besu/data/key
2021-04-07 12:11:47.928+00:00 | main | INFO | RocksDBKeyValuePrivacyStorageFactory | No existing private database detected at /opt/besu/data. Using version 1
2021-04-07 12:11:48.011+00:00 | main | INFO | DatabaseMetadata | Lookup database metadata file in data directory: /opt/besu/data
2021-04-07 12:11:48.011+00:00 | main | INFO | RocksDBKeyValueStorageFactory | Existing database detected at /opt/besu/data. Version 1
2021-04-07 12:11:48.412+00:00 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [MuirGlacier: 0]
2021-04-07 12:11:48.605+00:00 | main | INFO | RunnerBuilder | Detecting NAT service.
2021-04-07 12:11:48.861+00:00 | main | INFO | Runner | Starting Ethereum main loop ...
2021-04-07 12:11:48.861+00:00 | main | INFO | DockerNatManager | Starting docker NAT manager.
2021-04-07 12:11:48.919+00:00 | main | INFO | NetworkRunner | Starting Network.
2021-04-07 12:11:49.050+00:00 | nioEventLoopGroup-2-1 | INFO | RlpxAgent | P2P RLPx agent started and listening on /0:0:0:0:0:0:0:0:30306.
2021-04-07 12:11:49.052+00:00 | main | INFO | PeerDiscoveryAgent | Starting peer discovery agent on host=0.0.0.0, port=30306
2021-04-07 12:11:49.148+00:00 | vert.x-eventloop-thread-0 | INFO | VertxPeerDiscoveryAgent | Started peer discovery agent successfully, on effective host=0:0:0:0:0:0:0:0 and port=30306
2021-04-07 12:11:49.151+00:00 | vert.x-eventloop-thread-0 | INFO | PeerDiscoveryAgent | P2P peer discovery agent started and listening on /0:0:0:0:0:0:0:0:30306
2021-04-07 12:11:49.259+00:00 | main | INFO | DefaultP2PNetwork | Enode URL enode://17a571b6a0de28f0e18f5b5cd397c0176667083846a6de2ee120b84edb803dc9e36fc74d4b1f97c43adbcc695462d0713e2395de51ba74e8b37b21690ffd0e8b@127.0.0.1:30306
2021-04-07 12:11:49.259+00:00 | main | INFO | DefaultP2PNetwork | Node address 0xf4a2c2aeaf6207a0f9dee85ec9d155d34b087763
2021-04-07 12:11:49.262+00:00 | main | INFO | DefaultSynchronizer | Starting synchronizer.
2021-04-07 12:11:49.269+00:00 | main | INFO | FullSyncDownloader | Starting full sync.
2021-04-07 12:11:49.274+00:00 | main | INFO | FullSyncTargetManager | No sync target, waiting for peers: 0
2021-04-07 12:11:49.384+00:00 | main | INFO | JsonRpcHttpService | Starting JSON-RPC service on 0.0.0.0:8548
2021-04-07 12:11:49.605+00:00 | vert.x-eventloop-thread-2 | INFO | JsonRpcHttpService | JSON-RPC service started and listening on 0.0.0.0:8548
2021-04-07 12:11:49.622+00:00 | main | INFO | Runner | Ethereum main loop is up.
2021-04-07 12:11:49.694+00:00 | main | INFO | AutoTransactionLogBloomCachingService | Starting auto transaction log bloom caching service.
2021-04-07 12:11:49.697+00:00 | main | INFO | LogBloomCacheMetadata | Lookup cache metadata file in data directory: /opt/besu/data/caches
2021-04-07 12:11:50.114+00:00 | nioEventLoopGroup-3-1 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 1
2021-04-07 12:11:52.280+00:00 | nioEventLoopGroup-3-4 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 2
2021-04-07 12:11:52.319+00:00 | nioEventLoopGroup-3-3 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 3
2021-04-07 12:11:57.345+00:00 | EthScheduler-Timer-0 | INFO | FullSyncTargetManager | No sync target, waiting for peers: 3
^C
[root@localhost IBFT-Network]#
- Generate the tenant JWTs
online address :https://jwt.io/
- 申请Node-1的nodeKey的jwt(所有权限)
申请信息:
[root@localhost Node-1]# cat Orion/nodeKey.pub
LhL7ZmKOG0LOx/hTIydExl1tkMoqRarDKUJqV7ckz30=
[root@localhost Node-1]# cat data/privateKey.pem
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAp/EkXGWuCVMHKQkSrMaRaRt1n3GYOhSOjsCrx1nqiK+2ocPl
xRJj6jq2ybMDBFSYjXyfbEb4TMXoG3ZKxuIFHomz+Rpbwx803xLaPUIhZoIbxnIs
a7SUg7kfxp/q42BQ5gja0FnQUHAE/uOKabYYH0xizayp3yxxBH6pBVlCHkX0gc8d
3x+4mocGtrfabUbQMLTMEBQygYorn1lYxsEBCQIIIdU4MLWObRiyzzKUhLnX55g1
RiS4R7fCMYq61yWaUaXJcFjB1/Fw3POxPRvGmJUtB+g8w8lrx37oH8aWyhZNzfRI
54FznEsHrSuWNFirWXqeknLiVlG8jtUzkrQgcQIDAQABAoIBAFO4nBbPva36TSSA
2GV3bAAI519AAtJZcyPpGvl7crcHWbVU8lOHMnYPJRZx/jwHbDGEgfk5fAjR1D70
fpydCk5J+YViRYKFKRdXz6IgOIRgsjYArvJWiH8OJ7AeArutRUcX/PVHANlIrsTe
bB783xOjQdIklF6kSgcimWIIODTcfe6/AujJ3gcptf5FZQrtt4QOIH2Fv1eAL1Yo
Uayts8RRKxwzFIvfEF3d6bKf+w4XSz3kvjeFVMz8iAKzCBOQ+bsk9X73RmuCY4qE
VFbhvemfngyx/bBEQ50WCw9XP5ZZ7rJVnz+4RBr8b94O2+/HQ2Q6birNbEhPsu3p
6HyDEZECgYEA2R3rGNvQYLswdAKHjvHpPKAkEKBuNxoyYxzBYpaGo3guW+NYqVJA
KO4HNo2psMUWPu+MjyI5ycOCdsyAwxkbsT92abiUlWrUXAgAlkIfwgn6jV70q8QH
A/+IBxwryfl2TZG2QRpPlayPUHSgHkQR9GzdBm1EwCPW/09Ya1MTia0CgYEAxgS4
AlmxQG+EWxYTsy9OazBslvS0Vo3r9yE8338JVYSwmtCK3DcrZvJOQS2wfmaxftXd
xyhpPZd/P3GFV6+M06+9ZA805RN5iMsD1fI/O+fRK6Zpj6Y4paAhYO3Fo2wOwBEU
r01yBuhG+wz0++kCzx/43oYMXG8kv5oLu8dWUlUCgYEAwwh8IpV65xnf2aZYDVFD
ugEExKbIutjegGfZU+1xvrB7vHFKOLe5CMthUWEKGM/CPwDC2+Tb0mG89WiZFiic
1qjyft+fIWWYo59Qn6mAi7aZCptM4Gsz/iRyFij5MPLVkbKd7HdtHD+pcZWCLA3r
rwyHs3k+c/b979Rf0fELsPUCgYAtI0g6qO1hrcny5W5qKv9qKainJHKzRDikpbv1
ikS7bLrBH4Z3uk+3cMZrzxlrRsdxDRk327tZod4MvTjTCx5D5sx6MYkyKqVKjFR8
gXLumeIxXAa2CwLgpkbVjH2/ydL27y3S5Al5D5uWgJabkbrlMfmN5+qLa35p+phw
HnlL3QKBgARUBPhN3e571ayhTxzitAec0rpdegcxEaSC37HNL7k4GSIJxeDvyzGw
fzWxMsOFeP+XFzjvciXQdOp2tUV7e39WA5PmVCG1O1xIznUE9pXoWZLu4tcoA0Wm
UbvT7ep4AekofIftczNUkMo+DjrVhazCbUv24Z0DwgIXgrCB8/mc
-----END RSA PRIVATE KEY-----
[root@localhost Node-1]# cat data/publicKey.pem
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp/EkXGWuCVMHKQkSrMaR
aRt1n3GYOhSOjsCrx1nqiK+2ocPlxRJj6jq2ybMDBFSYjXyfbEb4TMXoG3ZKxuIF
Homz+Rpbwx803xLaPUIhZoIbxnIsa7SUg7kfxp/q42BQ5gja0FnQUHAE/uOKabYY
H0xizayp3yxxBH6pBVlCHkX0gc8d3x+4mocGtrfabUbQMLTMEBQygYorn1lYxsEB
CQIIIdU4MLWObRiyzzKUhLnX55g1RiS4R7fCMYq61yWaUaXJcFjB1/Fw3POxPRvG
mJUtB+g8w8lrx37oH8aWyhZNzfRI54FznEsHrSuWNFirWXqeknLiVlG8jtUzkrQg
cQIDAQAB
-----END PUBLIC KEY-----
payload:
2021-05-07 16:15:40=1620375340000
{
"permissions": ["*:*"],
"privacyPublicKey": "LhL7ZmKOG0LOx/hTIydExl1tkMoqRarDKUJqV7ckz30=",
"exp": 1620375340000
}
jwt token:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwicHJpdmFjeVB1YmxpY0tleSI6IkxoTDdabUtPRzBMT3gvaFRJeWRFeGwxdGtNb3FSYXJES1VKcVY3Y2t6MzA9IiwiZXhwIjoxNjIwMzc1MzQwMDAwfQ.D0XlxR7CPS_OeDQZeiT1o1xDfPW78yN3W3na5M0peNHg429GFpW8jZmLCYYFVmDTdfBxtfGR1vOSkbwECBnsGemUgcLEp5c9-Spakog45-ODd83HmWlCVjb7YIJzIsKOlebM2j9aUc5dAtgiVT_LKbnEB7rs3t685v8r75wNEonq3wv9lkej6IS0C__NcmRkmDCKnaQI_H5g3_xlPax_pfugI2HNk4kQ62o4ttr17CS7Z2Aj6fmZ3_8jV8qyJTs9PYDlkjc7xaJHPSagQiNMILYdA6XbTFtIVILS4xmgIAhDR7L5pIVKBetT8jLcVt01mMOv890WT1A_lil3SmP2-w
- 申请Node-1的nodeKey2的jwt(eth权限)
申请信息:
[root@localhost Node-1]# cat Orion/nodeKey2.pub
47Le2YOkBhT90L1xGxBp/rerY2RRl9EBza8iR/VDcBE=
[root@localhost Node-1]# cat data/privateKey.pem
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAp/EkXGWuCVMHKQkSrMaRaRt1n3GYOhSOjsCrx1nqiK+2ocPl
xRJj6jq2ybMDBFSYjXyfbEb4TMXoG3ZKxuIFHomz+Rpbwx803xLaPUIhZoIbxnIs
a7SUg7kfxp/q42BQ5gja0FnQUHAE/uOKabYYH0xizayp3yxxBH6pBVlCHkX0gc8d
3x+4mocGtrfabUbQMLTMEBQygYorn1lYxsEBCQIIIdU4MLWObRiyzzKUhLnX55g1
RiS4R7fCMYq61yWaUaXJcFjB1/Fw3POxPRvGmJUtB+g8w8lrx37oH8aWyhZNzfRI
54FznEsHrSuWNFirWXqeknLiVlG8jtUzkrQgcQIDAQABAoIBAFO4nBbPva36TSSA
2GV3bAAI519AAtJZcyPpGvl7crcHWbVU8lOHMnYPJRZx/jwHbDGEgfk5fAjR1D70
fpydCk5J+YViRYKFKRdXz6IgOIRgsjYArvJWiH8OJ7AeArutRUcX/PVHANlIrsTe
bB783xOjQdIklF6kSgcimWIIODTcfe6/AujJ3gcptf5FZQrtt4QOIH2Fv1eAL1Yo
Uayts8RRKxwzFIvfEF3d6bKf+w4XSz3kvjeFVMz8iAKzCBOQ+bsk9X73RmuCY4qE
VFbhvemfngyx/bBEQ50WCw9XP5ZZ7rJVnz+4RBr8b94O2+/HQ2Q6birNbEhPsu3p
6HyDEZECgYEA2R3rGNvQYLswdAKHjvHpPKAkEKBuNxoyYxzBYpaGo3guW+NYqVJA
KO4HNo2psMUWPu+MjyI5ycOCdsyAwxkbsT92abiUlWrUXAgAlkIfwgn6jV70q8QH
A/+IBxwryfl2TZG2QRpPlayPUHSgHkQR9GzdBm1EwCPW/09Ya1MTia0CgYEAxgS4
AlmxQG+EWxYTsy9OazBslvS0Vo3r9yE8338JVYSwmtCK3DcrZvJOQS2wfmaxftXd
xyhpPZd/P3GFV6+M06+9ZA805RN5iMsD1fI/O+fRK6Zpj6Y4paAhYO3Fo2wOwBEU
r01yBuhG+wz0++kCzx/43oYMXG8kv5oLu8dWUlUCgYEAwwh8IpV65xnf2aZYDVFD
ugEExKbIutjegGfZU+1xvrB7vHFKOLe5CMthUWEKGM/CPwDC2+Tb0mG89WiZFiic
1qjyft+fIWWYo59Qn6mAi7aZCptM4Gsz/iRyFij5MPLVkbKd7HdtHD+pcZWCLA3r
rwyHs3k+c/b979Rf0fELsPUCgYAtI0g6qO1hrcny5W5qKv9qKainJHKzRDikpbv1
ikS7bLrBH4Z3uk+3cMZrzxlrRsdxDRk327tZod4MvTjTCx5D5sx6MYkyKqVKjFR8
gXLumeIxXAa2CwLgpkbVjH2/ydL27y3S5Al5D5uWgJabkbrlMfmN5+qLa35p+phw
HnlL3QKBgARUBPhN3e571ayhTxzitAec0rpdegcxEaSC37HNL7k4GSIJxeDvyzGw
fzWxMsOFeP+XFzjvciXQdOp2tUV7e39WA5PmVCG1O1xIznUE9pXoWZLu4tcoA0Wm
UbvT7ep4AekofIftczNUkMo+DjrVhazCbUv24Z0DwgIXgrCB8/mc
-----END RSA PRIVATE KEY-----
[root@localhost Node-1]# cat data/publicKey.pem
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp/EkXGWuCVMHKQkSrMaR
aRt1n3GYOhSOjsCrx1nqiK+2ocPlxRJj6jq2ybMDBFSYjXyfbEb4TMXoG3ZKxuIF
Homz+Rpbwx803xLaPUIhZoIbxnIsa7SUg7kfxp/q42BQ5gja0FnQUHAE/uOKabYY
H0xizayp3yxxBH6pBVlCHkX0gc8d3x+4mocGtrfabUbQMLTMEBQygYorn1lYxsEB
CQIIIdU4MLWObRiyzzKUhLnX55g1RiS4R7fCMYq61yWaUaXJcFjB1/Fw3POxPRvG
mJUtB+g8w8lrx37oH8aWyhZNzfRI54FznEsHrSuWNFirWXqeknLiVlG8jtUzkrQg
cQIDAQAB
-----END PUBLIC KEY-----
payload:
2021-05-07 16:15:40=1620375340000
{
"permissions": ["eth:*"],
"privacyPublicKey": "47Le2YOkBhT90L1xGxBp/rerY2RRl9EBza8iR/VDcBE=",
"exp": 1620375340000
}
jwt token:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJldGg6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.Fv6X4gJZPdhmfgtFMeFHX7Qsl_F4GvXVZqy8uSgGyni3NAOXoLLM9zoOKC8OaMWEKnUnFbyhcfo8LLix0joikh3dUOFYF5eVniMtaDX9Amupz7xa0JyQIlDKJpiQ0Ec8St2QvJieXzkl08oBVfzVpGqr5n_TVn54CkNgr8I9iIQcfzAS79WhFInGY7riYCmP3JQIsY1lS8ja497hqu7Pxd_jwm3NPjAYz5hkBtAg8Lr4wITcUHUb5JWWhsd0GW8UE0pWlVxrlxQEG4MpMRy3isescMv1iz8jKRilCwDTv5qBGjoLJvq3O3dYWAt9oEvji6tC5OqneK9ly5nAZphyKw
- 申请Node-1的nodeKey2的jwt(eea权限)
申请信息:
{
"permissions": ["eea:*"],
"privacyPublicKey": "47Le2YOkBhT90L1xGxBp/rerY2RRl9EBza8iR/VDcBE=",
"exp": 1620375340000
}
jwt token:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJlZWE6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.AwFl6yQG6IaJHujx7jJO_YimuepBV__hbHJzPjtLnrIgNQwGv32KMXDVeaTI6BzsEWQYP9j6IpcQzu1NqLlnOlKvdnPnRBMb8bfyoT6PxzoBzscJxLjoJQGhUwm8zVRf8PkFCji-_oHsYRx1RGHjNz6Uznt122XJLJ3TtWeC7jHGUSyZMDqjjwetcbCprEtNU1TAzUhYY37B-Nd951aeCT_56877JbmhBQNGcizq4nzYyRRO0phAHh9N0Vu3vO7P6HhkHlzd0iyjKfsDJqbAba-5t-zAwKHbg2HGWqJJF7sAtoY2-GoJNvROXcX3-csKqPB6FQBbh7IHCIFnhxFa_w
- 申请Node-1的nodeKey2的jwt(priv权限)
申请信息:
{
"permissions": ["priv:*"],
"privacyPublicKey": "47Le2YOkBhT90L1xGxBp/rerY2RRl9EBza8iR/VDcBE=",
"exp": 1620375340000
}
jwt token:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJwcml2OioiXSwicHJpdmFjeVB1YmxpY0tleSI6IjQ3TGUyWU9rQmhUOTBMMXhHeEJwL3JlclkyUlJsOUVCemE4aVIvVkRjQkU9IiwiZXhwIjoxNjIwMzc1MzQwMDAwfQ.D2Vrb4HCcV7CjGb4BJdYqr19ekBkeMnDwU9OyxpObjZRLaHAoRJwkyNi3ikBwXFaZfQaLYapKwTEr2fAoBvIgd74qz407MYoGzrnuPKR4e9ZX5aceWy0QLNq6csFsmhdZy-MK96iGE65dMeH2dcJ8phM1Yr7BuGoF8dxVR8KiUTM2TE9OuGcsnpqo3v42qrVY-BC3MOvPqVXJcgk0VkuNBogAeQkQLUyFhqMK-1-lCPMKo4mq-Rq_nltrXuq9XmFAz3ixmWPLQbLfP8Ygp8UJBNgyZv9KeMVua0dG46kMLudDFtR3q29193EKc2yRKjI32cvO9qdhqAv-Jsb3iHK7w
- Use the authentication token to make requests.
-
验证Node-1的nodeKey的jwt(所有权限)可以执行所有api方法权限
结果:可以调用所有 的方法
示例1(net_version):
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwicHJpdmFjeVB1YmxpY0tleSI6IkxoTDdabUtPRzBMT3gvaFRJeWRFeGwxdGtNb3FSYXJES1VKcVY3Y2t6MzA9IiwiZXhwIjoxNjIwMzc1MzQwMDAwfQ.D0XlxR7CPS_OeDQZeiT1o1xDfPW78yN3W3na5M0peNHg429GFpW8jZmLCYYFVmDTdfBxtfGR1vOSkbwECBnsGemUgcLEp5c9-Spakog45-ODd83HmWlCVjb7YIJzIsKOlebM2j9aUc5dAtgiVT_LKbnEB7rs3t685v8r75wNEonq3wv9lkej6IS0C__NcmRkmDCKnaQI_H5g3_xlPax_pfugI2HNk4kQ62o4ttr17CS7Z2Aj6fmZ3_8jV8qyJTs9PYDlkjc7xaJHPSagQiNMILYdA6XbTFtIVILS4xmgIAhDR7L5pIVKBetT8jLcVt01mMOv890WT1A_lil3SmP2-w' -d '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"result" : "2018"
}[root@localhost IBFT-Network]#
示例2(priv_getTransactionReceipt):
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwicHJpdmFjeVB1YmxpY0tleSI6IkxoTDdabUtPRzBMT3gvaFRJeWRFeGwxdGtNb3FSYXJES1VKcVY3Y2t6MzA9IiwiZXhwIjoxNjIwMzc1MzQwMDAwfQ.D0XlxR7CPS_OeDQZeiT1o1xDfPW78yN3W3na5M0peNHg429GFpW8jZmLCYYFVmDTdfBxtfGR1vOSkbwECBnsGemUgcLEp5c9-Spakog45-ODd83HmWlCVjb7YIJzIsKOlebM2j9aUc5dAtgiVT_LKbnEB7rs3t685v8r75wNEonq3wv9lkej6IS0C__NcmRkmDCKnaQI_H5g3_xlPax_pfugI2HNk4kQ62o4ttr17CS7Z2Aj6fmZ3_8jV8qyJTs9PYDlkjc7xaJHPSagQiNMILYdA6XbTFtIVILS4xmgIAhDR7L5pIVKBetT8jLcVt01mMOv890WT1A_lil3SmP2-w' -d '{"jsonrpc":"2.0","method":"priv_getTransactionReceipt","params":["0xf3ab9693ad92e277bf785e1772f29fb1864904bbbe87b0470455ddb082caab9d"],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"result" : null
}[root@localhost IBFT-Network]#
-
验证Node-1的nodeKey2的jwt(eth权限)仅可以执行eth.* api方法权限
结果:仅仅可以调用eth.* 的方法
示例1(eth_blockNumber):结果调用成功
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJldGg6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.Fv6X4gJZPdhmfgtFMeFHX7Qsl_F4GvXVZqy8uSgGyni3NAOXoLLM9zoOKC8OaMWEKnUnFbyhcfo8LLix0joikh3dUOFYF5eVniMtaDX9Amupz7xa0JyQIlDKJpiQ0Ec8St2QvJieXzkl08oBVfzVpGqr5n_TVn54CkNgr8I9iIQcfzAS79WhFInGY7riYCmP3JQIsY1lS8ja497hqu7Pxd_jwm3NPjAYz5hkBtAg8Lr4wITcUHUb5JWWhsd0GW8UE0pWlVxrlxQEG4MpMRy3isescMv1iz8jKRilCwDTv5qBGjoLJvq3O3dYWAt9oEvji6tC5OqneK9ly5nAZphyKw' -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"result" : "0x0"
}[root@localhost IBFT-Network]#
示例2(net_version):结果Unauthorized
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJldGg6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.Fv6X4gJZPdhmfgtFMeFHX7Qsl_F4GvXVZqy8uSgGyni3NAOXoLLM9zoOKC8OaMWEKnUnFbyhcfo8LLix0joikh3dUOFYF5eVniMtaDX9Amupz7xa0JyQIlDKJpiQ0Ec8St2QvJieXzkl08oBVfzVpGqr5n_TVn54CkNgr8I9iIQcfzAS79WhFInGY7riYCmP3JQIsY1lS8ja497hqu7Pxd_jwm3NPjAYz5hkBtAg8Lr4wITcUHUb5JWWhsd0GW8UE0pWlVxrlxQEG4MpMRy3isescMv1iz8jKRilCwDTv5qBGjoLJvq3O3dYWAt9oEvji6tC5OqneK9ly5nAZphyKw' -d '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"error" : {
"code" : -40100,
"message" : "Unauthorized"
}
}[root@localhost IBFT-Network]#
示例3(priv_getTransactionReceipt):结果Unauthorized
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJldGg6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.Fv6X4gJZPdhmfgtFMeFHX7Qsl_F4GvXVZqy8uSgGyni3NAOXoLLM9zoOKC8OaMWEKnUnFbyhcfo8LLix0joikh3dUOFYF5eVniMtaDX9Amupz7xa0JyQIlDKJpiQ0Ec8St2QvJieXzkl08oBVfzVpGqr5n_TVn54CkNgr8I9iIQcfzAS79WhFInGY7riYCmP3JQIsY1lS8ja497hqu7Pxd_jwm3NPjAYz5hkBtAg8Lr4wITcUHUb5JWWhsd0GW8UE0pWlVxrlxQEG4MpMRy3isescMv1iz8jKRilCwDTv5qBGjoLJvq3O3dYWAt9oEvji6tC5OqneK9ly5nAZphyKw' -d '{"jsonrpc":"2.0","method":"priv_getTransactionReceipt","params":["0xf3ab9693ad92e277bf785e1772f29fb1864904bbbe87b0470455ddb082caab9d"],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"error" : {
"code" : -40100,
"message" : "Unauthorized"
}
}[root@localhost IBFT-Network]#
-
验证Node-1的nodeKey2的jwt(eea权限)仅可以执行eea.* api方法权限
结果:仅仅可以调用eea.* 的方法
示例1(eea_sendRawTransaction):结果调用成功
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJlZWE6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.AwFl6yQG6IaJHujx7jJO_YimuepBV__hbHJzPjtLnrIgNQwGv32KMXDVeaTI6BzsEWQYP9j6IpcQzu1NqLlnOlKvdnPnRBMb8bfyoT6PxzoBzscJxLjoJQGhUwm8zVRf8PkFCji-_oHsYRx1RGHjNz6Uznt122XJLJ3TtWeC7jHGUSyZMDqjjwetcbCprEtNU1TAzUhYY37B-Nd951aeCT_56877JbmhBQNGcizq4nzYyRRO0phAHh9N0Vu3vO7P6HhkHlzd0iyjKfsDJqbAba-5t-zAwKHbg2HGWqJJF7sAtoY2-GoJNvROXcX3-csKqPB6FQBbh7IHCIFnhxFa_w' -d '{"jsonrpc":"2.0","method":"eea_sendRawTransaction","params":[{"to":"0x4d182ad0158c9eb9a1e3d6144a2ef48b048f3be3","data":"0x6057361d000000000000000000000000000000000000000000000000000000000000002e","privateFrom":"A1aVtMxLCUHmBVHXoZzzBgPbW/wj5axDpW9X8l91SGo=","privateFor":["k2zXEin4Ip/qBGlRkJejnGWdP9cjkK+DAvKNW31L2C8="],"privateKey":"8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63"}],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"error" : {
"code" : -32602,
"message" : "Invalid params"
}
}[root@localhost IBFT-Network]#
示例2(priv_getTransactionReceipt):结果Unauthorized
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJlZWE6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.AwFl6yQG6IaJHujx7jJO_YimuepBV__hbHJzPjtLnrIgNQwGv32KMXDVeaTI6BzsEWQYP9j6IpcQzu1NqLlnOlKvdnPnRBMb8bfyoT6PxzoBzscJxLjoJQGhUwm8zVRf8PkFCji-_oHsYRx1RGHjNz6Uznt122XJLJ3TtWeC7jHGUSyZMDqjjwetcbCprEtNU1TAzUhYY37B-Nd951aeCT_56877JbmhBQNGcizq4nzYyRRO0phAHh9N0Vu3vO7P6HhkHlzd0iyjKfsDJqbAba-5t-zAwKHbg2HGWqJJF7sAtoY2-GoJNvROXcX3-csKqPB6FQBbh7IHCIFnhxFa_w' -d '{"jsonrpc":"2.0","method":"priv_getTransactionReceipt","params":["0xf3ab9693ad92e277bf785e1772f29fb1864904bbbe87b0470455ddb082caab9d"],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"error" : {
"code" : -40100,
"message" : "Unauthorized"
}
}[root@localhost IBFT-Network]#
-
验证Node-1的nodeKey2的jwt(priv权限)仅可以执行priv.* api方法权限
结果:仅仅可以调用priv.* 的方法
示例1(priv_getTransactionReceipt):结果调用成功
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJlZWE6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.AwFl6yQG6IaJHujx7jJO_YimuepBV__hbHJzPjtLnrIgNQwGv32KMXDVeaTI6BzsEWQYP9j6IpcQzu1NqLlnOlKvdnPnRBMb8bfyoT6PxzoBzscJxLjoJQGhUwm8zVRf8PkFCji-_oHsYRx1RGHjNz6Uznt122XJLJ3TtWeC7jHGUSyZMDqjjwetcbCprEtNU1TAzUhYY37B-Nd951aeCT_56877JbmhBQNGcizq4nzYyRRO0phAHh9N0Vu3vO7P6HhkHlzd0iyjKfsDJqbAba-5t-zAwKHbg2HGWqJJF7sAtoY2-GoJNvROXcX3-csKqPB6FQBbh7IHCIFnhxFa_w' -d '{"jsonrpc":"2.0","method":"priv_getTransactionReceipt","params":["0xf3ab9693ad92e277bf785e1772f29fb1864904bbbe87b0470455ddb082caab9d"],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"error" : {
"code" : -40100,
"message" : "Unauthorized"
}
}[root@localhost IBFT-Network]#
示例2(eea_sendRawTransaction):结果Unauthorized
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyJlZWE6KiJdLCJwcml2YWN5UHVibGljS2V5IjoiNDdMZTJZT2tCaFQ5MEwxeEd4QnAvcmVyWTJSUmw5RUJ6YThpUi9WRGNCRT0iLCJleHAiOjE2MjAzNzUzNDAwMDB9.AwFl6yQG6IaJHujx7jJO_YimuepBV__hbHJzPjtLnrIgNQwGv32KMXDVeaTI6BzsEWQYP9j6IpcQzu1NqLlnOlKvdnPnRBMb8bfyoT6PxzoBzscJxLjoJQGhUwm8zVRf8PkFCji-_oHsYRx1RGHjNz6Uznt122XJLJ3TtWeC7jHGUSyZMDqjjwetcbCprEtNU1TAzUhYY37B-Nd951aeCT_56877JbmhBQNGcizq4nzYyRRO0phAHh9N0Vu3vO7P6HhkHlzd0iyjKfsDJqbAba-5t-zAwKHbg2HGWqJJF7sAtoY2-GoJNvROXcX3-csKqPB6FQBbh7IHCIFnhxFa_w' -d '{"jsonrpc":"2.0","method":"eea_sendRawTransaction","params":[{"to":"0x4d182ad0158c9eb9a1e3d6144a2ef48b048f3be3","data":"0x6057361d000000000000000000000000000000000000000000000000000000000000002e","privateFrom":"A1aVtMxLCUHmBVHXoZzzBgPbW/wj5axDpW9X8l91SGo=","privateFor":["k2zXEin4Ip/qBGlRkJejnGWdP9cjkK+DAvKNW31L2C8="],"privateKey":"8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63"}],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"error" : {
"code" : -32602,
"message" : "Invalid params"
}
}[root@localhost IBFT-Network]#
私有合约测试 (中断中,待测试)
验证以下三个点:
- 四个node可以部署私有合约以及调用
- node1的租户1和node2的租户1可以部署私有合约以及调用
- node1的其他租户是否调用上述2中的合约
结果:遇到错误,没有部署成功;
示例(priv_getTransactionCount):Unable to determine nonce for account in group.
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwicHJpdmFjeVB1YmxpY0tleSI6IkxoTDdabUtPRzBMT3gvaFRJeWRFeGwxdGtNb3FSYXJES1VKcVY3Y2t6MzA9IiwiZXhwIjoxNjIwMzc1MzQwMDAwfQ.D0XlxR7CPS_OeDQZeiT1o1xDfPW78yN3W3na5M0peNHg429GFpW8jZmLCYYFVmDTdfBxtfGR1vOSkbwECBnsGemUgcLEp5c9-Spakog45-ODd83HmWlCVjb7YIJzIsKOlebM2j9aUc5dAtgiVT_LKbnEB7rs3t685v8r75wNEonq3wv9lkej6IS0C__NcmRkmDCKnaQI_H5g3_xlPax_pfugI2HNk4kQ62o4ttr17CS7Z2Aj6fmZ3_8jV8qyJTs9PYDlkjc7xaJHPSagQiNMILYdA6XbTFtIVILS4xmgIAhDR7L5pIVKBetT8jLcVt01mMOv890WT1A_lil3SmP2-w' -d '{"jsonrpc":"2.0","method":"priv_getTransactionCount","params":["0xc2bb7dfb1affbad023840297ee81a7d72dbb8ab0","LjJfB2lgBR8NSrF6kDRFzZCVvjRcVC45B8iO/UuZKaM="],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"error" : {
"code" : -50100,
"message" : "Unable to determine nonce for account in group."
}
}
示例(eea_sendRawTransaction):"Unable to decode the private signed raw transaction"
[root@localhost IBFT-Network]# curl -X POST -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwicHJpdmFjeVB1YmxpY0tleSI6IkxoTDdabUtPRzBMT3gvaFRJeWRFeGwxdGtNb3FSYXJES1VKcVY3Y2t6MzA9IiwiZXhwIjoxNjIwMzc1MzQwMDAwfQ.D0XlxR7CPS_OeDQZeiT1o1xDfPW78yN3W3na5M0peNHg429GFpW8jZmLCYYFVmDTdfBxtfGR1vOSkbwECBnsGemUgcLEp5c9-Spakog45-ODd83HmWlCVjb7YIJzIsKOlebM2j9aUc5dAtgiVT_LKbnEB7rs3t685v8r75wNEonq3wv9lkej6IS0C__NcmRkmDCKnaQI_H5g3_xlPax_pfugI2HNk4kQ62o4ttr17CS7Z2Aj6fmZ3_8jV8qyJTs9PYDlkjc7xaJHPSagQiNMILYdA6XbTFtIVILS4xmgIAhDR7L5pIVKBetT8jLcVt01mMOv890WT1A_lil3SmP2-w' -d '{"jsonrpc":"2.0","method":"eea_sendRawTransaction","params":["f902f08080832dc6c08080b90230608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101d0806100606000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80633fa4f245146100465780636057361d1461006457806367e404ce14610092575b600080fd5b61004e6100c6565b6040518082815260200191505060405180910390f35b6100906004803603602081101561007a57600080fd5b81019080803590602001909291905050506100d0565b005b61009a610170565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600254905090565b7fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f53382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a18060028190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690509056fea264697066735822122014266460150b43976a9811350c5e75867206b3bc95642cdcac9d86321b73359264736f6c63430007000033820fe7a0c36cfc8928085ff028466ef2da1c897b5a35d977ca34c6a13de9960f92b6a256a032ecafb587aefccc9717739980ce9dcdff2aafeb01f3d585eb5a2dca6685e250a02e12fb66628e1b42cec7f853232744c65d6d90ca2a45aac329426a57b724cf7df842a09d33f732c5959b428f0a39c1d48e1386fe9a9875f3b5ab47969dadf1f4d4c361a04fc9a1a4eff8a6a10a6d29aa03c54c39d6dbd885d79bdc3d0238e113cbb2573e8a72657374726963746564"],"id":1}' http://192.168.1.173:8545
{
"jsonrpc" : "2.0",
"id" : 1,
"error" : {
"code" : -50100,
"message" : "Unable to decode the private signed raw transaction"
}
}
网友评论