Skip to content

Commit

Permalink
Subtree era test node (#215)
Browse files Browse the repository at this point in the history
* remove subtree

* Squashed 'era-test-node/' content from commit fb635d1

git-subtree-dir: era-test-node
git-subtree-split: fb635d127e50f6c69e5ff01b08d01460456f1471

* Remove subtree

* Squashed 'test-node-subtree/' content from commit fb635d1

git-subtree-dir: test-node-subtree
git-subtree-split: fb635d127e50f6c69e5ff01b08d01460456f1471

* Update

* Update

* Update readme

* Moved subtree

* Fix subtree

* Squashed '.test-node-subtree/' content from commit 670a05b

git-subtree-dir: .test-node-subtree
git-subtree-split: 670a05b65f154cf7685e793a479e4fde8a38a931

* Merge subtree

* Update subtree

* Update subtree

* Squashed '.test-node-subtree/' content from commit fb635d1

git-subtree-dir: .test-node-subtree
git-subtree-split: fb635d127e50f6c69e5ff01b08d01460456f1471
  • Loading branch information
MauroToscano authored Jan 26, 2024
1 parent fc8fe32 commit 73e2469
Show file tree
Hide file tree
Showing 253 changed files with 73,612 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .test-node-subtree/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This CODEOWNERS file sets the individuals responsible for code in the era-test-node repository.

# These users are the default owners for everything in the repo.
# They will be requested for review when someone opens a pull request.
* @matter-labs/devxp

# You can also specify code owners for specific directories or files.
# For example:
# /src/ @developer1 @developer2
# /docs/ @documenter
72 changes: 72 additions & 0 deletions .test-node-subtree/.github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing

## Welcome! 👋

Hello there, contributor! We're delighted that you're considering contributing to the `era-test-node` project. This document is here to guide you through the steps and best practices for contributing to this Rust-based repository.

Please take a moment to review this document to ensure a smooth and efficient contribution process for everyone involved.

## Getting Started

- **Fork the repository.** Begin by forking the main `era-test-node` repository to your personal GitHub account.

- **Clone the repository.** After forking, clone the repository to your local machine:

```bash
git clone https://github.com/<your-github-username>/era-test-node.git
```

- **Create a new branch.** Use descriptive names for your branches to help identify the feature, bugfix, or enhancement you're addressing:

```bash
git checkout -b feature/description-of-your-feature
```

## Making Changes

- **Write your code.** Ensure your code is thoroughly tested and functions as expected. Clear, well-commented code is always appreciated.

- **Compile and test.** Before submitting a pull request, ensure your code compiles, passes lint checks, and all tests are successful. You should also write unit tests for your contributions. Use the following command for these checks:

```bash
make all
```

- **Commit your changes.** Adhere to the [Conventional Commits](https://www.conventionalcommits.org/) standard when writing commit messages.

- **Push your changes.** Push the changes to your forked repository:

```bash
git push origin feature/description-of-your-feature
```

## Submitting a Pull Request

- **Initiate a pull request (PR).** Go to the main `era-test-node` repository. Your recently pushed branch should be highlighted, showing a "Compare & pull request" button. Click on it and provide a clear, detailed description of your changes in the PR.

- **Await a review.** Our maintainers will review your PR. They might request changes or clarifications, so be ready to address any feedback.

## Code Style Guide

We follow Rust's official coding style guidelines. Before committing, ensure your code is formatted and lint checks pass:

```bash
cargo fmt --all -- --check &&
cargo clippy -Zunstable-options -- -D warnings --allow clippy::unwrap_used
```

This ensures consistent code style throughout the project and helps identify potential issues early.

## Need Assistance?

If you're unsure about something or have questions, don't hesitate to open an issue or initiate a discussion in our [zkSync Community Hub](https://github.com/zkSync-Community-Hub/zkync-developers/discussions). We're here to assist!

## What's Next?

Once your PR is approved and merged, your contribution will be integrated into the `era-test-node` repository. Congratulations, and thank you! We value your contribution and look forward to future collaborations.

Remember, the best contributions come from enjoying the process, being respectful, and continuously learning. Thanks for being a part of our community!

---

*Last updated: July 24, 2023*
44 changes: 44 additions & 0 deletions .test-node-subtree/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Bug report
about: Use this template for reporting issues
title: ""
labels: bug
assignees: ''

---

### 🐛 Bug Report for zkSync Era In-Memory Node

#### 📝 Description

Provide a clear and concise description of the bug.

#### 🔄 Reproduction Steps

1. Step 1
2. Step 2
3. ...

#### 🤔 Expected Behavior

Describe what you expected to happen.

#### 😯 Current Behavior

Describe what actually happened.

#### 🖥️ Environment

- **Rust version**: [e.g., rustc 1.52.0]
- **Operating System & Version**: [e.g., Ubuntu 20.04]
- **Other relevant environment details**:

#### 📋 Additional Context

Add any other context about the problem here. If applicable, add screenshots to help explain.

#### 📎 Log Output

```
Paste any relevant log output here.
```
8 changes: 8 additions & 0 deletions .test-node-subtree/.github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: zksync-developers Discussion
url: https://github.com/zkSync-Community-Hub/zkync-developers/discussions
about: Please provide feedback, and ask questions here.
- name: In-memory documentation page
url: https://era.zksync.io/docs/tools/testing/era-test-node.html
about: Please refer to the documentation for immediate answers.
26 changes: 26 additions & 0 deletions .test-node-subtree/.github/ISSUE_TEMPLATE/feature_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request
about: Use this template for requesting features
title: ""
labels: feat
assignees: ''

---

### 🌟 Feature Request

#### 📝 Description

Provide a clear and concise description of the feature you'd like to see.

#### 🤔 Rationale

Explain why this feature is important and how it benefits the project.

#### 🖼️ Mockups/Examples

If applicable, provide mockups or examples of how the feature would work.

#### 📋 Additional Context

Add any other context or information about the feature request here.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions .test-node-subtree/.github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# What :computer:
* First thing updated with this PR
* Second thing updated with this PR
* Third thing updated with this PR

# Why :hand:
* Reason why first thing was added to PR
* Reason why second thing was added to PR
* Reason why third thing was added to PR

# Evidence :camera:
Include screenshots, screen recordings, or `console` output here demonstrating that your changes work as intended

<!-- All sections below are optional. You can uncomment any section applicable to your Pull Request. -->

<!-- # Notes :memo:
* Any notes/thoughts that the reviewers should know prior to reviewing the code? -->
18 changes: 18 additions & 0 deletions .test-node-subtree/.github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check PR title
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
lint:
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ github.token }}
65 changes: 65 additions & 0 deletions .test-node-subtree/.github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: checks

on:
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
workflow_dispatch:

jobs:
# ensures proper formatting and clippy lint
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-07-23
components: rustfmt, clippy

- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: 'e2e-tests/yarn.lock'

- name: Run Linters
run: make lint

# ensures build is successful
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-07-23

- name: Build Code
run: make all

- name: Create artifact
run: |
cd ./target/release
tar -czf era_test_node-${{ matrix.os }}.tar.gz ./era_test_node*
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: era_test_node-${{ matrix.os }}.tar.gz
path: ./target/release/era_test_node-${{ matrix.os }}.tar.gz
e2e:
needs: build
uses: ./.github/workflows/e2e.yml
name: e2e-tests
78 changes: 78 additions & 0 deletions .test-node-subtree/.github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-07-21
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Install mdbook
run: cargo install mdbook

- name: Generate rust docs
run: |
echo "Generating docs..."
cargo doc --no-deps
- name: Make index.html
run: echo '<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=./era_test_node/index.html">
<script type="text/javascript">
window.location.href = "./era_test_node/index.html"
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, follow this <a href='./era_test_node/index.html'>link to example</a>.
</body>
</html>' > ./target/doc/index.html
- name: Generate rustbook
run: |
make book
cp -r docs/rustbook/book target/doc
- name: Fix permissions
run: |
chmod -c -R +rX "target/doc/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'target/doc'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
Loading

0 comments on commit 73e2469

Please sign in to comment.