Freight Trust Core Network – 货运信托核心网区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Freight Trust Core Network – 货运信托核心网区块链毕设代写 是一篇很好的国外资料

Freight Trust Core Network

Monocore

Abstract

Freight Trust Core Network is a collection of packages that in turn, create the core components of Freight Trust Network.

Overview

Freight Trust Network enables EDI-based in-protocol messaging between trading partners through AS2/Kafka and RPC. Message support for ASC X12 4010 is currently the only supported transaction set, but more are on their way. UN EDIFACT support is partially available as well.

Specification

see specification

Governance

see governance

Protocol

see protocol

Releases

see releases

ARN Schema

arn:partition:service:region:account-id:resource-id arn:partition:service:region:account-id:resource-type/resource-id arn:partition:service:region:account-id:resource-type:resource-id

Kubernetes

DevOps Flow

  • Create private/public keys for the validators & update the secrets/validator-keys-secret.yaml with the validator private keys
  • Update the configmap/configmap.yml with the public keys & genesis file
  • Update the number of nodes you would like in deployments/node-deployment.yaml
  • Run kubectl
  • Monitoring via prometheus & grafana is also setup up in a separate monitoring namespace and exposed via NodePort services (ports 30090, 30030 respectively)
  • Credentials for grafana are admin:password. When grafana loads up select the “besu Dashboard”

Bootnode

docker run --rm --volume $PWD/ibftSetup/:/opt/besu/data hyperledger/besu:latest operator generate-blockchain-config --config-file=/opt/besu/data/ibftConfigFile.json --to=/opt/besu/data/networkFiles --private-key-file-name=key sudo chown -R $USER:$USER ./ibftSetup mv ./ibftSetup/networkFiles/genesis.json ./ibftSetup/

Validate Deployment

minikube ssh  # once in the terminal curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' <besu_NODE_SERVICE_HOST>:8545  # which should return: The result confirms that the node running the JSON-RPC service has two peers: {   "jsonrpc" : "2.0",   "id" : 1,   "result" : "0x5" } 

AtomicSwaps

‘Chunnel’

  • Swapping Ether on one blockchain for Ether on another blockchain.
  • Allowing for partial swapping of Ether. That is, allowing one entity to offer an amount of Ether on one blockchain, say 5 Ether with an exchange rate between chains of 1.0, and allow another entity to accept the offer but only swap a partial amount, say 2 Ether.

Contracts

  • Receiver Contract: A lockable contract deployed on Sidechain 2 by the Entity Offering Ether. The entity funds the contract when deploying it and can later add funds to the contract.
  • Sender Contract: A lockable contract deployed on Sidechain 1 by the Entity Offering Ether. The entity can withdraw funds from the contract once an exchange has occurred.
  • Registration Contract: A non-lockable contract deployed on Sidechain 1 by the Registration Owner.

Workflow

  • Entity Offering Ether deploys Receiver Contract, funding it with some Ether.
  • Entity Offering Ether deploys Sender Contract linking it to the Receiver Contract and specifying an exchange rate between blockchains.
  • Entity Offering Ether links the Receiver Contract to the Sender Contract by calling setSenderContract.
  • Entity Offering Ether registers the Sender Contract with the Registration Contract by calling register.
  • Entity Accepting Offer uses the Registration Contract to locate an appropriate Sender Contract for the sidechain they wish to obtain Ether for, at an exchange rate they find acceptable.
  • Entity Accepting Offer calls the Sender Contracts exchange function with a Crosschain Transaction. The transaction includes a Subordinate Transaction which calls the Receiver Contract’s exchange function.
  • Entity Offering Ether withdraws Ether from the Sender Contract.

Design Features

Parametric Exchange Rate

The exchange rate is a number indicating the relative worth of Ether on one sidechain compared to another sidechain. The exchange rate is a decimal number which can range from 263-1 to 2-64 (9.223372036854776e18 to 5.421010862427522e-20).

It is passed into the Solidity code assuming the decimal point is 264.

Registration Process

The registration function takes the address of the Sender Contract as as parameter. It then calls the Sender Contract to determine which sidechain Ether is to be swapped and at what exchange rate the Sender Contract will use.

Crosschain Call Authentication

The Receiver Contract’s exchange function checks that the function is being called from the expected Sender contract. This authentication information is fetched out of the Subordinate Transaction. The crosschain transaction will not be committed if the Subordinate Transaction information is invalid.

Deployments

see Deployments

Support

see Support

Security

see security

License

Apache-2.0


货运信托核心网

Monocore

抽象

货运信托核心网络是一个包裹的集合,这些包裹反过来又创造了货运信托网络的核心组成部分。

概述

货运信托网络通过AS2/Kafka和RPC实现贸易伙伴之间基于EDI的协议内消息传递。对ASC X12 4010的消息支持是当前唯一受支持的事务集,但更多的事务集正在开发中。UN EDIFACT支持也有部分可用。

协议

参见规范

发布

参见治理

ARN架构

参见协议

Kubernetes

参见发布

DevOps Flow

arn:分区:服务:地区:帐户id:资源idarn:分区:服务:地区资源类型:资源idarn:分区:服务:地区:帐户id:资源-类型:资源id

Bootnode

验证部署

  • 为验证器创建私钥/公钥,并更新机密/验证器密钥-秘密.yaml使用验证器私钥
  • 更新configmap/配置映射.yml使用公钥&amp;genesis file
  • 更新您希望在部署/节点中使用的节点数-部署.yaml
  • 运行kubectl
  • 通过prometheus&grafana进行监控也设置在单独的监控命名空间中,并通过NodePort服务(端口30090,分别为30030)
  • grafana的凭证为管理员:密码。当grafana加载时,选择“besu Dashboard”

原子交换

docker run --rm --volume $PWD/ibftSetup/:/opt/besu/data hyperledger/besu:latest operator generate-blockchain-config --config-file=/opt/besu/data/ibftConfigFile.json --to=/opt/besu/data/networkFiles --private-key-file-name=key sudo chown -R $USER:$USER ./ibftSetup mv ./ibftSetup/networkFiles/genesis.json ./ibftSetup/

合同

minikube ssh  # once in the terminal curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' <besu_NODE_SERVICE_HOST>:8545  # which should return: The result confirms that the node running the JSON-RPC service has two peers: {   "jsonrpc" : "2.0",   "id" : 1,   "result" : "0x5" } 

工作流

“通道”

  • 将一个区块链blockchain上的以太交换为另一个区块链blockchain上的以太。
  • 允许部分交换乙醚。也就是说,允许一个实体在一个区块链blockchain上提供一定数量的以太,比如说5个以太,链之间的汇率为1.0,允许另一个实体接受这个出价,但只交换一部分,比如2以太。

设计功能

  • 接收方契约:由提供Ether的实体部署在侧链2上的可锁定契约。实体在部署合同时为其提供资金,以后可以向合同中添加资金。
  • 发送方契约:由提供Ether的实体部署在侧链1上的可锁定契约。一旦发生交易,实体可以从合同中提取资金。
  • 注册契约:由注册所有者部署在侧链1上的不可锁定契约。

参数汇率

  • 提供乙醚的实体部署接收器合同,并用一些乙醚为其提供资金。
  • 提供以太的实体部署发送方合同,将其链接到接收方合同,并指定区块链blockchain之间的汇率。
  • 提供以太的实体通过调用setSenderContract将接收方契约链接到发送方契约。
  • 提供Ether的实体通过调用register将发送方合同注册到注册合同中。
  • 接受要约的实体使用注册合同,以他们认为可以接受的汇率,为他们希望获得以太的侧链找到合适的发送方合同。
  • 接受报价的实体通过跨链事务调用发送方合同交换函数。事务包括调用接收方契约的交换函数的从属事务。报价人退出合同。在
  • Entity Offering Ether withdraws Ether from the Sender Contract.

注册过程

跨链呼叫验证

汇率为表示一个侧链上乙醚相对于另一个侧链的相对价值的数字。汇率是一个十进制数,范围从263-1到2-64(9.223372036854776e18到5.421010862427522e-20)。

假设小数点为264,则将其传递到实值代码中。

部署

注册函数以发送方合同的地址作为参数。然后它调用发送方契约来确定要交换哪个侧链以太,以及发送方契约将使用什么汇率。

支持

接收方协定的exchange函数检查是否从预期的发送方协定调用了该函数。此身份验证信息是从从属事务中提取的。如果下级事务信息无效,则不会提交跨链事务。

许可证

请参阅部署

Support

请参阅支持

Security

请参阅安全性

License

Apache-2.0

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/16809.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » Freight Trust Core Network – 货运信托核心网区块链毕设代写

提供最优质的资源集合

立即查看 了解详情