Skip to content
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

add get_current_pparams local state query #322

Merged

Conversation

falcucci
Copy link
Contributor

fixes #318

@falcucci falcucci changed the title add GetEpoch local state query w examples add GetCurrentPParams local state query w examples Oct 30, 2023
@falcucci falcucci changed the title add GetCurrentPParams local state query w examples add GetCurrentPParams local state query w examples Oct 30, 2023
@falcucci falcucci closed this Jan 3, 2024
@falcucci falcucci force-pushed the get-current-protocol-params-local-state-query branch from 332ead2 to d045701 Compare January 3, 2024 20:25
- rearranged the order of `preview_magic` and `pre_production_magic` in the import statement.
- refactored how the variable `addry` is instantiated for readability.
- added a function call to `queries_v16::get_current_pparams` in the `do_localstate_query` function.
- refactored the instantiation of the `client` variable in the `main` function for readability.
- in the `pallas-network` library, added the ability to encode and decode `rationalnumber` objects in relation to `minicbor`.
- extended the `miniprotocols` in the `pallas-network` library with multiple structs and types related to epochs, cost models, protocol versions, etc.
- implemented an asynchronous function `get_current_pparams` in the `miniprotocols` to get current protocol parameters.
@falcucci falcucci reopened this Jan 3, 2024
- imported `unitinterval` from `pallas_network::miniprotocols::localstate::queries_v16`
- added additional testing code for the server receiving a query from the client, including a check for the initial state of the query and sending the result of the query back to the client.
- the query includes a large number of protocol parameters updates such as `minfee_a`, `max_block_body_size`, `pool_pledge_influence`, `max_collateral_inputs`, etc.
- enhanced client-side testing code that sends a request and expects a series of `protocolparamupdate` in response from server
- the client now tests for and handles receiving protocol parameters updates similar to those sent by the server.
@falcucci falcucci changed the title add GetCurrentPParams local state query w examples add GetCurrentPParams local state query Jan 3, 2024
@falcucci falcucci marked this pull request as ready for review January 3, 2024 22:08
@falcucci
Copy link
Contributor Author

falcucci commented Jan 3, 2024

@scarmuega just to prepare the bedside, this is also ready for review

@falcucci falcucci changed the title add GetCurrentPParams local state query add get_current_pparams local state query Jan 3, 2024
@falcucci falcucci changed the title add get_current_pparams local state query add get_current_pparams local state query Jan 3, 2024
- rename struct `protocolparamupdate` to `protocolparam`
- update the usage of the renamed struct `protocolparam` in the `get_current_pparams` function
- adjust tests to reflect the renamed struct `protocolparam`
@scarmuega scarmuega merged commit 14e0809 into txpipe:main Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: implement GetCurrentPParams local state query
2 participants