联盟链跨链方案构想
链上计算结果正确性主要解决的问题是验证链上计算结果的真实性,由于联盟链本身没有PoW和PoS之类的共识算法,因此可以使用以太坊之类的公链(结点多,共识算法可靠)的智能合约去监管联盟链上合约的计算结果。
数据源LP问题的数据来源是区块链账本,账本中的数据可以由多个结点写入,写入数据时,数据格式为{Id:data}的格式,data可以为单个整数,也可以是数组。
LP求解求解LP问题时,第一步是从账本中取数据,然后计算LP问题和其对偶问题,然后将计算结果和使用到的数据来源上传到其他合约中,可以以json的形式传输数据,在公链的合约中可以以哈希表之类的形式存储以进行快速查找和索引,哈希表的key是唯一指定id(可以来源于时间戳或者fabric目前的区块高度,方便进行溯源),哈希表的value是序列化后的计算数据,其中要存储的关键字段有LP问题的解和对偶问题的解,LP问题的数据来源(可以只存Id,也可也Id和data一起存),其他合约需要进行监管时,可以从本地合约中存储的数据进行计算校验。其中校验部分分为三种情况,第一种是feasible,也就是说c x严格等于b y(已完成),对于infe ...
重生
在web3的世界里大展身手吧!