xupercore icon indicating copy to clipboard operation
xupercore copied to clipboard

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

Open springrain opened this issue 4 years ago • 2 comments

Description

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

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [ ] New feature (non-breaking change which adds functionality)

Brief of your solution

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

How Has This Been Tested?

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

springrain avatar Nov 15 '21 06:11 springrain

可以问下 只读跨链时的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.

CodeCmn avatar Nov 16 '21 06:11 CodeCmn

可以问下 只读跨链时的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是在什么情形下被引用的。

preminem avatar Nov 16 '21 07:11 preminem