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

Arbitrum local testnet setup #193

Closed
2 of 4 tasks
Lohann opened this issue Oct 12, 2023 · 0 comments · Fixed by #205
Closed
2 of 4 tasks

Arbitrum local testnet setup #193

Lohann opened this issue Oct 12, 2023 · 0 comments · Fixed by #205
Assignees
Labels
arbitrum connector Connector parent epic enhancement New feature or request release-nov

Comments

@Lohann
Copy link
Collaborator

Lohann commented Oct 12, 2023

Feature description
Create a rust crate at chains/arbitrum/testing/... that manages a local Arbitrum testnet, below an example of what is expected:

obs: this is just an example, feel free to remove/add fields from those structures as necessary.

/// All settings necessary to configure an arbitrum testnet
pub struct Config {
    /// Base Directory for store temporary files (chain config files, docker volumes, etc).
    pub base_directory: PathBuf;
   
    /// Port where the L2 Arbitrum node is listening, if none pick a random port
    pub arbitrum_port: Option<u16>,

    /// Port where the L1 ethereum node is listening, if none pick a random port
    pub ethereum_port: Option<u16>,
    
    /// unlocked accounts which will receive funds.
    pub main_account: Vec<(ethereum_types::Address, ethereum_types::U256)>,
    
    // ...
}

pub struct ArbitrumEnv {
    // ...
}

impl ArbitrumEnv {
    /// Starts a new arbitrum testnet
    pub async new(config: Config) -> Result<Self>;
    
    /// Stop the arbitrum testnet and cleanup dependencies
    /// ex: stop docker containers, delete temporary files, etc
    pub async cleanup(self) -> Result<()>;
}

Related

This library will be used by the new testing framework: #158

Expected output

  • it correctly starts a new arbitrum network
  • it correctly cleanup the arbitrum network
  • Multiple arbitrum networks can be created simultaneously as long there's no port conflicts.
  • Unit tests covering all basic functionalities
@Lohann Lohann added enhancement New feature or request connector Connector parent epic labels Oct 12, 2023
@Lohann Lohann added this to the Milestone Q4 2023 milestone Oct 12, 2023
@Lohann Lohann pinned this issue Oct 12, 2023
@Lohann Lohann unpinned this issue Oct 12, 2023
@ManojJiSharma ManojJiSharma linked a pull request Dec 7, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arbitrum connector Connector parent epic enhancement New feature or request release-nov
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants