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

fix(core): use compact inputs for block propagation #4714

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Sep 21, 2022

Description

  • Send compact inputs when the full block is requested
  • Only load full inputs when required

Motivation and Context

Full blocks are requested if any transactions are missing. This PR reduces the size of those full blocks.
This also improves slightly optimizes block sync by removing the need to load inputs for blocks that are being sent.

How Has This Been Tested?

Modified existing rust integration test to include a single transaction, forcing reconcile block to request the full block and testing the fetching of full inputs from the local db.

@sdbondi sdbondi force-pushed the core-propagation-uses-compact-inputs branch from c48dd07 to de51404 Compare September 21, 2022 10:56
@sdbondi sdbondi force-pushed the core-propagation-uses-compact-inputs branch from de51404 to 1ae8446 Compare September 21, 2022 11:28
Copy link
Collaborator

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

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

Seems fine, other than the one panic

base_layer/core/src/chain_storage/db_transaction.rs Outdated Show resolved Hide resolved
@stringhandler stringhandler added the P-controversial Process - This PR or Issue is controversial and/or requires more attention that simpler issues label Sep 26, 2022
@stringhandler stringhandler merged commit c659275 into tari-project:development Sep 27, 2022
sdbondi added a commit to sdbondi/tari that referenced this pull request Sep 29, 2022
…re-dan

* network-dependent-grpc-ports:
  feat: different default grpc ports for different networks
  fix(clients): fix tari nodejs client proto paths (tari-project#4743)
  chore: disallow onion v2 (tari-project#4745)
  feat: change priority in mempool to take into account age (tari-project#4737)
  feat: trigger mempool sync on lag (tari-project#4730)
  fix(core): use compact inputs for block propagation (tari-project#4714)
  ci: deny dbg macro (tari-project#4740)
sdbondi added a commit to sdbondi/tari that referenced this pull request Oct 3, 2022
* development:
  v0.38.5
  feat: different default grpc ports for different networks (tari-project#4755)
  fix(core): broken doctests (tari-project#4763)
  ci: fix coverage job
  ci: run coverage on prs (tari-project#4738)
  fix(comms): fixes edge case where online status event does not get published (tari-project#4756)
  fix(dht/encryption): greatly reduce heap allocations for encrypted messaging (tari-project#4753)
  docs: explain the emission curve parameters (tari-project#4750)
  fix(comms/peer_manager): add migration to remove onionv2 addresses (tari-project#4748)
  fix(ci): add cargo cache, reduce Ubuntu dependencies and action on pull_request (tari-project#4757)
  feat(tariscript): adds ToRistrettoPoint op-code (tari-project#4749)
  fix: cli wallet cucumber (tari-project#4739)
  fix(clients): fix tari nodejs client proto paths (tari-project#4743)
  chore: disallow onion v2 (tari-project#4745)
  feat: change priority in mempool to take into account age (tari-project#4737)
  feat: trigger mempool sync on lag (tari-project#4730)
  fix(core): use compact inputs for block propagation (tari-project#4714)
  ci: deny dbg macro (tari-project#4740)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-controversial Process - This PR or Issue is controversial and/or requires more attention that simpler issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants