move contributing.md and update dev guide

This commit is contained in:
Joe 2022-07-29 11:04:46 +01:00
parent 45550ace2c
commit 28572eb110
4 changed files with 35 additions and 46 deletions

View File

@ -22,6 +22,17 @@ Please make sure your contributions adhere to our coding guidelines:
E.g. "eth, rpc: make trace configs optional" E.g. "eth, rpc: make trace configs optional"
Pull requests generally need to be based on and opened against the `master` branch,
unless by explicit agreement because the work is contributing to some more complex
feature branch.
All pull requests will be reviewed according to the
[Code Review guidelines](/content/docs/developers/geth-developer/Code-Review-Guidelines.md).
We encourage an early pull request approach, meaning pull requests are created as early
as possible even without the completed fix/feature. This will let core devs and other
volunteers know you picked up an issue. These early PRs should indicate 'in progress' status.
## Contributing to the Geth website ## Contributing to the Geth website
The Geth website is hosted separately from Geth itself. The contribution guidelines are the same. Please The Geth website is hosted separately from Geth itself. The contribution guidelines are the same. Please

View File

@ -3,50 +3,25 @@ title: Developer Guide
sort_key: A sort_key: A
--- ---
**NOTE: These instructions are for people who want to contribute Go source code changes. This document is the entry point for developers who wish to work on Geth.
If you just want to run ethereum, use the regular [Installation Instructions][install-guide].** Developers are people who are interested to build, develop, debug, submit
a bug report or pull request or otherwise contribute to the Geth source code.
This document is the entry point for developers of the Go implementation of Ethereum. Please see [Contributing](/content/docs/developers/contributing.md) for the
Developers here refer to the hands-on: who are interested in build, develop, debug, submit GHeth contribution guidelines.
a bug report or pull request or contribute code to go-ethereum.
## 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!
GitHub is used to track issues and contribute code, suggestions, feature requests or
documentation.
If you'd like to contribute to go-ethereum, please fork, fix, commit and send a pull
request (PR) 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 in the
go-ethereum [Discord Server][discord]. to ensure those changes are in line with the
general philosophy of the project and/or get some early feedback. This can reduce your
effort as well as speeding up our review and merge procedures.
PRs need to be based on and opened against the `master` branch (unless by explicit
agreement, you contribute to a complex feature branch).
Your PR will be reviewed according to the [Code Review guidelines][code-review].
We encourage a PR early approach, meaning you create the PR the earliest even without the
fix/feature. This will let core devs and other volunteers know you picked up an issue.
These early PRs should indicate 'in progress' status.
## Building and Testing ## Building and Testing
We assume that you have Go installed. Please use Go version 1.13 or later. We use the go Developers should use a recent version of Go for building and testing. We use the go
toolchain for development, which you can get from the [Go downloads page][go-install]. toolchain for development, which you can get from the [Go downloads page][go-install].
go-ethereum is a Go module, and uses the [Go modules system][go-modules] to manage Geth is a Go module, and uses the [Go modules system][go-modules] to manage
dependencies. Using `GOPATH` is not required to build go-ethereum. dependencies. Using `GOPATH` is not required to build go-ethereum.
### Building Executables ### Building Executables
Switch to the go-ethereum repository root directory. Switch to the go-ethereum repository root directory.
All code can be built using the go tool, placing the resulting binary in `$GOPATH/bin`.
You can build all code using the go tool, placing the resulting binary in `$GOPATH/bin`.
```text ```text
go install -v ./... go install -v ./...
@ -58,8 +33,7 @@ go-ethereum exectuables can be built individually. To build just geth, use:
go install -v ./cmd/geth go install -v ./cmd/geth
``` ```
If you want to compile geth for an architecture that differs from your host, please Cross compilation is not recommended, please build Geth for the host architecture.
consult our [cross compilation guide][cross-compile].
### Testing ### Testing
@ -75,8 +49,8 @@ Running an individual test:
go test -v ./eth -run TestMethod go test -v ./eth -run TestMethod
``` ```
**Note**: here all tests with prefix _TestMethod_ will be run, so if you got TestMethod, **Note**: here all tests with prefix _TestMethod_ will be run, so if TestMethod and
TestMethod1, then both tests will run. TestMethod1 both exist then both tests will run.
Running benchmarks, eg.: Running benchmarks, eg.:
@ -89,14 +63,14 @@ For more information, see the [go test flags][testflag] documentation.
### Getting Stack Traces ### Getting Stack Traces
If `geth` is started with the `--pprof` option, a debugging HTTP server is made available If `geth` is started with the `--pprof` option, a debugging HTTP server is made available
on port 6060. You can bring up <http://localhost:6060/debug/pprof> to see the heap, on port 6060. Navigating to <http://localhost:6060/debug/pprof> displays the heap,
running routines etc. By clicking "full goroutine stack dump" you can generate a trace running routines etc. By clicking "full goroutine stack dump" a trace can be generated
that is useful for debugging. that is useful for debugging.
Note that if you run multiple instances of `geth`, this port will only work for the first Note that if multiple instances of Geth exist, port `6060` will only work for the first
instance that was launched. If you want to generate stacktraces for these other instances, instance that was launched. To generate stacktraces for other instances,
you need to start them up choosing an alternative pprof port. Make sure you are they should be started up with alternative pprof ports. Ensure `stderr` is being
redirecting stderr to a logfile. redirected to a logfile.
``` ```
geth -port=30300 -verbosity 5 --pprof --pprof.port 6060 2>> /tmp/00.glog geth -port=30300 -verbosity 5 --pprof --pprof.port 6060 2>> /tmp/00.glog
@ -104,8 +78,8 @@ geth -port=30301 -verbosity 5 --pprof --pprof.port 6061 2>> /tmp/01.glog
geth -port=30302 -verbosity 5 --pprof --pprof.port 6062 2>> /tmp/02.glog geth -port=30302 -verbosity 5 --pprof --pprof.port 6062 2>> /tmp/02.glog
``` ```
Alternatively if you want to kill the clients (in case they hang or stalled syncing, etc) Alternatively to kill the clients (in case they hang or stalled syncing, etc)
and have the stacktrace too, you can use the `-QUIT` signal with `kill`: and have the stacktrace too, use the `-QUIT` signal with `kill`:
``` ```
killall -QUIT geth killall -QUIT geth

View File

@ -1,3 +1,7 @@
---
title: Node architecture
root: ..
---
## Node architecture ## Node architecture

View File

@ -1,5 +1,5 @@
--- ---
title: Home title: Abigen
root: .. root: ..
--- ---