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

NETWORK_TENDERLY overrides the original NETWORK #519

Open
barakman opened this issue Apr 7, 2024 · 0 comments
Open

NETWORK_TENDERLY overrides the original NETWORK #519

barakman opened this issue Apr 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@barakman
Copy link
Collaborator

barakman commented Apr 7, 2024

Bug Description

In file utils.py, the following action overrides the original network configured by the user:

        if 'tenderly' in rpc_url:
            cfg.NETWORK = cfg.NETWORK_TENDERLY

Subsequently, there is no way to handle the execution in Tenderly in the exact same way it is handled outside of Tenderly.

For example, in file TxHelpers.py currently under PR #542:

        if self.cfg.NETWORK == self.cfg.NETWORK_ETHEREUM:
            self.use_access_list = True
            self.send_transaction = self._send_private_transaction
        else:
            self.use_access_list = False
            self.send_transaction = self._send_regular_transaction

The results of running on Ethereum are:

+------------------+-------------+-------------+
|                  | Transaction | Access List |
+------------------+-------------+-------------|
| With Tenderly    | Regular     | Not applied |
+------------------+-------------+-------------+
| Without Tenderly | Private     | Applied     |
+------------------+-------------+-------------+

Private transactions cannot be used in Tenderly, so testing here is incomplete but there's no other option.
But access lists CAN be used in Tenderly, so there IS an option here to improve the testing of Ethereum via Tenderly.

Severity

Medium

Solution Guidelines

Instead of NETWORK_TENDERLY being one of the values permitted for Config.NETWORK, the Config class should define an additional variable named IS_TENDERLY or similar.

This change might subsequently require a bunch of other changes across the codebase.

@barakman barakman added the bug Something isn't working label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant