-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
目前 executor.proto 中CallRequest定义如下:
message CallRequest {
// 1. length is 20 bytes for evm.
// 2. if executor is multi-vm, it will be a path.
bytes to = 1;
bytes from = 2;
// 4 bytes for evm.
bytes method = 3;
repeated bytes args = 4;
}
executor的具体实现开发者认为,这里的method和args合并为一个bytes即可。
因为不管是evm还是chaincode,都有自己的定义的结构来描述method和args,所以现在实现是在客户端直接进行序列化。
按照现有CallRequest定义传递,executor需要做额外的封装工作。
统一CallRequest的好处是,客户端就不需要感知具体的executor实现,可以实现一个统一的SDK。
但是现在的问题是,有些处理必须在客户端做,executor没法代劳。比如,chain code在执行query操作的时候,也是要对call data做签名的。这里涉及到不同executor实现设计上的差异。
要想实现统一接口,统一的SDK,需要先把不同executor实现的差异抹平,否则executor.proto这里就只能透传。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels