May org.json.JSONObject used in org.hyperledger.fabric.contract.execution.JSONTransactionSerializer lead submit payloads not matching?
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu với org.hyperledger.fabric.contract.execution.JSONTransactionSerializer và lệnh gọi GatewayClient.endorse được hiển thị trong stack trace. Tái hiện lỗi không khớp endorsement bằng cách sử dụng kiểu trả về generic Response và các định nghĩa Asset và giao diện contract được cung cấp. Hoàn thành khi xác định được các kiểu trả về generic có được hỗ trợ hay không và ghi lại hoặc sửa hành vi đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When I call a submit method from application via gateway, I received an Exception below.
Caused by: org.hyperledger.fabric.client.EndorseException: io.grpc.StatusRuntimeException: ABORTED: failed to collect enough transaction endorsements, see attached details for more info
at org.hyperledger.fabric.client.GatewayClient.endorse(GatewayClient.java:74)
at org.hyperledger.fabric.client.ProposalImpl.endorse(ProposalImpl.java:76)
at org.hyperledger.fabric.client.Proposal.endorse(Proposal.java:64)
at pers.u8f23.fabric.app.api.AbstractAssetContractSubmit.createAsset(AbstractAssetContractSubmit.java:13)
at pers.u8f23.fabric.app.Main.chaincodeOperations(Main.java:84)
at pers.u8f23.fabric.app.Main.main(Main.java:65)
Caused by: io.grpc.StatusRuntimeException: ABORTED: failed to collect enough transaction endorsements, see attached details for more info
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:268)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:249)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:167)
at org.hyperledger.fabric.protos.gateway.GatewayGrpc$GatewayBlockingStub.endorse(GatewayGrpc.java:455)
at org.hyperledger.fabric.client.GatewayClient.endorse(GatewayClient.java:72)
... 5 more
Detail message attached to this Exception is ProposalResponsePayloads do not match.
Returned type is a generic class. Both the generic type and the type argument are defined as type in fabric demo .
public interface AbstractAssetContractSubmit {
Response<Asset> createAsset(Context context, String value);
Response<Void> deleteAsset(Context context, String assetId);
Response<Void> updateAsset(Context context, String assetId, String value);
}
@DataType
public final class Response<T> {
@Property
private final T body;
@Property
private final int code;
@Property
private final String msg;
public Response(@JsonProperty("body") T body, @JsonProperty("code") int code,
@JsonProperty("msg") String msg) {
this.body = body;
this.code = code;
this.msg = msg;
}
public T getBody() {
return this.body;
}
public int getCode() {
return this.code;
}
public String getMsg() {
return this.msg;
}
}
@DataType
public final class Asset {
@Property
private final String id;
@Property
private final String creatorId;
@Property
private final String ownerId;
@Property
private final long createTime;
@Property
private final long lastTransferTime;
@Property
private final long lastUpdateTime;
@Property
private final String assetValue;
public Asset(@JsonProperty("id") String id, @JsonProperty("creatorId") String creatorId,
@JsonProperty("ownerId") String ownerId, @JsonProperty("createTime") long createTime,
@JsonProperty("lastTransferTime") long lastTransferTime,
@JsonProperty("lastUpdateTime") long lastUpdateTime,
@JsonProperty("assetValue") String assetValue) {
this.id = id;
this.creatorId = creatorId;
this.ownerId = ownerId;
this.createTime = createTime;
this.lastTransferTime = lastTransferTime;
this.lastUpdateTime = lastUpdateTime;
this.assetValue = assetValue;
}
public String getId() {
return this.id;
}
public String getCreatorId() {
return this.creatorId;
}
public String getOwnerId() {
return this.ownerId;
}
public long getCreateTime() {
return this.createTime;
}
public long getLastTransferTime() {
return this.lastTransferTime;
}
public long getLastUpdateTime() {
return this.lastUpdateTime;
}
public String getAssetValue() {
return this.assetValue;
}
}
Does this chaincode api support java generic type as method return type?
Anyone is welcome to answer this question.
- Ngôn ngữ chính
- Java
- Star
- 322
- Fork
- 210
- Merge trung bình
- 15 giờ 16 phút
- Pull request đã merge (30 ngày)
- 29
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperledger/fabric-chaincode-java
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
hyperledger/fabric-chaincode-java#628 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Optimize ClassGraph ScanningĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
hyperledger/fabric-chaincode-java#627 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DataType nested classĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
hyperledger/fabric-chaincode-java#626 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
External Chaincode Mutual TLSĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
hyperledger/fabric-chaincode-java#625 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Read/write batchingCó thể làm lại được @jadebluestar đã nhận 117 ngày trước và không có pull request nào đang mở. Đang mởenhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
hyperledger/fabric-chaincode-java#378 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hyperledger/fabric-chaincode-java
Issue tương tự
-
human-required sync-failed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Azure/osdu-spi-file#63 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
frontend quick win
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
CodeForPhilly/benefit-decision-toolkit#571 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
approved
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
checkstyle/checkstyle#22129 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add Hardcharger JDBC driverCó thể đã có người làm @prmoore77 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày