Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Command Family #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peterschwarz
Copy link

The Command Family is a transaction family that can exercise all of the operations provided on the TransactionContext in addition to other actions, such as sleeping or marking the transaction as invalid. This family will be used for creating a wide variety of tests, both for correctness and performance of the Transact library.

The Command Family is a transaction family that can exercise all of the
operations provided on the TransactionContext in addition to other
actions, such as sleeping or marking the transaction as invalid.  This
family will be used for creating a wide variety of tests, both for
correctness and performance of the Transact library.

Signed-off-by: Peter Schwarz <[email protected]>
Copy link

@arsulegai arsulegai left a comment

Choose a reason for hiding this comment

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

Few questions

Each entry in the `state_keys` field must be a valid state key (for example, a
valid address in a Sawtooth merkle trie).

Note, no validation will occur if the requested state value is actually

Choose a reason for hiding this comment

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

Is this only to ensure get_state_entries() is working as expected without any panics?

Copy link
Author

Choose a reason for hiding this comment

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

Missing values do not imply an invalid transaction, though. That's a business logic decision.

`TransactionContext`'s `delete_state_entries` method. In other words, it will
only make a single call to the context.

Each entry in the `state_keys` field must be a valid state key (for example, a

Choose a reason for hiding this comment

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

How about valid but non-existing key case, so that negative scenario is tested against the Transact read? Or is that scenario left to "force invalid transaction" case?

Copy link
Author

Choose a reason for hiding this comment

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

valid, but non-existing keys is not a invalid transaction.


The `receipt_data` field must not be empty.

### Sleep

Choose a reason for hiding this comment

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

I failed to get understanding of why this feature is required or how is this used. Could you please add an example case?

Copy link
Author

Choose a reason for hiding this comment

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

The value here is for testing timing aspects of the overall system - namely parallel scheduling.

Base automatically changed from master to main January 22, 2021 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants