-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Exception in thread "main" java.lang.RuntimeException: io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: gRPC message exceeds maximum size 4194304: 31371419
at com.baidu.xuper.api.Proposal.build(Proposal.java:193)
at com.baidu.xuper.api.XuperClient.invokeContract(XuperClient.java:140)
at com.baidu.xuper.api.XuperClient.deployContract(XuperClient.java:220)
at com.baidu.xuper.api.XuperClient.deployNativeContract(XuperClient.java:184)
at Main.main(Main.java:26)
Caused by: io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: gRPC message exceeds maximum size 4194304: 31371419
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:262)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:243)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:156)
at com.baidu.xuper.pb.XchainGrpc$XchainBlockingStub.preExecWithSelectUTXO(XchainGrpc.java:1787)
at com.baidu.xuper.api.Proposal.build(Proposal.java:187)
... 4 more
==========================
code:
XuperClient client = new XuperClient("192.168.3.130:37101");
Account account1 = Account.getAccountFromPlainFile("src/main/java/keys");
account1.setContractAccount("XC1111111111111111@xuper");
System.out.println(account1.getAddress());
Map<String, byte[]> arg = new HashMap<>();
arg.put("creator", "123".getBytes());
String codePath = "src/main/java/counter";
byte[] code = Files.readAllBytes(Paths.get(codePath));
Transaction tx = client.deployNativeContract(account1, code, "counter", "go", arg);
System.out.println(tx.getTxid());
==========================
报错如上,如何修改限制,cli部署正常。