Skip to content

Conversation

@cctdaniel
Copy link
Contributor

@cctdaniel cctdaniel commented Feb 15, 2024

add configurable max latency in slots between send and receive

for price feeds with more publishers this can be reduced instead of using the default 25 value to reduce latency

uint8_t min_pub_; // min publishers for valid price
int8_t drv2_; // space for future derived values
int16_t drv3_; // space for future derived values
int8_t message_sent_; // flag to indicate if the current aggregate price has been sent as a message to the message buffer, 0 if not sent, 1 if sent
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by: this was already changed in the rust program previously but wasn't changed here

int8_t drv2_; // space for future derived values
int16_t drv3_; // space for future derived values
int8_t message_sent_; // flag to indicate if the current aggregate price has been sent as a message to the message buffer, 0 if not sent, 1 if sent
uint8_t max_latency_; // configurable max latency in slots between send and receive
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we only need uint8_t for max_latency_ so splitting it to uint8_t and int8_t

@cctdaniel cctdaniel marked this pull request as ready for review February 19, 2024 11:24
@cctdaniel cctdaniel changed the title add initial code to support max latency add code to support max latency Feb 19, 2024
@cctdaniel cctdaniel changed the title add code to support max latency add support to configure max latency Feb 19, 2024
Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! I will look again after you addressed the feedbacks (just to be extra careful).

guibescos
guibescos previously approved these changes Feb 20, 2024
guibescos
guibescos previously approved these changes Feb 20, 2024
Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I left some minor comments.

ali-behjati
ali-behjati previously approved these changes Feb 21, 2024
Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I left some minor comments.

@cctdaniel cctdaniel merged commit 854c72e into main Feb 23, 2024
@cctdaniel cctdaniel deleted the max-latency branch February 23, 2024 07:56
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.

4 participants