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

MERC-6003 Add Mercury v4 schema #73

Merged
merged 3 commits into from
Aug 1, 2024
Merged

MERC-6003 Add Mercury v4 schema #73

merged 3 commits into from
Aug 1, 2024

Conversation

martin-cll
Copy link
Contributor

@martin-cll martin-cll commented Jul 16, 2024

Based off Mercury v3 schema with the addition of the market status field. The market status field is an enum which is represented as a uint32 here. This is the most compact width for both Protobuf and Ethereum ABI (uint8 is padded to 32 bytes).

The aggregation function for this field is to take the status which appears most often (i.e. the mode), provided it appears at least F+1 times. If the mode appears less than F+1 times, then an error is returned.

Note: this depends on corresponding changes in the chainlink-common repo. I'll update this PR with the appropriate version number once the chainlink-common changes are in: smartcontractkit/chainlink-common#671

samsondav
samsondav previously approved these changes Jul 16, 2024
Copy link
Contributor

@samsondav samsondav left a comment

Choose a reason for hiding this comment

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

LGTM well done Martin, just one minor comment

mercury/aggregate_functions.go Outdated Show resolved Hide resolved
@martin-cll martin-cll changed the title Add Mercury v4 schema MERC-6003 Add Mercury v4 schema Jul 24, 2024
@samsondav samsondav merged commit fd75761 into master Aug 1, 2024
6 checks passed
@martin-cll martin-cll deleted the ml/mercury-feeds-v4 branch August 1, 2024 20:32
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.

2 participants