Skip to content

Commit

Permalink
Merge branch 'master' into activeDB-markup-exception-master
Browse files Browse the repository at this point in the history
  • Loading branch information
iulianpascalau authored Jul 22, 2022
2 parents e2f6f8c + db10dc2 commit 92c1438
Show file tree
Hide file tree
Showing 9 changed files with 278 additions and 43 deletions.
74 changes: 74 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant 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,
education, socio-economic status, 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 [email protected]. 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 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

46 changes: 46 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

# Contributing to elrond-go

If you are unfamiliar with the workflow of contributing to github, you can refer to this [this article](https://github.com/firstcontributions/first-contributions/blob/master/README.md)

## Fork & clone this repository

The development should happen in a personal fork, cloned on the local machine.

## Use development branch

External contributions should happen against the `development` branch.

Other branches may be used by the team members in accordance to internal decisions.

## Use linter

Make sure the code is well-formatted and aligned before opening a PR. Some linters such `gofmt` can be used, or code style
can be proactively checked while writing code, when using an IDE.

## Writing tests

In case of adding a new feature, make sure you follow these guidelines:
- write unit tests which verify the component in isolation and mock the external components around it;
- if the component relies on many other external components which are difficult to mock, write integrations tests for it; Although, this usually means that further decoupling using interfaces is required. Also, the component might needed to be split in smaller, specialized sub-components;
- cover both expected functionality but also verify that the code fails in expected ways.

In case of fixing a bug:
- write the unit test that exposes the bug, then fix it and have a test that will make sure the specific situation will always be tested in the future.

In both cases, make sure that the new code has a good code coverage (ideally, 100% of the new lines are covered) and also try to cover edge-cases.

Please take care of the severity of the bug. Pushing directly a fix of an undiscovered, critical bug, or a bug that can be exploited in such a way that could create damage to the blockchain, loss of funds, state alteration beyond repair, and so on, can be exploited before the team can take any action. Please contact the team on private channels before pushing the fix if you have any doubts.

## Make sure the tests pass

Before opening a Pull Request, make sure that all tests pass. One can run the following commands before opening a pull request:
- `make test`

## Manual testing

Although the nominal use case looks good, the linter runs without issues, as well as the unit & integration tests pass without any error, some unforeseen bugs may arise.

Depending on the PR type, there are multiple ways of manual testing the new code:
- if it only affects an API, a log, or something not critical, one could sync a node with new code on Testnet or Devnet and see if everything works good.
- if the changes would affect the entire network (consensus, processing, and so on), a local testnet should be started. Also, make sure backwards compatibility is maintained.
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

75 changes: 75 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: [bug, triage]
assignees:
- members
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this bug report!
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. [email protected]
validations:
required: false
- type: input
id: description
attributes:
label: Description
description: A short, concise description of the problem
placeholder: Description
validations:
required: true
- type: input
id: version
attributes:
label: Node version
description: The version of the node used when discovering the bug
placeholder: v1.3.35.0-0-gfc78258fe/go1.17.6/linux-amd64
validations:
required: false
- type: input
id: host
attributes:
label: Host machine
description: Specifications and other details about the host of the node
placeholder: DO, AWS, Contabo, no VPS (if you run your validator on a physical machine)
validations:
required: false
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: A minimum list of steps for validating the behavior of the bug
validations:
required: false
- type: dropdown
id: network
attributes:
label: On which network is the bug manifesting itself?
multiple: true
options:
- Mainnet
- Devnet
- Testnet
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: sh
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ElrondNetwork/elrond-go/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Feature Request
description: Add new feature request
title: "[Feature Request]: "
labels: [feature request]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out new feature request!
- type: textarea
id: describe-solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of the needed improvement.
validations:
required: true
- type: textarea
id: related-problem
attributes:
label: Is your feature request related to a problem?
description: A clear and concise description of what the problem is.
validations:
required: false
- type: textarea
id: alternative-problem
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ElrondNetwork/elrond-go/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/feature.md

This file was deleted.

12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Question about the Elrond node
description: Ask a question
title: "[Question]: "
labels: [question]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out the question form! For a faster response, please use our validator's telegram page: https://t.me/ElrondValidators
- type: textarea
id: describe-solution
attributes:
label: Please write the desired question
description: What is misunderstood, not found on docs or anything similar.
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ElrondNetwork/elrond-go/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Description of the reasoning behind the pull request (what feature was missing / how the problem was manifesting itself / what was the motive behind the refactoring)
-
-
-

## Proposed Changes
-
-
-

## Testing procedure
-
-
-

0 comments on commit 92c1438

Please sign in to comment.