mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2026-03-01 04:28:51 +00:00
RPC server confuses when logs RPC parameters #1426
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U3
U3
U4
blocked
bug
bug
cli
compiler
config
config
consensus
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
neotest
network
oracle
performance
question
rpc
security
smartcontract
task
task
task
test
vm
wallet
windows
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neo-go#1426
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @carpawell on GitHub (Nov 20, 2024).
At some point, you start to check logs to find errors and then you see some strange things that lead you to non-existent bugs...
Current Behavior
I saw
processing rpc request {"method": "subscribe", "params": "[transaction_executed ]"}but I am sure it worked ok and params (aftertransaction_executed) were not an empty string.Expected Behavior
I could see some string representation of the parameters I sent. It must have one, this was a JSON part at some step.
Possible Solution
I don't know.
Steps to Reproduce
Call some test like
nspcc-dev/neo-go@57eec71101/pkg/services/rpcsrv/subscription_test.go (L203-L209)and see that it passes but printed logs are confusing.Context
Debugging subscription problems may lead to some not-needed deep research for nothing.
Regression
I guess no, @AnnaShaleva said it was kinda ok for years.
Your Environment
v0.106.3
@roman-khimov commented on GitHub (Nov 20, 2024):
We can't log all parameters in their full length, but something can be improved here, because
Param.String()is not a regular stringer interface, it's used for string extraction from parameters and not everything is a string. I'd say it's a misuse of "String()" name for a different method.@AnnaShaleva commented on GitHub (Jul 8, 2025):
Long arguments should be cropped to log only first 60 bytes of the argument.