Skip to content

Proto/Tests: add tests for reveal operation in sponsored operations (3/n)

This MR depends on both !13114 (merged) and !13290 (merged). Therefore, it targets !13114 (merged)'s branch and the first 3 commits are from !13290 (merged).


This MR adds validation tests for reveal operation in sponsored operations.

  • Reveal which is not the first guest’s operation after Host{guest} (test_incorrect_guest_revelation)
    • Whether or not there are operations with source=sponsor before or between the guest’s operations
    • First guest in the batch or not
  • Guest contract doesn’t exist (at the beginning of the block) (test_guest_not_exist)
    • First guest operation is a Reveal
    • First guest operation is a Transaction
  • Unrevealed guest does the transaction (the contract does exist, i.e., the account has non-zero tez) (test_unrevealed_existing_guest)

Manually testing the MR

dune exec src/proto_alpha/lib_protocol/test/integration/operations/main.exe -- --file test_host_operation.ml --info --keep-going

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Diane Gallois-Wong

Merge request reports

Loading