Skip to content

feat(drive-abci)!: remove unnecessary validation from check tx and re-check #1647

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 13 commits into from
Jan 5, 2024

Conversation

QuantumExplorer
Copy link
Member

Issue being fixed or feature implemented

Check tx used to have a pretty expensive validation. It wasn't always needed, especially on rechecks.

What was done?

While still verify some parts of state (for example the identity balance, or the fact that the asset lock hasn't been used), we no longer verify all parts of the state.

How Has This Been Tested?

Untested for now.

Breaking Changes

Because Check-tx is changing this can be considered a breaking change. It most likely would not break testnet however.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

Let's use v1.0-dev as base branch since it's a breaking change

@QuantumExplorer QuantumExplorer changed the base branch from master to v1.0-dev December 29, 2023 11:31
@shumkov shumkov changed the title feat(drive-abci)!: improved check tx feat(drive-abci)!: remove unnecessary validation from check tx and re-check Jan 4, 2024
use crate::execution::validation::state_transition::common::asset_lock::proof::verify_is_not_spent::AssetLockProofVerifyIsNotSpent;

// TODO: Versioning
impl AssetLockProofValidation for ChainAssetLockProof {
Copy link
Member

Choose a reason for hiding this comment

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

Implement versioning

use crate::execution::validation::state_transition::common::asset_lock::proof::verify_is_not_spent::AssetLockProofVerifyIsNotSpent;

// TODO: Versioning
impl AssetLockProofValidation for InstantAssetLockProof {
Copy link
Member

Choose a reason for hiding this comment

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

Implement versioning

impl AssetLockProofStateValidation for InstantAssetLockProof {
fn validate_state<C: CoreRPCLike>(
impl AssetLockProofVerifyIsNotSpent for InstantAssetLockProof {
fn verify_is_not_spent<C>(
Copy link
Member

Choose a reason for hiding this comment

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

Versioning

Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

Cool 👍

@QuantumExplorer QuantumExplorer merged commit c47aed4 into v1.0-dev Jan 5, 2024
@QuantumExplorer QuantumExplorer deleted the feat/improvedCheckTx branch January 5, 2024 17: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