This repository was archived by the owner on Mar 14, 2025. It is now read-only.
Do not reject entire observations based on gas or token price#930
Merged
matYang merged 6 commits intoccip-developfrom Jun 3, 2024
Merged
Do not reject entire observations based on gas or token price#930matYang merged 6 commits intoccip-developfrom
matYang merged 6 commits intoccip-developfrom
Conversation
dimkouv
approved these changes
Jun 3, 2024
matYang
added a commit
that referenced
this pull request
Jun 3, 2024
## Motivation Removal of static token price changes a node’s view of destTokens. The prices reported by nodes that accepted new job specs will contain fewer tokens than the prices reported by nodes that haven’t, each release will reject the observations from the other. ## Solution Do not reject entire observations based on price. Prices being valid in an observation does not increase trustworthiness of its interval. Instead, we can reject a token if len(not_nil(obs[token])l) < f + 1. Reasons: 1. If len(not_nil(obs[token])) >= f + 1, then [1, f+1] honest node has included the token, therefore we know this is a legit token 2. Knowing this is a legit token, taking the median of prices aggregated from 2f+1 obs is sufficient to guard against f faults. 3. Validation cannot require more than f + 1 obs, that’d allow <f faulty nodes to halt price reporting for the token --------- Co-authored-by: Rens Rooimans <github@rensrooimans.nl>
asoliman92
pushed a commit
that referenced
this pull request
Jul 31, 2024
## Motivation Removal of static token price changes a node’s view of destTokens. The prices reported by nodes that accepted new job specs will contain fewer tokens than the prices reported by nodes that haven’t, each release will reject the observations from the other. ## Solution Do not reject entire observations based on price. Prices being valid in an observation does not increase trustworthiness of its interval. Instead, we can reject a token if len(not_nil(obs[token])l) < f + 1. Reasons: 1. If len(not_nil(obs[token])) >= f + 1, then [1, f+1] honest node has included the token, therefore we know this is a legit token 2. Knowing this is a legit token, taking the median of prices aggregated from 2f+1 obs is sufficient to guard against f faults. 3. Validation cannot require more than f + 1 obs, that’d allow <f faulty nodes to halt price reporting for the token --------- Co-authored-by: Rens Rooimans <github@rensrooimans.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Removal of static token price changes a node’s view of destTokens. The prices reported by nodes that accepted new job specs will contain fewer tokens than the prices reported by nodes that haven’t, each release will reject the observations from the other.
Solution
Do not reject entire observations based on price. Prices being valid in an observation does not increase trustworthiness of its interval.
Instead, we can reject a token if len(not_nil(obs[token])l) < f + 1.
Reasons: