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
The getAddress, getSigningKey, and getVotingKey RPC methods, defined in rpc-interface/src/validator.rs, return the following response when called on a full node without validator mode enabled:
In cURL: {"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found","data":"Method does not exist: getAddress"},"id":1}%
Via cargo run: Error: JSON-RPC protocol error: The server responded with an error: JSON-RPC error: code=-32601: Method not found - Caused by: "Method does not exist: getAddress"
The issue is for both the RPC client and the RPC interface.
Once validator mode is enabled, all methods return the expected responses.
The error message should indicate that the method is unavailable due to the node configuration rather than stating that it does not exist. A note will be added in the method descriptions to clarify that these methods are only available when validator mode is enabled, but the error messages must also be fixed
The text was updated successfully, but these errors were encountered:
The reason why Method not found is returned by the RPC server is because the ValidatorDispatcher (object containing the methods you are trying to call) is only added if the node that runs the RPC server is actually configured as a validator. In that sense the error message is correct because the RPC server will not find a match.
As discussed @ines-toupeira will add this as clarification to each method that requires the node to be a validator. This way it will show up in the RPC specification on the Developer Center.
The
getAddress
,getSigningKey
, andgetVotingKey
RPC methods, defined inrpc-interface/src/validator.rs
, return the following response when called on a full node without validator mode enabled:In cURL:
{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found","data":"Method does not exist: getAddress"},"id":1}%
Via
cargo run
:Error: JSON-RPC protocol error: The server responded with an error: JSON-RPC error: code=-32601: Method not found - Caused by: "Method does not exist: getAddress"
The issue is for both the RPC client and the RPC interface.
Once validator mode is enabled, all methods return the expected responses.
The error message should indicate that the method is unavailable due to the node configuration rather than stating that it does not exist. A note will be added in the method descriptions to clarify that these methods are only available when validator mode is enabled, but the error messages must also be fixed
The text was updated successfully, but these errors were encountered: