-
Notifications
You must be signed in to change notification settings - Fork 671
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
feat(rpc): add protocol config rpc endpoint #3919
Conversation
Co-authored-by: Bohdan Khorolets <b@khorolets.com>
/// Current Protocol Version | ||
pub protocol_version: ProtocolVersion, | ||
/// Official time of blockchain start. | ||
pub genesis_time: DateTime<Utc>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make sure that dates, u64
-like types (BlockHeight) are serialized as strings due to JSON numbers limitation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is. For example,
"genesis_time": "1970-01-01T00:00:00.000000000Z", |
Co-authored-by: Vlad Frolov <frolvlad@gmail.com>
@frol do you think we should deprecate |
@bowenwang1996 Good point. While the naming |
Well, on the second thought, it would not be sane to expose the latest protocol config under |
Thanks @frol ! |
Add `EXPERIMENTAL_protocol_config` rpc endpoint that returns the protocol config given some block, since protocol config can change after genesis due to protocol upgrades. This will allow users to get the up-to-date protocol-level configs. Fixes #3918. Test plan ---------- `test_protocol_config_rpc`
Just for the reference, near-api-js support is coming: near/near-api-js#508 |
Add
EXPERIMENTAL_protocol_config
rpc endpoint that returns the protocol config given some block, since protocol config can change after genesis due to protocol upgrades. This will allow users to get the up-to-date protocol-level configs. Fixes #3918.Test plan
test_protocol_config_rpc