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

Comments

[master] Interop phase 1#3639

Merged
bzawisto merged 2 commits intomasterfrom
ZIL-5257-Implement-missing-things-for-interop-phase-1.5
May 31, 2023
Merged

[master] Interop phase 1#3639
bzawisto merged 2 commits intomasterfrom
ZIL-5257-Implement-missing-things-for-interop-phase-1.5

Conversation

@bzawisto
Copy link
Contributor

@bzawisto bzawisto commented May 25, 2023

Description

Backward Compatibility

  • This is not a breaking change
  • This is a breaking change

Review Suggestion

Status

Implementation

  • ready for review

Integration Test (Core Team)

  • local machine test
  • small-scale cloud test

@github-actions github-actions bot changed the title Interop phase 1 [master] Interop phase 1 May 25, 2023
@bzawisto bzawisto requested a review from rrw-zilliqa May 25, 2023 08:21
Copy link
Contributor

@rrw-zilliqa rrw-zilliqa left a comment

Choose a reason for hiding this comment

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

More or less makes sense, but:

  • I think we should check this against my interop tests in #3637
  • There's one point I picked up which I'd like clarification on.
  • I'd like to see (read: we're not going to release without) tests on the semantics of RFC075 to check that the behaviour is indeed as specified there, otherwise we will have to have yet another update to fix them. Potentially this should be in another PR, since this one is already quite long, but up to you ..

if (acc_store.isAccountEvmContract(recipient)) {
// Workaround before we have full interop: treat EVM contracts as EOA
// accounts only if there's receiver_address set to 0x0, otherwise revert
if (!scillaArgs.extras ||
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this has the behaviour that:

  • if you call Scilla from EVM with receiver_address = 0
  • and some contract down the chain sends a message
  • and that message is to an EVM contract
  • and that EVM contract has a handler for the message
  • then we ignore the handler and do nothing.

Which isn't what RFC075 says .. is there a test for this that this code passes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, that should be reverted in this case because receiver_address will be missing or (impossible with current impl) be non-zero.

@bzawisto
Copy link
Contributor Author

Thanks, I tested all changes against extended BasicInterop suite and all tests pass. One tests with _EvmCall tag has been added to this PR. What other semantics would you like check?

@rrw-zilliqa
Copy link
Contributor

@bzawisto - I'd like the semantics from RFC075 checked explicitly please. It's not enough that one use case works - we need to make sure the behaviour corresponds with some set of semantics that we are reasonably sure won't allow exploits to be crafted, and the semantics we've picked are set out in RFC075 - so let's write some tests to explicitly ensure that those semantics are followed - partly to make sure your code is correct (and this would've caught the bug Lukas reported in Slack), and partly to make sure we don't violate them with changes in the future.

@bzawisto
Copy link
Contributor Author

@rrw-zilliqa As agreed, this will come in other PRs.

@bzawisto bzawisto requested a review from rrw-zilliqa May 30, 2023 14:18
@chetan-zilliqa chetan-zilliqa self-requested a review May 31, 2023 09:22
@bzawisto bzawisto dismissed rrw-zilliqa’s stale review May 31, 2023 09:27

As agreed yesterday I'm merging and will fix it in other PR.

@bzawisto bzawisto merged commit df898be into master May 31, 2023
@bzawisto bzawisto deleted the ZIL-5257-Implement-missing-things-for-interop-phase-1.5 branch May 31, 2023 09:27
yaron-zilliqa pushed a commit that referenced this pull request May 31, 2023
* Some progress with interop phase 1

* Pick up correct sender value

---------

Co-authored-by: bzawisto <bartosz@zilliqa.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants