Add ledger_id to entity info responses #159
Replies: 5 comments 1 reply
-
@tinker-michaelj we would like to get your feedback on how we would handle the ledger_id for a custom network. A custom network would be something that users would spin up locally. @DSMatusevich suggestion was the following: cc: @DSMatusevich |
Beta Was this translation helpful? Give feedback.
-
Why |
Beta Was this translation helpful? Give feedback.
-
The ledger ID will be a byte array (so it’s of type “bytes”).
For the current HIP defining checksums, the byte array is a single byte. In
the near future, it will change to be 48 bytes (a SHA-384 hash), but may
expand to slightly longer in the near future.
The ledger ID can’t be a simple integer, because it is the root of the
state proof. So it needs to be large enough to hold a hash or public key
that can provide trust in the state proof.
…On Fri, Oct 15, 2021 at 12:27 PM SimiHunjan ***@***.***> wrote:
Thank you for your question @bugbytesinc <https://github.com/bugbytesinc>!
This was specified by @lbaird <https://github.com/lbaird> as it has to do
with state proofs. State proofs I believe will contain the ledger_id and
it will be 48 bytes. @lbaird <https://github.com/lbaird> might be able to
help further clarify here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#159 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDBYW3A736FCAGLSJOOEPDUHBQBDANCNFSM5F3ZFHFQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
So there is one root of the state proof per ledger? Are those values know already? Does that mean previewnet will frequently change it's value? |
Beta Was this translation helpful? Give feedback.
-
There is one per ledger. Previewnet can keep a constant ledger ID. Or it
could change with each reset. I think it’s simplest for users if we keep it
unchanged through all updates.
…On Fri, Oct 15, 2021 at 4:36 PM Danno Ferrin ***@***.***> wrote:
So there is one root of the state proof per ledger? Are those values know
already? Does that mean previewnet will frequently change it's value?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#159 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDBYWYF6EIZVDQZCSXAOF3UHCNEVANCNFSM5F3ZFHFQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
Abstract
Proposal to add a network ID field to info responses for all entities.
Motivation
In the Hedera Transaction Tool application, users will have the ability to request account infos for accounts on previewnet, testnet, mainnet or a custom network.
You can then take the response, write it to a file, and distribute that file for others to update that account's information.
Since you can request account infos from multiple different networks you can't tell which network the response came from the file the response is stored in unless the user who requested it forwards that information to the other users.
Rationale
To solve this issue, we think it would make sense for all enitity info responses to include a
ledger_id
field where00
= represents mainnet,01
represents testnet, and02
represents previewnet. Custom networks will be represented by an integer that can be calculated from the node IPs.User Stories
As a developer I want to know which network the info response came from when the response information is written to a file that is then shared with other users of the application.
Specification
HAPI Changes
Accounts
Tokens
Topics
Files
Smart Contracts
Schedule
Backwards Compatibility
This change should be backwards compatible as it returns an extra field in a response, but does not modify an existing field.
Security Implications
N/A
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