Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Conversation

@jjcnn
Copy link

@jjcnn jjcnn commented Jan 17, 2023

Description

Scilla needs to be able to query data from init files using the external reads system. This PR implements the changes needed on the C++ side of the queries and responses.

The PR is coupled to Zilliqa/scilla#1220. The changes in this PR and the changes in the Scilla PR are logically linked, and must be tested and released together.

Backward Compatibility

  • This is not a breaking change
  • [x ] This is a breaking change

Review Suggestion

Status

Implementation

ProtoScillaQuery has been updated.

The actual reading of init data is currently only available in pseudo-code.

  • ready for review

Integration Test (Core Team)

  • local machine test
  • small-scale cloud test

@github-actions github-actions bot changed the title Feature/scilla ext reads contract params [master] Feature/scilla ext reads contract params Jan 17, 2023
@valeryz
Copy link
Contributor

valeryz commented Jan 18, 2023

  • interface is the same as for storage reads
  • reads are from the init json, rather than key-value store
  • pay attention to which types are returned.

@valeryz valeryz requested a review from bzawisto January 18, 2023 09:21
@jjcnn
Copy link
Author

jjcnn commented Jan 31, 2023

The attached zip file

remote_reads_contract_params_tests.zip

contains a set of suggested regression tests, to be used as follows:

  • Deploy remote_reads_support.scilla using the init file support_init.json. Remember to change the _this_address entry to the address that the contract is deployed at.
  • Deploy remote_reads_test.scilla using the init file test_init.json. Remember to change the _this_address entry to the address that the contract is deployed at, and the entry support_contract_init to the address that the support contract is deployed at.
  • Invoke the transitions Test1, Test2, ..., Test18 on the test contract. None of them take any parameters. The expected behavior of all of them is that they terminate without raising a Scilla exception. If they terminate with a Scilla exception, then something has gone wrong in the implementation.

None of the transitions make changes to the contract states, so it should be possible to deploy the contracts once and invoke all the transitions one by one. There is no need to redeploy between each transition invocation.

Note that I have not been able to test the contracts, so it is possible that I have made a mistake when writing them. If you encounter an exception, then the first thing to do is to make sure that the Scilla code actually does what it's supposed to.

@valeryz valeryz added the keep Keep these PRs through the various cleanups label Apr 3, 2023
@rrw-zilliqa
Copy link
Contributor

This is ancient and is likely never to be merged; closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

keep Keep these PRs through the various cleanups

Projects

Status: PRs done (merged)

Development

Successfully merging this pull request may close these issues.

5 participants