Skip to content

Related ops checks #355

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

Merged
merged 5 commits into from
Nov 23, 2021
Merged

Conversation

ash-krishnan
Copy link
Contributor

Fixes # .

Motivation

Currently we don't flag an asset if it doesn't have related operations implemented. Implementing related operations is optional, we only need it to be implemented if we have multiple outputs or we don't distinguish between sends/receives. In that case, ChainIO will break because it uses related operations to enforce a DAG structure on the operations.

Solution

Make related operations support configurable. If a related_operations_enabled is set to true in validator file, then throw error if related operations key doesn't exist. Otherwise, just print warning.

Open questions

@ash-krishnan ash-krishnan mentioned this pull request Nov 16, 2021
Payment *ValidationOperation `json:"payment"`
Fee *ValidationOperation `json:"fee"`
Enabled bool `json:"enabled"`
RelatedOps bool `json:"related_ops"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we rename it something like related_op_present or related_op_exists? or something which sounds more like a boolean? just RelatedOps is not clear of what that param is.

@shrimalmadhur
Copy link
Contributor

You might want to run make gen locally to format and lint things.

@shrimalmadhur shrimalmadhur merged commit 14f98c8 into coinbase:master Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants