-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPC - Bugs, missing methods, inconsistencies #229
Comments
I'll work on this. Most of it seems easy to fix. (Sorry for accidentally closing it :D) the blockByNumber only accepting strings is certainly a bug, but it stems from the fact that core-js's
I don't like the naming scheme too much. I'd rather call the methods |
Yes, the argument |
@jgraef For the |
Here's the branch where I'm working on this: https://github.com/nimiq/core-rs-albatross/tree/janosch/rpc Since this is needed for going further with the testnet, this is high priority, right? |
Unsubscribing to a stream is another missing feature in nimiq-jsonrpc: nimiq/jsonrpc#2 |
The unsubscribe functionality is enabled now: nimiq/jsonrpc@41d26fc The stream is also closed in the server when the websocket is closed, so that is also fixed but this uncovers a bug in the observer when following blocks since we keep sending blocks to a receiver that no longer exists. |
Closing PR was reverted. |
Re-merged. |
This is a collection issue for bugs, missing methods and inconsistencies I found when testing the RPC server:
blockByNumber
does not accept anumber
as the first argument, only stringified numbersblockByNumber
andblockByHash
require a second argument (include transactions: bool
) - I think this should be optional and default tofalse
blockByNumber/Hash
vsgetTransactionByHash
- makeget
prefix consistent (either with or without)getAccount
with the staking contract address:thread 'tokio-runtime-worker' panicked at 'Failed to serialize return value: Error("the enum variant Account::Staking cannot be serialized", line: 0, column: 0)': /usr/local/cargo/git/checkouts/jsonrpc-9fb05bf7e43ac4a6/1d17aa2/nimiq-jsonrpc-server/src/lib.rs:513
consensus
statepeerCount
,peerList
,peerState <peerId>
log
levelconstant
svalidatorKey
,validatorId
minFeePerByte
unsubscribe
from subscriptionsmempool
methods throw "not implemented" errorcamelCase
andsnake_case
within the same object (example:Block { blockNumber, extra_data, parentHash, parent_election_hash }
getAccount
are returned with the account type as a property instead of a value:{"Basic":{"balance":168157712802}}
- the type should rather be the value of atype
propertythread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()on an
Errvalue: UnlockedWalletNotFound(Address("8314ae0f9e42e6d872c0bc07b09e2a278b1dfbae"))': rpc-server/src/dispatchers/consensus.rs:124
getTransactionByHash
,getTransactionReceipt
not implementedvalidityStartHeight
argument. I think this should be optional and default to the current head heightvalidityStartHeight
argument for transaction creation/sending methods does not accept numbers, only stringified numbersERROR nimiq_jsonrpc_server | Queue error: channel closed
soeren/rpc
branch)The text was updated successfully, but these errors were encountered: