-
Clone this repo in your computer.
-
Use quorum-wizard set up 3 blockchains(CareCenter, RelayChain, Hospital), and arrange ports according to
config.json
.Crosschain/network/CareCenter/config.json
Crosschain/network/RelayChain/config.json
Crosschain/network/Hospital/config.json
-
After set up, quorum wizard will generate
start.sh
&stop.sh
to control blockchain. -
Use
package.json
in every node to install npm module,command:npm install
. -
Set up your
config.js
in node1 ~ node12, andinit-node.js
in node2, node6, node10. -
Use
tool.sh
to do- Compile node2, node6, node10 smart contracts, and distribute to other node in same chain.
- Initiate node data in three chain by
init-node.js
in node2, node6, node10.
-
Start up all the node.
-
Use postman to import
cross-chain.postman_collection.json
, and test crosschain function by those POST request.
- quorum(raft) + web3js.websocket = still bug(timestamp nanoseconds bug) -> issue -> Use two provider to avoid this issue.
- HTTP: call and send contract
- Websocket: subscribe event
- Compile two way
- Use compile.js
- Use remix + quorum plugin
- After compile
.sol
file, you ==must to== giveCONTRACT.JSON
for other node , because they need theABI
and theContract address
, thetool.sh
do this. - Bridge Node, if the node in same chain, only
config.js
is different, andbridge.js
of the each childchain has only the difference of the console text, the function is the same.- node2 = node3 = node4 (ChildChain-1)
- node5 = node6 = node7 = node8 (RelayChain)
- node9 = node10 = node11 (ChildChain-2)
- ChildChain-1 ~= ChildChain-2
- Client Node
- node1 ~= node12
- Secure channel can setting two mode in constructor function
- Rebuild every communication
- Build and store for an hour
- V1.0
- Prototype
- Request and response flow
- V2.0
- Smart contract
- Naming Service, mapping name => chainID
- Register/Remove bridge node
- Random select bridge node by chainID
- Node.js
- More general approach to replace api path
- Smart contract
- V2.1
- Secure channel
- A secure channel between the bridge nodes of two different chains(ECDH(secp256k1) -> AES(aes-256-cbc))
- Secure channel
- V2.1.1
- Check request ip, timestamp, hash
- V2.1.2
- add check hash and salt when encrypt and decrypt
- Refactor code to OOP
- Error handling
- Dynamic Deploy Bridge nodes
- k8s statefulset
- Relay chain check ip more efficient way
- Consider removing unnecessary validation steps from the ECDH process to impove efficiency
- Shared system parameters
salt
affects deniability and the possibility of spies in the same chain must be taken into account. - Whether
TLS1.3
is more suitable