Network Settings Free Query #399
DSMatusevich
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Abstract
Proposal to add a new free query that returns the current network settings.
Motivation
When a network is deployed, several of its key attributes are kept in a properties file. These properties are set by the network operators. Different networks may have slightly different attributes.
For example, one such attribute,
ledger.id
is set to be0
on Mainnet,1
on Testnet and2
on Previewnet. Other than performing an account info query, or some other paid query, there is no way for an user to find out what, if any is the ledger id of the network.Another example is the
ledger.autoRenewPeriod.maxDuration
. In this case, no query (paid or otherwise) is available to the user to find out if an account's auto renew period is within the accepted limits.Applications that interact with the network need access to these and other parameters, in order to properly build queries and transactions, which will have less chances of being rejected by the network as invalid.
Rationale
To solve this issue, we think that it would make sense for the services to add a new query, whose response contains those properties that the user might need in order to create valid transactions, and to properly interpret the responses. Furthermore, we believe that this query should be free to the user, since it would be describing critical parameters for his application.
User stories
As a developer, I want to know what parameters are used by the network to decide if my transactions and queries are valid. I would like to periodically query the network for these parameters in order to make sure that no changes have happened that might make my tool to fail to create valid transactions.
Specification
The list of properties that should be released as part of the response to the query:
Backwards Compatibility
Since this is a new query, there should be no backwards compatibility issues.
Security Implications
As with any free query, this leaves the door open for DDOS attacks. This might be mitigated in the same manner other free queries are handled.
How to Teach This
Reference Implementation
N/A
Rejected Ideas
N/A
Open Issues
References
Copyright/license
This document is licensed under the Apache License, Version 2.0 -- see LICENSE or (https://www.apache.org/licenses/LICENSE-2.0)
Beta Was this translation helpful? Give feedback.
All reactions