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

feat!: global publish template, malleability fix, pub templates in wallet #1228

Merged

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Dec 26, 2024

Description

fix(transactions)!: fix transaction signatures malleability
feat(wallet): add support for publishing templates
feat(consensus): publish templates to all shards
feat(wallet): add UI for publishing templates
fix(consensus): correct input involvement info in evidence
Wallet daemon now has a transactions.publish_template JSON-RPC call

Motivation and Context

Currently all signatures but one could be surreptitiously removed from the transaction - this PR fixes this by allowing a pre-agreed signer to "seal" the transaction.

Wallet daemon now has a transactions.publish_template JSON-RPC call.

Transactions containing publish template commands are considered "global" i.e. involve all shard groups.
This provides the following benefits:

  1. All validators immediately have the templates without having to sync them (feat(engine)!: syncing published templates #1222) and handle the associated edge cases
  2. The proof that a template was previously committed is provided by existing mechanisms and consensus
  3. Simple to implement

Downside is the extra communication overhead of a global transaction

image

Next steps:

  • a syncing node does not currently sync templates - syncing the entire template set should be done before the node registers and joins the network and reconciled with synced substates.
  • remove the actual binary BLOB from the on-chain substate (binary is currently stored twice) - this is currently used when adding the published template to the template store. Instead, one could obtain the BLOB from the transaction instead of from the substate.
  • swarm should publish templates using the wallet daemon
  • remove template web URL downloading from base layer UTXO, ignore base layer template registration UTXO

How Has This Been Tested?

Manually, publishing templates through the wallet UI on a multi-shardgroup network.

What process can a PR reviewer use to test or verify this change?

As above

Breaking Changes

  • None
  • Requires data directory to be deleted
  • Other - Please specify

BREAKING CHANGE: wire-protocol for transactions, database is not compatible, submit transaction JSON-RPC call is not backward-compatible.

Copy link

github-actions bot commented Dec 26, 2024

Test Results (CI)

582 tests  +10   582 ✅ +10   1h 28m 49s ⏱️ + 14m 4s
 54 suites ± 0     0 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit 889c4a2. ± Comparison against base commit 973f8a1.

This pull request removes 4 and adds 14 tests. Note that renamed tests count towards both.
tari_dan_common_types ‑ committee::export_bindings_committeeshardinfo
tari_dan_common_types ‑ committee::export_bindings_networkcommitteeinfo
tari_transaction ‑ signature::export_bindings_transactionsignature
tari_transaction ‑ v1::export_bindings_transactionv1
consensus_tests ‑ consensus::multishard_publish_template
tari_dan_common_types ‑ num_preshards::tests::it_calculates_all_shard_groups
tari_dan_common_types ‑ num_preshards::tests::total_shard_group_lengths_equal_num_preshards
tari_dan_common_types ‑ substate_address::tests::to_shard_group::it_matches_num_preshard_all_shard_iter
tari_dan_storage ‑ consensus_models::evidence::export_bindings_evidenceinputlockdata
tari_transaction ‑ transaction::tests::it_correctly_signs_and_verifies
tari_transaction ‑ transaction::tests::it_encodes_and_decodes_without_errors
tari_transaction ‑ v1::signature::export_bindings_transactionsealsignature
tari_transaction ‑ v1::signature::export_bindings_transactionsignature
tari_transaction ‑ v1::transaction::export_bindings_transactionv1
…

♻️ This comment has been updated with latest results.

@sdbondi sdbondi force-pushed the consensus-publish-template-globally branch from 96571e7 to 20726d7 Compare December 26, 2024 14:06
@sdbondi
Copy link
Member Author

sdbondi commented Dec 27, 2024

New bindings release required, so web components fail to build

@sdbondi sdbondi force-pushed the consensus-publish-template-globally branch 2 times, most recently from 5953bca to e4690b3 Compare December 31, 2024 13:56
@sdbondi sdbondi requested a review from a team as a code owner December 31, 2024 13:56
@sdbondi sdbondi force-pushed the consensus-publish-template-globally branch from e4690b3 to bf61bb7 Compare December 31, 2024 14:09
@sdbondi sdbondi force-pushed the consensus-publish-template-globally branch from bf61bb7 to 4eb2a22 Compare December 31, 2024 14:10
@sdbondi sdbondi force-pushed the consensus-publish-template-globally branch 2 times, most recently from 2ff2b96 to cb440eb Compare January 6, 2025 07:20
@sdbondi sdbondi force-pushed the consensus-publish-template-globally branch from cb440eb to 889c4a2 Compare January 6, 2025 07:24
@ksrichard
Copy link
Collaborator

LGTM!

utACK

@sdbondi sdbondi merged commit d3b19c3 into tari-project:development Jan 6, 2025
11 of 13 checks passed
@sdbondi sdbondi deleted the consensus-publish-template-globally branch January 7, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants