Skip to content
Closed

[Error] #21444

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 87 additions & 38 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,89 @@
# Contributing

Thank you for considering to help out with the source code! We welcome
contributions from anyone on the internet, and are grateful for even the
smallest of fixes!

If you'd like to contribute to go-ethereum, please fork, fix, commit and send a
pull request for the maintainers to review and merge into the main code base. If
you wish to submit more complex changes though, please check up with the core
devs first on [our gitter channel](https://gitter.im/ethereum/go-ethereum) to
ensure those changes are in line with the general philosophy of the project
and/or get some early feedback which can make both your efforts much lighter as
well as our review and merge procedures quick and simple.

## Coding guidelines

Please make sure your contributions adhere to our coding guidelines:

* Code must adhere to the official Go
[formatting](https://golang.org/doc/effective_go.html#formatting) guidelines
(i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).
* Code must be documented adhering to the official Go
[commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.
* Pull requests need to be based on and opened against the `master` branch.
* Commit messages should be prefixed with the package(s) they modify.
* E.g. "eth, rpc: make trace configs optional"

## Can I have feature X

Before you submit a feature request, please check and make sure that it isn't
possible through some other means. The JavaScript-enabled console is a powerful
feature in the right hands. Please check our
[Wiki page](https://github.com/ethereum/go-ethereum/wiki) for more info
and help.

## Configuration, dependencies, and tests

Please see the [Developers' Guide](https://github.com/ethereum/go-ethereum/wiki/Developers'-Guide)
for more details on configuring your environment, managing project dependencies
and testing procedures.
When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure that tests pass and code is lint free: `make all && make test && make lint`
2. Update the README.md if any changes invalidate its current content.
3. Include any tests for new functionality.
4. Reference any relevant issues in your PR comment.

## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at contributing@optimism.io. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version] and from the [Angular Seed Contributing Guide][angular-contrib].

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
[angular-contrib]: https://github.com/mgechev/angular-seed/blob/master/.github/CONTRIBUTING.md
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Description

## Questions
-
-
-

## Metadata
### Fixes
- Fixes # [Link to Issue]

## Contributing Agreement
<!--
You *must* read and fully understand our Contributing Guide and Code of Conduct before submitting this pull request. Strong, healthy, and respectful communities are the best way to build great code 💖.
-->

- [ ] I have read and understood the [Optimism Contributing Guide and Code of Conduct](./CONTRIBUTING.md) and am following those guidelines in this pull request.
17 changes: 17 additions & 0 deletions .github/scripts/stop-ecs-task.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

if [ "$#" -ne 2 ]; then
echo "Invalid number of arguments. Usage: stop-ecs-task.sh <cluster> <service>"
exit 1
fi

cluster=$1
service=$2

tasks=$(aws ecs list-tasks --cluster $cluster --service-name $service)

task_arn=$(echo $tasks | awk -F\[ '{print $2}' | awk -F\" '{print $2}')

if [ -n "${task_arn}" ]; then
aws ecs stop-task --cluster $cluster --task $task_arn > /dev/null
fi
26 changes: 26 additions & 0 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docker Image CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build-lint-test:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update submodules
run: git submodule update --init --recursive

- name: Build the Docker image
env:
DOCKER_BUILDKIT: 1
run: docker build . --file Dockerfile.test -t geth_test

- name: Run Lint & Test Docker Image
run: docker run geth_test:latest
50 changes: 50 additions & 0 deletions .github/workflows/dev-ecr-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build & Tag Container, Push to ECR, Deploy to Dev

on:
push:
branches:
- master

jobs:
build:
name: Build, Tag & push to ECR, Deploy task
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup golang
uses: actions/setup-go@v2
with:
go-version: '1.14.2'

- name: Install & Build
run: make all

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_CI_USER_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_CI_USER_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: optimism/geth
IMAGE_TAG: latest
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

# TODO: Add this when the DEV env is set up
# - name: Stop existing dev-geth ECS task to auto-start task with new image
# run: |
# ./.github/scripts/stop-ecs-task.sh dev-geth geth

- name: Logout of Amazon ECR
if: always()
run: docker logout ${{ steps.login-ecr.outputs.registry }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ profile.cov

# IdeaIDE
.idea
*.iml

# VS Code
.vscode

# vim
*.swp

# dashboard
/dashboard/assets/flow-typed
/dashboard/assets/node_modules
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ issues:
- goconst
- path: cmd/faucet/
linters:
- deadcode
- deadcode
Loading