Skip to content

Commit

Permalink
feat(formatting): Add editorconfig, move everything to using tabs (4) (
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Jul 13, 2023
1 parent d07270b commit cb0fc69
Show file tree
Hide file tree
Showing 19 changed files with 171 additions and 125 deletions.
4 changes: 0 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
run_starlark:
executor: ubuntu_vm
steps:

# Set up Kurtosis
- run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
Expand All @@ -43,11 +42,9 @@ jobs:

- run: kurtosis run ${PWD}


check_latest_version:
executor: ubuntu_vm
steps:

# Set up Kurtosis
- run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
Expand All @@ -63,7 +60,6 @@ jobs:

- run: kurtosis run --dry-run ${PWD}


workflows:
check_latest_version:
when: << pipeline.parameters.should-enable-check-latest-version-workflow >>
Expand Down
33 changes: 33 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# This is the top-most .editorconfig file (do not search in parent directories)
root = true

# 4 space indentation for all starlark files
[*.star]
indent_style = tab
indent_size = 4

# 4 space indentation for all python files
[*.py]

# 2 space indentation for all yaml files
[*.yml, *.yaml]
indent_style = space
indent_size = 2

# 2 space indentation for all json files
[*.json]
indent_style = space
indent_size = 2
1 change: 0 additions & 1 deletion .github/workflows/conventional-pr-title-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ jobs:
- uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion .github/workflows/pr-description-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ jobs:
base-branch-regex: '[a-z\d-_.\\/]+'
body-template: |
${{ env.CONVENTIONAL_COMMITS }}
body-update-action: 'replace'
body-update-action: "replace"
body-uppercase-base-match: false
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,28 @@
- Update `--enclave-id` flag to `--enclave` in README

### Breaking Change

- Introduced optional application protocol and renamed protocol to transport_protocol

# 0.1.0

### Breaking changes

- Updated `struct` to `PortSpec` for declaring port definitions

### Changes

- Change `exec` syntax

# 0.0.5

### Fixes

- Fix bug with input parsing of participants
- Fix bug with `get_enode_for_node` being assigned to two parameters

### Changes

- Updated `run(input_args)` to `run(args)`
- Refactor code to use `wait` and `request` commands
- Removed `print(output)` at the end as it is now printed by the framework
Expand All @@ -31,24 +36,31 @@
- Use the `args` argument instead of flags

# 0.0.4

### Changes

- Removed 'module' key in the 'kurtosis.yml' file

# 0.0.3

### Changes

- Replaced 'module' with 'package' where relevant
- Removed protobuf types as they are now unsupported in Kurtosis.
- Renamed `kurtotis.mod` to `kurtosis.yml`

### Fixes

- Fixed a bug in `run` of `main.star` where we'd refer to `module_io` instead of `package_io`

# 0.0.2

### Features

- Added the docs

### Fixes

- Renamed `num_validators_per_keynode` to `num_validator_keys_per_node`
- Moved away from `load` infavor of `import_module`
- Moved away from `store_files_from_service` to `store_service_files`
Expand All @@ -57,11 +69,13 @@
- Moved away from passing json string to struct/dict for render templates

### Changes

- Move from `main` to `run` in `main.star`

# 0.0.1

### Features

- Changed the .circlei/config.yml to apply to Startosis
- Added genesis_constants
- Added a lot of participant_network/pre_launch_data_generator
Expand All @@ -70,7 +84,9 @@
- Almost perfect parity with the eth2-merge-kurtosis-module

### Fixes

- Fixes some bugs with the initial implementation of the monitors

# 0.0.0
* Initial commit

- Initial commit
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Ethereum Package
=======================
# Ethereum Package

This is a [Kurtosis Starlark Package][starlark-docs] that will:

Expand All @@ -11,8 +10,7 @@ This is a [Kurtosis Starlark Package][starlark-docs] that will:

For much more detailed information about how the merge works in Ethereum testnets, see [this document](https://notes.ethereum.org/@ExXcnR0-SJGthjz1dwkA1A/H1MSKgm3F).

Quickstart
----------
## Quickstart

1. [Install Docker if you haven't done so already][docker-installation]
1. [Install the Kurtosis CLI, or upgrade it to the latest version if it's already installed][kurtosis-cli-installation]
Expand All @@ -24,9 +22,9 @@ Quickstart
```bash
kurtosis run --enclave eth2 github.com/kurtosis-tech/eth2-package
```

To remove the enclave running the Ethereum network, run `kurtosis enclave rm -f eth2`.

You can customize the package's behaviour by passing in a configuration JSON or YAML (see the "Configuration" section below). For example:
```bash
Expand All @@ -46,20 +44,19 @@ For extra convenience, you can store the parameters in a file:
kurtosis run --enclave eth2 github.com/kurtosis-tech/eth2-package "$(cat ~/eth2-package-params.json)"
```
Management
----------
## Management
Kurtosis will create a new enclave to house the services of the Ethereum network. [This page][using-the-cli] contains documentation for managing the created enclave & viewing detailed information about it.
Configuration
-------------
## Configuration
To configure the package behaviour, you can modify your `eth2-package-params.yaml` file. The full YAML schema that can be passed in is as follows with the defaults provided:
<details>
<summary>Click to show all configuration options</summary>
<!-- Yes, it's weird that none of this is indented but it's intentional - indenting anything inside this "details" expandable will cause it to render weird" -->
```json
{
// Specification of the participants in the network
Expand All @@ -74,7 +71,7 @@ To configure the package behaviour, you can modify your `eth2-package-params.yam
// - geth: ethereum/client-go:latest
// - erigon: thorax/erigon:devel
// - nethermind: nethermind/nethermind:latest
// - besu: hyperledger/besu:develop
// - besu: hyperledger/besu:develop
"el_client_image": "",
// The log level string that this participant's EL client should log at
Expand Down Expand Up @@ -118,7 +115,7 @@ To configure the package behaviour, you can modify your `eth2-package-params.yam
// A set of parameters the node needs to reach an external block building network
// If `null` then the builder infrastructure will not be instantiated
// Example:
//
//
// "relay_endpoints": [
// "https://0xdeadbeefcafa@relay.example.com",
// "https://0xdeadbeefcafb@relay.example.com",
Expand Down Expand Up @@ -151,7 +148,7 @@ To configure the package behaviour, you can modify your `eth2-package-params.yam
"preregistered_validator_keys_mnemonic": "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete"
},
// True by defaults such that in addition to the Ethereum network:
// - A transaction spammer is launched to fake transactions sent to the network
// - Forkmon will be launched after CL genesis has happened
Expand Down Expand Up @@ -183,17 +180,19 @@ To configure the package behaviour, you can modify your `eth2-package-params.yam
"mev_type": None
}
```
</details>
</details>
You can find the latest Kiln compatible docker images here: https://notes.ethereum.org/@launchpad/kiln
Developing On This Package
-------------------------
## Developing On This Package
First, install prerequisites:
1. [Install Kurtosis itself][kurtosis-cli-installation]
Then, run the dev loop:
1. Make your code changes
1. Rebuild and re-run the package by running the following from the root of the repo:
```bash
Expand All @@ -205,20 +204,22 @@ Then, run the dev loop:
To get detailed information about the structure of the package, visit [the architecture docs](./docs/architecture.md).
When you're happy with your changes:

- Add an entry to `docs/changelog.md` under the `# TBD` header describing your changes (this is required for CI checks to pass!)
- Create a PR
- Add one of the maintainers of the repo as a "Review Request":
- `parithosh` (Ethereum)
- `gbouv` (Kurtosis)
- `h4ck3rk3y` (Kurtosis)
- `mieubrisse` (Kurtosis)
- Once everything works, merge!
- `parithosh` (Ethereum)
- `gbouv` (Kurtosis)
- `h4ck3rk3y` (Kurtosis)
- `mieubrisse` (Kurtosis)
- Once everything works, merge!

## Known Bugs

`wait_for_epoch_finalization` - doesn't work as expected, as Starlark doesn't have ways to do assertions on facts just yet. The [issue](https://github.com/kurtosis-tech/eth2-package/issues/15) tracks this.

<!------------------------ Only links below here -------------------------------->

[docker-installation]: https://docs.docker.com/get-docker/
[kurtosis-cli-installation]: https://docs.kurtosis.com/install
[starlark-docs]: https://docs.kurtosis.com/starlark-reference
Expand Down
Loading

0 comments on commit cb0fc69

Please sign in to comment.