From 3fd362f0343607d11b13847a45e41bbf249457a4 Mon Sep 17 00:00:00 2001 From: Arkadiusz Osowski Date: Fri, 7 Jun 2024 15:52:48 +0200 Subject: [PATCH] ARCO-47: add CoC, Contributing; update readme --- CODE_OF_CONDUCT.md | 30 +++++++++++++++++ CONTRIBUTING.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 60 ++++++++++++++++++++++++++++++++- 3 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..194412a2c --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,30 @@ +# Code of Conduct + +## Introduction +This Code of Conduct outlines the expectations for all contributors to our open-source project, as well as the responsibilities of the maintainers in ensuring a positive and productive environment. Our goal is to create excellent software. To achieve that, we foster a welcoming atmosphere for developers to collaborate and contribute to the project's success. + +## Expectations for Contributors +All contributors are expected to: +a. Treat others with respect and dignity. +b. Be considerate of differing viewpoints. +c. Collaborate constructively with others. +d. Refrain from demeaning or harassing others. + +## Reporting Violations +If you witness or experience any behavior that violates this Code of Conduct, please report it to the project maintainers. Reports can be made anonymously or by contacting a specific maintainer. + +## Enforcement +The project maintainers are responsible for enforcing this Code of Conduct. They will investigate any reported violations and take appropriate action, which may include: +a. Issuing a warning. +b. Requiring an apology or remediation. +c. Temporarily suspending or permanently banning a contributor from the project. + +## Maintainer Responsibilities +Maintainers are responsible for: +a. Upholding the Code of Conduct and setting a positive example for the community. +b. Investigating and addressing reported violations in a fair and timely manner. +c. Making decisions about merging code based on its merit alone, without bias or favoritism. + +## Changes to the Code of Conduct +This Code of Conduct is subject to change as the project evolves. Any updates will be communicated to all contributors and posted in the project repository. +By participating in this open-source project, you agree to abide by this Code of Conduct. We appreciate your cooperation in creating a positive and productive environment for everyone involved. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..4476c32d0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,84 @@ +# CONTRIBUTING + +Thank you for considering contributing in the BSV Blockchain ecosystem! This document outlines the processes and practices we expect contributors to adhere to. + +## Table of Contents +- [General Guidelines](#general-guidelines) +- [Code of Conduct](#code-of-conduct) + - [Posting Issues and Comments](#posting-issues-and-comments) + - [Coding and PRs](#coding-and-prs) +- [Getting Started](#getting-started) +- [Pull Request Process](#pull-request-process) +- [Coding Conventions](#coding-conventions) +- [Documentation and Testing](#documentation-and-testing) +- [Contact \& Support](#contact--support) + +## General Guidelines + +- **Issues First**: If you're planning to add a new feature or change existing behavior, please open an issue first. This allows us to avoid multiple people working on similar features and provides a place for discussion. + +- **Stay Updated**: Always pull the latest changes from the main branch before creating a new branch or starting on new code. + +- **Simplicity Over Complexity**: Your solution should be as simple as possible, given the requirements. + +## Code of Conduct + +### Posting Issues and Comments + +- **Be Respectful**: Everyone is here to help and grow. Avoid any language that might be considered rude or offensive. + +- **Be Clear and Concise**: Always be clear about what you're suggesting or reporting. If an issue is related to a particular piece of code or a specific error message, include that in your comment. + +- **Stay On Topic**: Keep the conversation relevant to the issue at hand. If you have a new idea or unrelated question, please open a new issue. + +### Coding and PRs + +- **Stay Professional**: Avoid including "fun" code, comments, or irrelevant file changes in your commits and pull requests. + +## Getting Started + +1. **Fork the Repository**: Click on the "Fork" button at the top-right corner of this repository. + +2. **Clone the Forked Repository**: `git clone https://github.com/YOUR_USERNAME/PROJECT.git` + +3. **Navigate to the Directory**: `cd PROJECT` + +4. **Install Dependencies**: Always run `go mod download` or `make deps` after pulling to ensure tooling is up to date. + +## Pull Request Process + +1. **Create a Branch**: For every new feature or bugfix, create a new branch. + +2. **Commit Your Changes**: Make your changes and commit them. Commit messages should be clear and concise to explain what was done. + +3. **Run Tests**: Ensure all tests pass. + +4. **Documentation**: All code must be fully annotated with comments. Update the documentation by running `make docs` before creating a pull request. + +5. **Push to Your Fork**: `git push origin your-new-branch`. + +6. **Open a Pull Request**: Go to your fork on GitHub and click "New Pull Request". Fill out the PR template, explaining your changes. + +7. **Code Review**: At least two maintainers must review and approve the PR before it's merged. Address any feedback or changes requested. + +8. **Merge**: Once approved, the PR will be merged into the main branch. + +## Coding Conventions + +- **Code Style**: We use `Effective Go` guideline for our coding style. Run `make lint` to ensure your code adheres to this style. + +- **Testing**: Always include tests for new code or changes. We aim for industry-standard levels of test coverage. + +- **Documentation**: All exported functions, structures and modules should be documented. Use comments to describe the purpose, parameters, and return values. + +## Documentation and Testing + +- **Documentation**: Update the documentation whenever you add or modify the code. Run `make docs` to generate the latest docs. + +- **Testing**: Write comprehensive tests, ensuring edge cases are covered. All PRs should maintain or improve the current test coverage. + +## Contact & Support + +If you have any questions or need assistance with your contributions, feel free to reach out. Remember, we're here to help each other grow and improve the ecosystem. + +Thank you for being a part of this journey. Your contributions help shape the future of the BSV Blockchain! diff --git a/README.md b/README.md index 435d796a9..04fb84294 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,45 @@ # ARC ARC is a transaction processor for Bitcoin that keeps track of the life cycle of a transaction as it is processed by the Bitcoin network. Next to the mining status of a transaction, ARC also keeps track of the various states that a transaction can be in. +## Table of Contents +- [Documentation](#documentation) +- [Configuration](#configuration) +- [How to run ARC](#how-to-run-arc) + - [Docker](#docker) +- [Microservices](#microservices) + - [API](#api) + - [Integration into an echo server](#integration-into-an-echo-server) + - [Metamorph](#metamorph) + - [Metamorph transaction statuses](#metamorph-transaction-statuses) + - [Metamorph stores](#metamorph-stores) + - [Connections to Bitcoin nodes](#connections-to-bitcoin-nodes) + - [Whitelisting](#whitelisting) + - [ZMQ](#zmq) + - [BlockTx](#blocktx) + - [BlockTx stores](#blocktx-stores) +- [Message Queue](#message-queue) +- [K8s-Watcher](#k8s-watcher) +- [Broadcaster-cli](#broadcaster-cli) + - [Installation](#installation) + - [Configuration](#configuration-1) + - [How to use broadcaster-cli to send batches of transactions to ARC](#how-to-use-broadcaster-cli-to-send-batches-of-transactions-to-arc) +- [Tests](#tests) + - [Unit tests](#unit-tests) + - [Integration tests](#integration-tests) + - [E2E tests](#e2e-tests) +- [Monitoring](#monitoring) + - [Prometheus](#prometheus) + - [Profiler](#profiler) + - [Tracing](#tracing) +- [Building ARC](#building-arc) + - [Generate grpc code](#generate-grpc-code) + - [Generate REST API](#generate-rest-api) + - [Generate REST API documentation](#generate-rest-api-documentation) +- [Acknowledgements](#acknowledgements) +- [Contribution Guidelines](#contribution-guidelines) +- [Support \& Contacts](#support--contacts) + + ## Documentation - Find full documentation at [https://bitcoin-sv.github.io/arc](https://bitcoin-sv.github.io/arc) @@ -367,5 +406,24 @@ Once that is done the documentation can be created by running make docs ``` -# Acknowledgements +## Acknowledgements Special thanks to [rloadd](https://github.com/rloadd/) for his inputs to the documentation of ARC. + +## Contribution Guidelines + +We're always looking for contributors to help us improve the project. Whether it's bug reports, feature requests, or pull requests - all contributions are welcome. + +1. **Fork & Clone**: Fork this repository and clone it to your local machine. +2. **Set Up**: Run `make deps` to install all dependencies. +3. **Make Changes**: Create a new branch and make your changes. +4. **Test**: Ensure all tests pass by running `make test` and `make clean_restart_e2e_test`. +5. **Commit**: Commit your changes and push to your fork. +6. **Pull Request**: Open a pull request from your fork to this repository. + +For more details, check the [contribution guidelines](./CONTRIBUTING.md). + +For information on past releases, check out the [changelog](./CHANGELOG.md). + +## Support & Contacts + +For questions, bug reports, or feature requests, please open an issue on GitHub.