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(engine)!: allow multiple create components in one call #1046

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Jun 14, 2024

Description

  • assigns a unique component address for each call to create_component
  • formalises component addresses using a public key
  • adds .with_public_key_address to component builder
  • adds new test for multiple component creation
  • use with_public_key_address in account template
  • simplified the component address from public key derivation.

Motivation and Context

Previously you could not create multiple components in one call without explicitly allocating an address.
This PR changes the default behaviour to generate a unique address, thereby fixing the bug when creating multiple components in a single call.
Some components need the address to be derived ahead of time using a public key can do this by optionally specifying a public key address on the component.

How Has This Been Tested?

New multiple component creation test. Existing account tests. Manually

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

Use a template that creates multiple components. Create an account that does not exist for another public key.

Breaking Changes

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

BREAKING CHANGE: caller context calls have an additional arg field, so templates using these need to be recompiled.

Copy link

github-actions bot commented Jun 14, 2024

Test Results (CI)

540 tests  +2   540 ✅ +2   1h 32m 24s ⏱️ - 48m 32s
 64 suites ±0     0 💤 ±0 
  2 files   ±0     0 ❌ ±0 

Results for commit 83d55ad. ± Comparison against base commit 0ebb1fb.

♻️ This comment has been updated with latest results.

@sdbondi sdbondi force-pushed the engine-multiple-components-one-call branch from 6eb7848 to a9b4bbe Compare June 19, 2024 14:08
@sdbondi sdbondi force-pushed the engine-multiple-components-one-call branch from a9b4bbe to 83d55ad Compare June 19, 2024 15:21
@stringhandler stringhandler added this pull request to the merge queue Jun 27, 2024
Merged via the queue into tari-project:development with commit 058a0a7 Jun 27, 2024
11 checks passed
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