May org.json.JSONObject used in org.hyperledger.fabric.contract.execution.JSONTransactionSerializer lead submit payloads not matching?
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Bug
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- java
- Domínio
- backend-api-design
Direção de pesquisa
Comece com org.hyperledger.fabric.contract.execution.JSONTransactionSerializer e a chamada GatewayClient.endorse mostrada no stack trace. Reproduza a incompatibilidade de endorsement usando o tipo de retorno genérico Response e as definições fornecidas de Asset e da interface do contrato. Considera-se concluído quando for estabelecido se tipos de retorno genéricos são compatíveis e o comportamento for documentado ou corrigido.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 322
- Forks
- 210
- Merge médio
- 15h 16min
- PRs com merge (30d)
- 29
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de hyperledger/fabric-chaincode-java
-
enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
hyperledger/fabric-chaincode-java#628 ·
Mantenedores costumam responder em até 1 dia
-
Optimize ClassGraph ScanningAbertaenhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
hyperledger/fabric-chaincode-java#627 ·
Mantenedores costumam responder em até 1 dia
-
DataType nested classAbertabug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 75/100
hyperledger/fabric-chaincode-java#626 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
hyperledger/fabric-chaincode-java#625 ·
Mantenedores costumam responder em até 1 dia
-
Read/write batchingTalvez livre de novo @jadebluestar assumiu há 119 dias e não há nenhum pull request aberto. Abertaenhancement help wanted
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
hyperledger/fabric-chaincode-java#378 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de hyperledger/fabric-chaincode-java
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
adorsys/keycloak-config-cli#1709 ·
Mantenedores costumam responder em até 1 dia
-
! and-bugs
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
osmandapp/OsmAnd#26769 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
NationalSecurityAgency/ghidra#9997 · 2 comentários ·
Mantenedores costumam responder em até 2 dias
-
[Bug] DefaultSerializationExceptionWrapper does not implement Cleanable, so cleanup() is never invoked by codecsTalvez já em andamento @binbin0325 assumiu hoje. Abertacomponent/need-triage type/need-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
fix: tagged PDF fails with ClassCastException when a Form and its Image share an XObject nameTalvez já em andamento @hnc-jglee assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
opendataloader-project/opendataloader-pdf#830 ·
Mantenedores costumam responder em até 1 dia