OpenAtomFoundation / xupercore

The kernel of xuperchain.
Apache License 2.0
61 stars 47 forks source link

代@CodeCmn提交只读跨链的实现,和3.10版本实现的方式一致 #289

Open springrain opened 2 years ago

springrain commented 2 years ago

Description

What is the purpose of the change? 代@CodeCmn提交只读跨链的实现,和3.10版本实现的方式一致

Fixes # (issue)

Type of change

Please delete options that are not relevant.

Brief of your solution

代@CodeCmn提交只读跨链的实现,和3.10版本实现的方式一致

How Has This Been Tested?

代@CodeCmn提交只读跨链的实现,和3.10版本实现的方式一致

CodeCmn commented 2 years ago

可以问下 只读跨链时的post tx阶段,只需要通过缓存验证,而无需再次发起网络请求 这部分代码在v3.10或者三点多的版本  哪里有实现么,参考一下。

------------------ 原始邮件 ------------------ 发件人: "xuperchain/xupercore" @.>; 发送时间: 2021年11月15日(星期一) 晚上8:57 @.>; @.**@.>; 主题: Re: [xuperchain/xupercore] @.***提交只读跨链的实现,和3.10版本实现的方式一致 (PR #289)

@preminem commented on this pull request.

In kernel/contract/sandbox/cross_query_cache.go: > +} + +type queryRes struct { + queryRes pb.CrossQueryResponse + signs pb.SignatureInfo +} + +// NewCrossQueryCache return CrossQuery instance while preexec +func NewCrossQueryCache() CrossQueryCache { + return &CrossQueryCache{ + isPenetrate: true, + } +} + +// NewCrossQueryCacheWithData return CrossQuery instance while posttx +func NewCrossQueryCacheWithData(crossQueries []pb.CrossQueryInfo) *CrossQueryCache {
感谢您的贡献😄 在只读跨链时的post tx阶段,只需要通过缓存验证,而无需再次发起网络请求,好像没有看到对应代码实现

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

preminem commented 2 years ago

可以问下 只读跨链时的post tx阶段,只需要通过缓存验证,而无需再次发起网络请求 这部分代码在v3.10或者三点多的版本  哪里有实现么,参考一下。 ------------------ 原始邮件 ------------------ 发件人: "xuperchain/xupercore" @.>; 发送时间: 2021年11月15日(星期一) 晚上8:57 @.>; @.**@.>; 主题: Re: [xuperchain/xupercore] @.**提交只读跨链的实现,和3.10版本实现的方式一致 (PR #289) @preminem commented on this pull request. In kernel/contract/sandbox/cross_query_cache.go: > +} + +type queryRes struct { + queryRes pb.CrossQueryResponse + signs pb.SignatureInfo +} + +// NewCrossQueryCache return CrossQuery instance while preexec +func NewCrossQueryCache() CrossQueryCache { + return &CrossQueryCache{ + isPenetrate: true, + } +} + +// NewCrossQueryCacheWithData return CrossQuery instance while posttx +func NewCrossQueryCacheWithData(crossQueries []pb.CrossQueryInfo) CrossQueryCache { 感谢您的贡献😄 在只读跨链时的post tx阶段,只需要通过缓存验证,而无需再次发起网络请求,好像没有看到对应代码实现 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

可以参考3.11 分支,NewCrossQueryCacheWithData是在什么情形下被引用的。