stacks-network / stacks-network/stacks-core

[Optimization] Improve efficiency of checking for contract existence prior to contract deploy

Open
#4,440 1 comment 0 reactions 1 assignee View on GitHub

@cylewitruk is already working on this.

Since Feb 28, 2024.

optimization Size: 🐭 XS (< 1 day) stale
Dominant language
Rust
Stars
3.1k
Forks
762
Avg merge
4d 6h
Merged PRs (30d)
76

Description

The current code in stackslib/src/chainstate/stacks/db/transactions.rs : ~1165 attempts to load the entire contract from the backing store just to check for the contract's existence. This can be optimized to use a method which ultimately uses an EXISTS query instead.

Related to #4428.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.