Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Proposal getNetworkProperties #54

Merged
merged 9 commits into from
Mar 2, 2020
Merged

Proposal getNetworkProperties #54

merged 9 commits into from
Mar 2, 2020

Conversation

dgarcia360
Copy link
Contributor

@dgarcia360 dgarcia360 commented Dec 9, 2019

Suggestion for symbol/catapult-rest#64

Note for SDK devs: Do not implement until REST devs confirm that adding this endpoint is feasible.

@dgarcia360 dgarcia360 added the enhancement New feature or request label Dec 9, 2019
@dgarcia360 dgarcia360 changed the title Added getNetworkProperties Proposal getNetworkProperties Dec 19, 2019
@fboucquez
Copy link
Contributor

fboucquez commented Jan 23, 2020

Should we add the currency and harvesting name?

https://nem2.slack.com/archives/GMUA2SD7E/p1579793932004300

@dgarcia360
Copy link
Contributor Author

dgarcia360 commented Feb 27, 2020

@Vektrat The current implementation formats mosaic ids differently to other endpoints:

Example:

  • /network/properties

currencyMosaicId: "0x621E'C5B4'0385'6FC2"

  • /account/:accountId

id : "621EC5B403856FC2"

I believe that SDKs devs would appreciate if the currencyMosaicId could be parsed to the standard format.

@dgarcia360
Copy link
Contributor Author

@fboucquez I'd not add aliases info to this endpoint. Note that /network/properties is just dumping the contents from a file without doing any extra verification. You could add manually to your node any additional info you want to display, e.g. alias, although it's not recommended to edit the file.

Secondly, another reason not to add it by default is that using the mosaic id is enough to issue all kind of transactions, and does not generate extra receipts. If needed, the alias can still be retrieved by asking it to REST with a second call.

Finally, note that the network / harvest mosaic does not require to be aliased to make the network operative. Some networks could even decide to disable the alias plugin from their networks completely.

@Vektrat
Copy link
Contributor

Vektrat commented Feb 27, 2020

@Vektrat The current implementation formats mosaic ids differently to other endpoints:

Example:

* **/network/properties**

currencyMosaicId: "0x621E'C5B4'0385'6FC2"

* **/account/:accountId**

id : "621EC5B403856FC2"

I believe that SDKs devs would appreciate if the currencyMosaicId could be parsed to the standard format.

sadly we are outputting a config file here, which was probably filled by a human, it's one of the caveats of having to fetch a file and show it as is, instead of accessing some kind of endpoint that provides this information to the REST server

i'd leave it as it is now to avoid having a layer of specific parsing, the same happens with values such as 10'000 and 3650d which in my opinion are worse than the mosaicId one

anyway will this endpoint be used by SDKs? i expected this to be used by more specific applications that would access the REST directly (like the fees)

@dgarcia360 dgarcia360 merged commit 9a80afe into master Mar 2, 2020
@dgarcia360 dgarcia360 deleted the getNetworkProperties branch March 2, 2020 15:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants