You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I called the gRPC API createShieldedContractParameters with above PrivateShieldedTRC20Parameters. I found the fullnode throws error stack in tron.log:
11:08:59.477 ERROR [rpc-full-executor-1] [API](RpcApiService.java:2485) createShieldedContractParameters:
java.lang.IllegalArgumentException: Input too short: 0
at org.tron.common.utils.Bech32.decode(Bech32.java:149)
at org.tron.core.zen.address.KeyIo.decodePaymentAddress(KeyIo.java:33)
at org.tron.core.Wallet.buildShieldedTRC20Output(Wallet.java:3467)
at org.tron.core.Wallet.createShieldedContractParameters(Wallet.java:3536)
at org.tron.core.Wallet$$FastClassBySpringCGLIB$$3f6b5781.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
at org.tron.common.prometheus.MetricAspect.walletAroundAdvice(MetricAspect.java:43)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
at org.tron.core.Wallet$$EnhancerBySpringCGLIB$$476d52c3.createShieldedContractParameters(<generated>)
at org.tron.core.services.RpcApiService$WalletApi.createShieldedContractParameters(RpcApiService.java:2477)
at org.tron.api.WalletGrpc$MethodHandlers.invoke(WalletGrpc.java:11234)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:182)
at io.grpc.PartialForwardingServerCallListener.onHalfClose(PartialForwardingServerCallListener.java:35)
at io.grpc.ForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:23)
at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:40)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:355)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:867)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
It was an uncaught exception. This interface should deal with it elegantly.
Therefore, I tried with the HTTP API wallet/createshieldedcontractparameters using the same parameter:
This issue is caused by your "payment_address":"". According to the java-tron logic, it must contain between 8 to 90 characters. However, your suggestion is very good; it would be better to output a detailed error reason.
Software Versions
OS : Linux
JVM : Oracle Corporation 1.8.0_161 amd64
Version : 4.7.4
Code : 18306
Expected behavior
The gRPC API of the wallet should specify the root cause when request failed, not the error log stack.
Actual behavior
I was running a fullnode on Nile, and constructed
PrivateShieldedTRC20Parameters
with the following values in my program:Then I called the gRPC API
createShieldedContractParameters
with abovePrivateShieldedTRC20Parameters
. I found the fullnode throws error stack in tron.log:It was an uncaught exception. This interface should deal with it elegantly.
Therefore, I tried with the HTTP API
wallet/createshieldedcontractparameters
using the same parameter:I got the following result:
but the log didn’t show any error. It’s more elegant.
Frequency
I can repeat it certainly using the gRPC API.
Backtrace
When submitting logs: please submit them in text, not screenshots.
The text was updated successfully, but these errors were encountered: