[DOCS] massive documentation update (#20229)

This PR:

- reorganizes all documentation pages so they live in the right category
- removes lots of legacy docs
- contains many improvements to active documentation pages

Geth user documentation is now spread across five major categories:

- Install and Build: installation and compile instructions
- Using Geth: this is for pages about general geth usage.
- For dApp Developers: this is for programming guides and functionality specific
   to dapp development. All the dev guides for mobile framework and Go APIs live here.
- JSON-RPC APIs: this has its own section because there is now a sub-page for
   every name space. I have also added an overview text that explains how to set
   up the API servers.
- For Geth Developers: this is for geth contributors
This commit is contained in:
Felix Lange
2019-11-05 13:46:00 +01:00
committed by GitHub
parent 86b20d897e
commit 7416b05b81
76 changed files with 3537 additions and 4680 deletions

View File

@ -1,121 +0,0 @@
---
title: Creating your own Ethereum apps using Eth go
---
**This page is heavily outdated**
The modular nature of Go and the Ethereum Go implementation make it very easy to build your own Ethereum native applications.
This post will cover the minimal steps required to build an native Ethereum application.
Ethereum comes with a global config found in the ethutil package. The global config requires you to set a base path to store it's files (database, settings, etc).
```go
func main() {
// Read config
ethutil.ReadConfig(".test", ethutil.LogStd, nil, "MyEthApp")
}
```
ReadConfig takes four arguments. The data folder to use, a log flag, a globalConf instance and an id string to identify your app to other nodes in the network.
Once you've configured the global config you can set up and create your Ethereum node. The Ethereum Object, or Node, will handle all trafic from and to the Ethereum network as well as handle all incoming block and transactions. A new node can be created through the `new` method found in eth-go.
```go
func main() {
// Read config
ethutil.ReadConfig(".test", ethutil.LogStd, nil, "MyEthApp")
// Create a new ethereum node
ethereum, err := eth.New(eth.CapDefault, false)
if err != nil {
panic(fmt.Sprintf("Could not start node: %s\n", err))
}
// Set the port (default 30303)
ethereum.Port = "10101"
// Once we reach max, bounce them off.
ethereum.MaxPeers = 10
}
```
New requires two arguments; the capabilities of the node and whether or not to use UPNP for port-forwarding. If you don't want to fallback to client-only features set an Ethereum port and the max amount of peers this node can connect to.
In order to identify the node to the network you'll be required to create a private key. The easiest way to create a new keypair is by using the `KeyRing` found in the `ethutil` package.
```go
func main() {
// Read config
ethutil.ReadConfig(".test", ethutil.LogStd, nil, "MyEthApp")
// Create a new ethereum node
ethereum, err := eth.New(eth.CapDefault, false)
if err != nil {
panic(fmt.Sprintf("Could not start node: %s\n", err))
}
// Set the port (default 30303)
ethereum.Port = "10101"
// Once we reach max, bounce them off.
ethereum.MaxPeers = 10
keyRing := ethutil.GetKeyRing()
// Create a new key if non exist
if keyRing.Len() == 0 {
// Create a new keypair
keyPair, err := ethutil.GenerateNewKeyPair()
if err != nil {
panic(err)
}
// Add the keypair to the key ring
keyRing.Add(keyPair)
}
}
```
Once the base Ethereum stack has been set up it's time to fire up its engines and connect to the main network.
```go
package main
import (
"github.com/ethereum/eth-go"
"github.com/ethereum/eth-go/ethutil"
)
func main() {
// Read config
ethutil.ReadConfig(".test", ethutil.LogStd, nil, "MyEthApp")
// Create a new ethereum node
ethereum, err := eth.New(eth.CapDefault, false)
if err != nil {
panic(fmt.Sprintf("Could not start node: %s\n", err))
}
// Set the port (default 30303)
ethereum.Port = "10101"
// Once we reach max, bounce them off.
ethereum.MaxPeers = 10
keyRing := ethutil.GetKeyRing()
// Create a new key if non exist
if keyRing.Len() == 0 {
// Create a new keypair
keyPair, err := ethutil.GenerateNewKeyPair()
if err != nil {
panic(err)
}
// Add the keypair to the key ring
keyRing.Add(keyPair)
}
ethereum.Start(true)
ethereum.WaitForShutdown()
}
```
`ethereum.Start()` takes one argument, whether or not we want to connect to one of the known seed nodes. If you want your own little testnet-in-a-box you can disable it else set it to true.
Your node should now be catching up with the blockchain. From here on out you are on your own. You could create a reactor to listen to specific events or just dive into the chain state directly. If you want to look at some example code you can check [DNSEth here.](https://github.com/maran/dnseth)
Have fun!

View File

@ -0,0 +1,86 @@
---
title: Disclaimer
---
Safety caveats
## Security warnings
* **You are responsible for your own computer security.** If your machine is compromised you **will** lose your ether, access to any contracts and maybe more.
* **You are responsible for your own actions.** If you mess something up or break any laws while using this software, it's your fault, and your fault only.
* **You are responsible for your own karma.** Don't be a jerk and respect others.
* This software is open source under a [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0.en.html) license.
## Legal warning: Disclaimer of Liabilites and Warranties
### Short version
* **The user expressly knows and agrees that the user is using the ethereum platform at the users sole risk.**
* **The user represents that the user has an adequate understanding of the risks, usage and intricacies of cryptographic tokens and blockchain-based open source software, eth platform and eth.**
* **The user acknowledges and agrees that, to the fullest extent permitted by any applicable law, the disclaimers of liability contained herein apply to any and all damages or injury whatsoever caused by or related to risks of, use of, or inability to use, eth or the ethereum platform under any cause or action whatsoever of any kind in any jurisdiction, including, without limitation, actions for breach of warranty, breach of contract or tort (including negligence) and that neither stiftung ethereum nor the ethereum team shall be liable for any indirect, incidental, special, exemplary or consequential damages, including for loss of profits, goodwill or data.**
* **Some jurisdictions do not allow the exclusion of certain warranties or the limitation or exclusion of liability for certain types of damages. therefore, some of the above limitations in this section may not apply to a user. In particular, nothing in these terms shall affect the statutory rights of any user or exclude injury arising from any willful misconduct or fraud of stiftung ethereum.**
### Long Version: Terms and Conditions
The following Terms and Conditions (“Terms”) govern the use of the Ethereum open source software platform (“Ethereum Platform”). Prior to any use of the Ethereum Platform, the User confirms to understand and expressly agrees to all of the Terms. All capitalized terms in this agreement will be given the same effect and meaning as in the Terms. The group of developers and other personnel that is now, or will be, employed by, or contracted with, Stiftung Ethereum (“Stiftung Ethereum”) is termed the “Ethereum Team.” The Platform will be developed by persons and entities who support Ethereum, including both volunteers and developers who are paid by nonprofit entities interested in supporting the Ethereum Platform.
The user acknowledges the following serious risks to any use the Ethereum Platform and ETH and expressly agrees not to hold liable Ethereum Stiftung or Ethereum Team should any of these risks occur:
#### Risk of Regulatory Actions in One or More Jurisdictions
The Ethereum Platform and ETH could be impacted by one or more regulatory inquiries or regulatory action, which could impede or limit the ability of Stiftung Ethereum to continue to develop the Ethereum Platform, or which could impeded or limit the ability of User to use Ethereum Platform or ETH.
#### Risk of Alternative, Unofficial Ethereum Networks
It is possible that alternative Ethereum-based networks could be established, which utilize the same open source source code and open source protocol underlying the Ethereum Platform. The Ethereum network may compete with these alternative Ethereum-based networks, which could potentially negatively impact the Ethereum Platform and ETH.
#### Risk of Insufficient Interest in the Ethereum Platform or Distributed Applications
It is possible that the Ethereum Platform will not be used by a large number of external businesses, individuals, and other organizations and that there will be limited public interest in the creation and development of distributed applications. Such a lack of interest could impact the development of the Ethereum Platform and potential uses of ETH. It cannot predict the success of its own development efforts or the efforts of other third parties.
#### Risk that the Ethereum Platform, As Developed, Will Not Meet the Expectations of User
The User recognizes that the Ethereum Platform is under development and may undergo significant changes before release. User acknowledges that any expectations regarding the form and functionality of the Ethereum Platform held by the User may not be met upon release of the Ethereum Platform, for any number of reasons including a change in the design and implementation plans and execution of the implementation of the Ethereum Platform.
#### Risk of Security Weaknesses in the Ethereum Platform Core Infrastructure Software
The Ethereum Platform rests on open-source software, and there is a risk that the Ethereum Stiftung or the Ethereum Team, or other third parties not directly affiliated with the Stiftung Ethereum, may introduce weaknesses or bugs into the core infrastructural elements of the Ethereum Platform causing the system to lose ETH stored in one or more User accounts or other accounts or lose sums of other valued tokens issued on the Ethereum Platform.
#### Risk of Weaknesses or Exploitable Breakthroughs in the Field of Cryptography
Cryptography is an art, not a science. And the state of the art can advance over time Advances in code cracking, or technical advances such as the development of quantum computers, could present risks to cryptocurrencies and the Ethereum Platform, which could result in the theft or loss of ETH. To the extent possible, Stiftung Ethereum intends to update the protocol underlying the Ethereum Platform to account for any advances in cryptography and to incorporate additional security measures, but cannot it cannot predict the future of cryptography or the success of any future security updates.
#### Risk of Ether Mining Attacks
As with other cryptocurrencies, the blockchain used for the Ethereum Platform is susceptible to mining attacks, including but not limited to double-spend attacks, majority mining power attacks, “selfish-mining” attacks, and race condition attacks. Any successful attacks present a risk to the Ethereum Platform, expected proper execution and sequencing of ETH transactions, and expected proper execution and sequencing of contract computations. Despite the efforts of the Ethereum Stiftung and Team, known or novel mining attacks may be successful.
#### Risk of Rapid Adoption and Increased Demand
If the Ethereum Platform is rapidly adopted, the demand for ETH could rise dramatically and at a pace that exceeds the rate with which ETH miners can create new ETH tokens. Under such a scenario, the entire Ethereum Platform could become destabilized, due to the increased cost of running distributed applications. In turn, this could dampen interest in the Ethereum Platform and ETH. Instability in the demand of for ETH may lead to a negative change of the economical parameters of an Ethereum based business which could result in the business being unable to continue to operate economically or to cease operation.
#### Risk of Rapid Adoption and Insufficiency of Computational Application Processing Power on the Ethereum Platform
If the Ethereum Platform is rapidly adopted, the demand for transaction processing and distributed application computations could rise dramatically and at a pace that exceeds the rate with which ETH miners can bring online additional mining power. Under such a scenario, the entire Ethereum Platform could become destabilized, due to the increased cost of running distributed applications. In turn, this could dampen interest in the Ethereum Platform and ETH. Insufficiency of computational resources and an associated rise in the price of ETH could result in businesses being unable to acquire scarce computational resources to run their distributed applications. This would represent revenue losses to businesses or worst case, cause businesses to cease operations because such operations have become uneconomical due to distortions in the crypto-economy.
Acknowledgment, Acceptance of all Risks and Disclaimer of Warranties and Liabilities
**THE USER EXPRESSLY KNOWS AND AGREES THAT THE USER IS USING THE ETHEREUM PLATFORM AT THE USERS SOLE RISK. THE USER REPRESENTS THAT THE USER HAS AN ADEQUATE UNDERSTANDING OF THE RISKS, USAGE AND INTRICACIES OF CRYPTOGRAPHIC TOKENS AND BLOCKCHAIN-BASED OPEN SOURCE SOFTWARE, ETH PLATFORM AND ETH. THE USER ACKNOWLEDGES AND AGREES THAT, TO THE FULLEST EXTENT PERMITTED BY ANY APPLICABLE LAW, THE DISCLAIMERS OF LIABILITY CONTAINED HEREIN APPLY TO ANY AND ALL DAMAGES OR INJURY WHATSOEVER CAUSED BY OR RELATED TO RISKS OF, USE OF, OR INABILITY TO USE, ETH OR THE ETHEREUM PLATFORM UNDER ANY CAUSE OR ACTION WHATSOEVER OF ANY KIND IN ANY JURISDICTION, INCLUDING, WITHOUT LIMITATION, ACTIONS FOR BREACH OF WARRANTY, BREACH OF CONTRACT OR TORT (INCLUDING NEGLIGENCE) AND THAT NEITHER STIFTUNG ETHEREUM NOR ETHERUM TEAM SHALL BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES, INCLUDING FOR LOSS OF PROFITS, GOODWILL OR DATA. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF CERTAIN WARRANTIES OR THE LIMITATION OR EXCLUSION OF LIABILITY FOR CERTAIN TYPES OF DAMAGES. THEREFORE, SOME OF THE ABOVE LIMITATIONS IN THIS SECTION MAY NOT APPLY TO A USER. IN PARTICULAR, NOTHING IN THESE TERMS SHALL AFFECT THE STATUTORY RIGHTS OF ANY USER OR EXCLUDE INJURY ARISING FROM ANY WILLFUL MISCONDUCT OR FRAUD OF STIFTUNG ETHEREUM**.
#### Dispute Resolution
All disputes or claims arising out of, relating to, or in connection with the Terms, the breach thereof, or use of the Ethereum Platform shall be finally settled under the Rules of Arbitration of the International Chamber of Commerce by one or more arbitrators appointed in accordance with said Rules. All claims between the parties relating to these Terms that are capable of being resolved by arbitration, whether sounding in contract, tort, or otherwise, shall be submitted to ICC arbitration. Prior to commencing arbitration, the parties have a duty to negotiate in good faith and attempt to resolve their dispute in a manner other than by submission to ICC arbitration. The arbitration panel shall consist of one arbitrator only, unless the ICC Court of Arbitration determines that the dispute is such as to warrant three arbitrators. If the Court determines that one arbitrator is sufficient, then such arbitrator shall be Swiss resident. If the Court determines that three arbitrators are necessary, then each party shall have 30 days to nominate an arbitrator of its choice -- in the case of the Claimant, measured from receipt of notification of the ICC Courts decision to have three arbitrators; in the case of Respondent, measured from receipt of notification of Claimants nomination. All nominations must be Swiss resident. If a party fails to nominate an arbitrator, the Court will do so. The Court shall also appoint the chairman. All arbitrators shall be and remain “independent” of the parties involved in the arbitration. The place of arbitration shall be Zug, Switzerland. The language of the arbitration shall be English. In deciding the merits of the dispute, the tribunal shall apply the laws of Switzerland and any discovery shall be limited and shall not involve any depositions or any other examinations outside of a formal hearing. The tribunal shall not assume the powers of amiable compositeur or decide the case ex aequo et bono. In the final award, the tribunal shall fix the costs of the arbitration and decide which of the parties shall bear such costs in what proportion. Every award shall be binding on the parties. The parties undertake to carry out the award without delay and waive their right to any form of recourse against the award in so far as such waiver can validly be made.
#### Force Majeure
**STIFTUNG ETHEREUM** is finally not liable for:
* unavoidable casualty,
* delays in delivery of materials,
* embargoes,
* government orders,
* acts of civil or military authorities,
* lack of energy, or
* any similar unforeseen event that renders performance commercially implausible.

View File

@ -0,0 +1,31 @@
---
title: Ethereum specification
---
Specifications of all ethereum technologies, languages, protocols, etc.
### Whitepapers and design rationale
- [Ethereum Whitepaper](https://github.com/ethereum/wiki/wiki/White-Paper)
- [Design Rationale](https://github.com/ethereum/wiki/wiki/Design-Rationale)
- [Ethereum Yellow Paper](http://gavwood.com/Paper.pdf)
- [ÐΞVp2p Whitepaper](https://github.com/ethereum/wiki/wiki/libp2p-Whitepaper) (WiP)
- [Ethash](https://github.com/ethereum/wiki/wiki/Ethash)
### Specs
- [JavaScript API](https://github.com/ethereum/wiki/wiki/JavaScript-API#a)
- [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC)
- [JSRE admin API](../interface/javascript-console)
- [RLP](https://github.com/ethereum/wiki/wiki/RLP)
- [ÐΞVp2p Wire Protocol](https://github.com/ethereum/wiki/wiki/%C3%90%CE%9EVp2p-Wire-Protocol)
- [Web3 Secret Storage](https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition)
- [Patricia Tree](https://github.com/ethereum/wiki/wiki/Patricia-Tree)
- [Wire protocol](https://github.com/ethereum/wiki/wiki/Ethereum-Wire-Protocol)
- [Light client protocol](https://github.com/ethereum/wiki/wiki/Light-client-protocol)
- [Solidity, Docs & ABI](https://github.com/ethereum/wiki/wiki/Solidity,-Docs-and-ABI)
- [NatSpec](https://github.com/ethereum/wiki/wiki/Ethereum-Natural-Specification-Format)
- [Contract ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI)
- [Ethash](https://github.com/ethereum/wiki/wiki/Ethash)
- [Ethash C API](https://github.com/ethereum/wiki/wiki/Ethash-C-API)
- [Ethash DAG](https://github.com/ethereum/wiki/wiki/Ethash-DAG)
- [ICAP: Inter-exchange Client Address Protocol](https://github.com/ethereum/wiki/wiki/ICAP:-Inter-exchange-Client-Address-Protocol)

View File

@ -0,0 +1,66 @@
---
title: Ethereum on Android
---
Building Geth for Android is a non trivial task, as it requires cross compiling external C dependencies ([GNU Arithmetic Library](https://gmplib.org/)); internal C dependencies ([ethash](https://github.com/ethereum/ethash)); as well as the entire CGO enabled Go code-base to Android. This is further complicated by the Position Independent Executables (PIE) security feature introduced since Android 4.1 Jelly Bean, requiring different compiler and linker options based on the target Android platform version.
To cope with all the build issues, the [`xgo`](https://github.com/karalabe/xgo) CGO enabled Go cross compiler is used, which assembles an entire multi-platform cross compiler suite into a single mega docker container. Details about using `xgo` can be found in the project's [README](https://github.com/karalabe/xgo/blob/master/README.md), with Ethereum specifics on the [go-ethereum cross compilation](../developers/cross-compiling-ethereum).
TL;DR
```
$ go get -u github.com/karalabe/xgo
$ xgo --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 \
--branch=develop \
--targets=android-16/arm \
github.com/ethereum/go-ethereum/cmd/geth
$ ls -al
-rwxr-xr-x 1 root root 23213348 Sep 14 19:35 geth-android-16-arm
```
## Deploying a binary
Currently `xgo` will compile a native Android binary that can be copied onto a device and executed from a terminal emulator. As Ethereum Android support at the moment is mostly a developer feature, there have been no attempts at making it even remotely user friendly (installers, APKs, etc).
To push a native binary onto an Android device, you'll need an Android SDK installed. The most lightweight solution is the standalone [SDK Tools Only](https://developer.android.com/sdk/index.html#Other) package. Download and extract for your local machine's platform. Since building the binary is already done, we only need the [Android Debug Bridge](http://developer.android.com/tools/help/adb.html) to push it to our device, which can be installed using the SDK's `android` tool `$YOUR_SDK_PATH/tools/android` -> `Android SDK Platform Tools` (deselect everything else). We'll assume `$YOUR_SDK_PATH/platform-tools/adb` is in the PATH environmental variable from now on.
You can list the available devices via:
```
$ adb devices
List of devices attached
0149CBF30201400E device
```
Deploying the binary to an Android device can be done in two steps. First copy the binary into the non-executable `sdcard` filesystem on the device. You may be asked the first time by the device to grant developer permission (also developer mode should be enabled on the devices prior).
```
$ adb push $PATH_TO_BINARY/geth-android-16-arm /sdcard/
1984 KB/s (23213348 bytes in 11.421s)
```
Then the binary needs to be moved to a file system with executable permissions, and said permissions need to be granted. On an unrooted phone the following path should be accessible with USB developer options.
```
$ adb shell
$ cp /sdcard/geth-android-16-arm /data/local/tmp/geth
$ cd /data/local/tmp
$ chmod 751 geth
```
## Running the deployed binary
After pushing the binary to the device and setting the appropriate permissions, you may execute Geth straight from the Android Debug Bridge shell:
```
$ ./geth
I0911 11:09:05.329120 1427 cmd.go:125] Starting Geth/v1.1.0/android/go1.5.1
I0911 11:09:05.466782 1427 server.go:311] Starting Server
I0911 11:09:05.823965 1427 udp.go:207] Listening, enode://824e1a16bd6cb9931bec1ab6268cd76571936d5674505d53c7409b2b860cd9e396a66c7fe4c3ad4e60c43fe42408920e33aaf3e7bbdb6123f8094dbc423c2bb1@[::]:30303
I0911 11:09:05.832037 1427 backend.go:560] Server started
I0911 11:09:05.848936 1427 server.go:552] Listening on [::]:30303
```
A fancier way would be to start a terminal emulator on the Android device itself and run the binary expressly from it (remember, deployed at `/data/local/tmp/geth`):
![Geth on Android](http://i.imgur.com/wylOsBL.jpg)

View File

@ -0,0 +1,44 @@
---
title: Gas price oracle
---
The gas price oracle is a helper function of the Geth client that tries to find an
appropriate default gas price when sending transactions. It can be parametrized with the
following command line options:
- `gpomin`: lower limit of suggested gas price. This should be set at least as high as the
`gasprice` setting usually used by miners so that your transactions will not be rejected
automatically because of a too low price.
- `gpomax`: higher limit of suggested gas price. During load peaks when there is a
competition between transactions to get into the blocks, the price needs to be limited,
otherwise the oracle would eventually try to overbid everyone else at any price.
- `gpofull`: a block is considered "full" when a certain percentage of the block gas limit
(specified in percents) is used up by transactions. If a block is not "full", that means
that a transaction could have been accepted even with a minimal price offered.
- `gpobasedown`: an exponential ratio (specified in `1/1000ths`) by which the base price
decreases when the lowest acceptable price of the last block is below the last base
price.
- `gpobaseup`: an exponential ratio (specified in `1/1000ths`) by which the base price
increases when the lowest acceptable price of the last block is over the last base
price.
- `gpobasecf`: a correction factor (specified in percents) of the base price. The
suggested price is the corrected base price, limited by `gpomin` and `gpomax`.
The lowest acceptable price is defined as a price that could have been enough to insert a
transaction into a certain block. Although this value varies slightly with the gas used by
the particular transaction, it is aproximated as follows: if the block is full, it is the
lowest transaction gas price found in that block. If the block is not full, it equals to
gpomin.
The base price is a moving value that is adjusted from block to block, up if it was lower
than the lowest acceptable price, down otherwise. Note that there is a slight amount of
randomness added to the correction factors so that your client will not behave absolutely
predictable on the market.
If you want to specify a constant for the default gas price and not use the oracle, set
both `gpomin` and `gpomax` to the same value.

View File

@ -1 +0,0 @@
see here https://github.com/ethersphere/go-ethereum/wiki/IPFS--SWARM

View File

@ -0,0 +1,116 @@
---
title: Metrics and monitoring
---
Geth has quite a nice logging system, capable of creating leveled log entries tagged with various parts of the system. This helps enormously during debugging to see exactly what the system is doing, what branches it's taking, etc. However, logs are not particularly useful when the system does work correctly, just not very optimally: one - or even a handful - of logged events is not really statistically relevant, and tracing more in log files can quickly become unwieldy.
The goal of the Geth metrics system is that - similar to logs - we should be able to add arbitrary metric collection to any part of the code without requiring fancy constructs to analyze them (counter variables, public interfaces, crossing over the APIs, console hooks, etc). Instead, we should just "update" metrics whenever and wherever needed, and have them automatically collected, surfaced through the APIs, queryable and visualizable for analysis.
To that extent, Geth currently implement two types of metrics:
* **Meters**: Analogous to physical meters (electricity, water, etc), they are capable of measuring the *amount* of "things" that pass through and at the *rate* at which they do that. A meter doesn't have a specific unit of measure (byte, block, malloc, etc), it just counts arbitrary *events*. At any point in time it can report:
* *Total number of events* that passed through the meter
* *Mean throughput rate* of the meter since startup (events / second)
* *Weighted throughput rate* in the last *1*, *5* and *15* minutes (events / second)
* (*"weighted" means that recent seconds count more that in older ones*)
* **Timers**: Extension of *meters*, where not only the occurrence of some event is measured, its *duration* is also collected. Similarly to meters, a timer can also measure arbitrary events, but each requires a duration to be assigned individually. Beside **all** the reports a meter can generate, a timer has additionally:
* *Percentiles (5, 20, 50, 80, 95)*, reporting that some percentage of the events took less than the reported time to execute (*e.g. Percentile 20 = 1.5s would mean that 20% of the measured events took less time than 1.5 seconds to execute; inherently 80%(=100%-20%) took more that 1.5s*)
* Percentile 5: minimum durations (this is as fast as it gets)
* Percentile 50: well behaved samples (boring, just to give an idea)
* Percentile 80: general performance (these should be optimised)
* Percentile 95: worst case outliers (rare, just handle gracefully)
## Creating and updating metrics
Although the Geth metrics system is based on the [`go-metrics`](https://github.com/rcrowley/go-metrics) library, custom metric constructors are used that take into consideration the CLI flags to enable or disable metrics collection and reporting:
```go
meter := metrics.NewMeter("system/memory/allocs")
timer := metrics.NewTimer("chain/inserts")
```
The name can be any arbitrary string, however since Geth assumes it to be some meaningful sub-system hierarchy, please name accordingly. Metrics can then be updated equally simply:
```go
meter.Mark(n) // Record the occurrence of `n` events
timer.Update(duration) // Record an event that took `duration`
timer.UpdateSince(time) // Record an event that started at `time`
timer.Time(function) // Measure and record the execution of `function`
```
Note, metrics collection is disabled by default in order not to incur reporting overhead for the average user. To enable it please specify the `--metrics` flag to geth.
## Querying metrics
Geth automatically exposes all collected metrics in the `debug` RPC API, through the `metrics` method, hence these can be queried simply from the console in:
```javascript
> debug.metrics().p2p.InboundTraffic
{
Avg01Min: '169.12K (2.82K/s)',
Avg05Min: '1.92M (6.42K/s)',
Avg15Min: '3.57M (3.96K/s)',
Total: '5.83M (2.97K/s)'
}
> debug.metrics().chain.inserts
{
Avg01Min: '10 (0.17/s)',
Avg05Min: '61 (0.20/s)',
Avg15Min: '168 (0.19/s)',
Maximum: '2.157261657s',
Minimum: '2.271716ms',
Percentiles: {
20: '6.993756ms',
50: '12.342836ms',
80: '21.765944ms',
95: '218.500479ms',
99: '376.015984ms'
},
Total: '432 (0.22/s)'
}
```
By default, the reported metrics are scaled and formatted in a user friendly way to allow quick inspection. These are however not appropriate for programmatic processing, so the raw values may be retrieved via an optional flag:
```javascript
> debug.metrics(true).p2p.InboundTraffic
{
AvgRate01Min: 1599.6190029292586,
AvgRate05Min: 5367.754506658111,
AvgRate15Min: 3761.057607521597,
MeanRate: 2907.3919382272857,
Total: 5901154
}
```
## Monitoring metrics
Although inspecting metrics via the console is very useful to gain an insight into the internal state of Geth, it falls short of visualizing how these metrics evolve over time, possibly under different circumstances and events. To overcome this limitation, Geth introduces a monitoring tool (`geth monitor`) that periodically queries a node for the requested metrics and plots them on a terminal based UI.
![Monitoring tool](http://i.imgur.com/Nug0sPG.png)
Monitoring can be started via:
```
geth monitor [--attach=api-endpoint] metric1 metric2 ... metricN
```
Where a metric may be:
* Full canonical metric (e.g. `system/memory/allocs/AvgRate05Min`)
* Group of metrics (e.g. `system/memory/allocs` or `system/memory`)
* Multiple branching metrics (e.g. `system/memory/allocs,frees/AvgRate01Min`)
Not yet supported but planned:
* Wildcard pattern (e.g. `system/memory/*/AvgRate01Min`)
* Exclusion pattern (e.g. `system/memory/allocs/!AvgRate01Min`)
By default `geth monitor` uses 5 chart rows. This makes comparative charts easy as meters have 5 components, and timers 10 (out of which 5 are throughput and 5 percentiles). For custom layout you can override with `--rows`.
## Available metrics
Metrics are a debugging tool, with every developer being free to add, remove or modify them as seen fit. As they can change between commits, the exactly available ones can be queried via `geth monitor` or via `debug.metrics(false)` in the console. A few however may warrant longevity, so feel free to add to the below list if you feel it's worth a more general audience:
* system/memory/
* allocs: number of memory allocations made
* frees: number of memory releases made
* inuse: memory currently being used
* pauses: time spent in the garbage collector

View File

@ -1,295 +0,0 @@
---
title: Mining
---
* [Introduction to Ethereum mining](https://github.com/ethereum/wiki/wiki/Mining#introduction) _(main wiki)_
**This page is heavily outdated**
# CPU Mining with Geth
At Frontier, the first release of Ethereum, you'll just need a) a GPU and b) an Ethereum client, Geth. CPU mining will be possible but too inefficient to hold any value.
At the moment, Geth only includes a CPU miner, and the team is testing a GPU miner branch, but this won't be part of Frontier.
The C++ implementation of Ethereum also offers a GPU miner, both as part of Eth (its CLI), AlethZero (its GUI) and EthMiner (the standalone miner).
_**NOTE:** Ensure your blockchain is fully synchronised with the main chain before starting to mine, otherwise you will not be mining on the main chain._
When you start up your ethereum node with `geth` it is not mining by default. To start it in mining mode, you use the `--mine` [command line option](../interface/command-line-options). The `-minerthreads` parameter can be used to set the number parallel mining threads (defaulting to the total number of processor cores).
`geth --mine --minerthreads=4`
You can also start and stop CPU mining at runtime using the [console](../interface/javascript-console). `miner.start` takes an optional parameter for the number of miner threads.
```
> miner.start(8)
true
> miner.stop()
true
```
Note that mining for real ether only makes sense if you are in sync with the network (since you mine on top of the consensus block). Therefore the eth blockchain downloader/synchroniser will delay mining until syncing is complete, and after that mining automatically starts unless you cancel your intention with `miner.stop()`.
In order to earn ether you must have your **etherbase** (or **coinbase**) address set. This etherbase defaults to your [primary account](../interface/managing-your-accounts). If you don't have an etherbase address, then `geth --mine` will not start up.
You can set your etherbase on the command line:
```
geth --etherbase 1 --mine 2>> geth.log // 1 is index: second account by creation order OR
geth --etherbase '0xa4d8e9cae4d04b093aac82e6cd355b6b963fb7ff' --mine 2>> geth.log
```
You can reset your etherbase on the console too:
```
miner.setEtherbase(eth.accounts[2])
```
Note that your etherbase does not need to be an address of a local account, just an existing one.
There is an option [to add extra Data](../interface/javascript-console) (32 bytes only) to your mined blocks. By convention this is interpreted as a unicode string, so you can set your short vanity tag.
```
miner.setExtra("ΞTHΞЯSPHΞЯΞ")
...
debug.printBlock(131805)
BLOCK(be465b020fdbedc4063756f0912b5a89bbb4735bd1d1df84363e05ade0195cb1): Size: 531.00 B TD: 643485290485 {
NoNonce: ee48752c3a0bfe3d85339451a5f3f411c21c8170353e450985e1faab0a9ac4cc
Header:
[
...
Coinbase: a4d8e9cae4d04b093aac82e6cd355b6b963fb7ff
Number: 131805
Extra: ΞTHΞЯSPHΞЯΞ
...
}
```
See also [this proposal](https://github.com/ethereum/wiki/wiki/Extra-Data)
You can check your hashrate with [miner.hashrate](../interface/javascript-console), the result is in H/s (Hash operations per second).
```
> miner.hashrate
712000
```
After you successfully mined some blocks, you can check the ether balance of your etherbase account. Now assuming your etherbase is a local account:
```
> eth.getBalance(eth.coinbase).toNumber();
'34698870000000'
```
In order to spend your earnings you will need to have this account unlocked.
```
> personal.unlockAccount(eth.coinbase)
Password
true
```
You can check which blocks are mined by a particular miner (address) with the following code snippet on the console:
```
function minedBlocks(lastn, addr) {
addrs = [];
if (!addr) {
addr = eth.coinbase
}
limit = eth.blockNumber - lastn
for (i = eth.blockNumber; i >= limit; i--) {
if (eth.getBlock(i).miner == addr) {
addrs.push(i)
}
}
return addrs
}
// scans the last 1000 blocks and returns the blocknumbers of blocks mined by your coinbase
// (more precisely blocks the mining reward for which is sent to your coinbase).
minedBlocks(1000, eth.coinbase);
//[352708, 352655, 352559]
```
Note that it will happen often that you find a block yet it never makes it to the canonical chain. This means when you locally include your mined block, the current state will show the mining reward credited to your account, however, after a while, the better chain is discovered and we switch to a chain in which your block is not included and therefore no mining reward is credited. Therefore it is quite possible that as a miner monitoring their coinbase balance will find that it may fluctuate quite a bit.
The logs show locally mined blocks confirmed after 5 blocks. At the moment you may find it easier and faster to generate the list of your mined blocks from these logs.
Mining success depends on the set block difficulty. Block difficulty dynamically adjusts each block in order to regulate the network hashing power to produce a 12 second blocktime. Your chances of finding a block therefore follows from your hashrate relative to difficulty. The time you need to wait you are expected to find a block can be estimated with the following code:
**INCORRECT...CHECKING**
```
etm = eth.getBlock("latest").difficulty/miner.hashrate; // estimated time in seconds
Math.floor(etm / 3600.) + "h " + Math.floor((etm % 3600)/60) + "m " + Math.floor(etm % 60) + "s";
// 1h 3m 30s
```
Given a difficulty of 3 billion, a typical CPU with 800KH/s is expected to find a block every ....?
# GPU mining
***
## Hardware
The algorithm is memory hard and in order to fit the DAG into memory, it needs 1-2GB of RAM on each GPU. If you get ` Error GPU mining. GPU memory fragmentation?` you havent got enough memory.
The GPU miner is implemented in OpenCL, so AMD GPUs will be 'faster' than same-category NVIDIA GPUs.
ASICs and FPGAs are relatively inefficient and therefore discouraged.
To get openCL for your chipset and platform, try:
* [AMD SDK openCL](http://developer.amd.com/tools-and-sdks)
* [NVIDIA CUDA openCL](https://developer.nvidia.com/cuda-downloads)
## On Ubuntu
### AMD
* http://developer.amd.com/tools-and-sdks
download: `ADL_SDK8.zip ` and `AMD-APP-SDK-v2.9-1.599.381-GA-linux64.sh`
```
./AMD-APP-SDK-v2.9-1.599.381-GA-linux64.sh
ln -s /opt/AMDAPPSDK-2.9-1 /opt/AMDAPP
ln -s /opt/AMDAPP/include/CL /usr/include
ln -s /opt/AMDAPP/lib/x86_64/* /usr/lib/
ldconfig
reboot
```
```
apt-get install fglrx-updates
// wget, tar, opencl
sudo aticonfig --adapter=all --initial
sudo aticonfig --list-adapters
* 0. 01:00.0 AMD Radeon R9 200 Series
* - Default adapter
```
### Nvidia
The following instructions are, for the most part, relevant to any system with Ubuntu 14.04 and a Nvidia GPU.
[Setting up an EC2 instance for mining](https://forum.ethereum.org/discussion/comment/8889/#Comment_8889)
## On MacOSx
```
wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.29_mac.pkg
sudo installer -pkg ~/Desktop/cuda_7.0.29_mac.pkg -target /
brew update
brew tap ethereum/ethereum
brew reinstall cpp-ethereum --with-gpu-mining --devel --headless --build-from-source
```
You check your cooling status:
aticonfig --adapter=0 --od-gettemperature
## Mining Software
The official Frontier release of `geth` only supports a CPU miner natively. We are working on a GPU miner, but it may not be available for the Frontier release. Geth however can be used in conjunction with `ethminer`, using the standalone miner as workers and `geth` as scheduler communicating via [JSON-RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC).
The [C++ implementation of Ethereum](https://github.com/ethereum/cpp-ethereum/) (not officially released) however has a GPU miner. It can be used from `eth`, `AlethZero` (GUI) and `ethMiner` (the standalone miner).
[You can install this](https://github.com/ethereum/cpp-ethereum/wiki/Installing-clients) via ppa on linux, brew tap on MacOS or from source.
On MacOS:
```
brew install cpp-ethereum --with-gpu-mining --devel --build-from-source
```
On Linux:
```
apt-get install cpp-ethereum
```
On Windows:
https://github.com/ethereum/cpp-ethereum/wiki/Building-on-Windows
## GPU mining with ethminer
To mine with `eth`:
```
eth -m on -G -a <coinbase> -i -v 8 //
```
To install `ethminer` from source:
```
cd cpp-ethereum
cmake -DETHASHCL=1 -DGUI=0
make -j4
make install
```
To set up GPU mining you need a coinbase account. It can be an account created locally or remotely.
### Using ethminer with geth
```
geth account new
geth --rpc --rpccorsdomain localhost 2>> geth.log &
ethminer -G // -G for GPU, -M for benchmark
tail -f geth.log
```
`ethminer` communicates with geth on port 8545 (the default RPC port in geth). You can change this by giving the [`--rpcport` option](../interface/command-line-options) to `geth`.
Ethminer will find get on any port. Note that you need to set the CORS header with `--rpccorsdomain localhost`. You can also set port on `ethminer` with `-F http://127.0.0.1:3301`. Setting the ports is necessary if you want several instances mining on the same computer, although this is somewhat pointless. If you are testing on a private cluster, we recommend you use CPU mining instead.
Also note that you do **not** need to give `geth` the `--mine` option or start the miner in the console unless you want to do CPU mining on TOP of GPU mining.
If the default for `ethminer` does not work try to specify the OpenCL device with: `--opencl-device X` where X is 0, 1, 2, etc.
When running `ethminer` with `-M` (benchmark), you should see something like:
Benchmarking on platform: { "platform": "NVIDIA CUDA", "device": "GeForce GTX 750 Ti", "version": "OpenCL 1.1 CUDA" }
Benchmarking on platform: { "platform": "Apple", "device": "Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz", "version": "OpenCL 1.2 " }
To debug `geth`:
```
geth --rpccorsdomain "localhost" --verbosity 6 2>> geth.log
```
To debug the miner:
```
make -DCMAKE_BUILD_TYPE=Debug -DETHASHCL=1 -DGUI=0
gdb --args ethminer -G -M
```
**Note** hashrate info is not available in `geth` when GPU mining. Check your hashrate with `ethminer`, `miner.hashrate` will always report 0.
### ethminer and eth
`ethminer` can be used in conjunction with `eth` via rpc
```
eth -i -v 8 -j // -j for rpc
ethminer -G -M // -G for GPU, -M for benchmark
tail -f geth.log
```
or you can use `eth` to GPU mine by itself:
```
eth -m on -G -a <coinbase> -i -v 8 //
```
# Further Resources:
* [ether-proxy, a web interface for mining rigs](https://github.com/sammy007/ether-proxy)
(supports solo and pool mining proxy with web interface and rigs availability monitoring)
* [ethereum forum mining FAQ live update](https://forum.ethereum.org/discussion/197/mining-faq-live-updates)
* [yates randall mining video](https://www.youtube.com/watch?v=CnKnclkkbKg)
* https://blog.ethereum.org/2014/07/05/stake/
* https://blog.ethereum.org/2014/10/03/slasher-ghost-developments-proof-stake/
* https://blog.ethereum.org/2014/06/19/mining/
* https://github.com/ethereum/wiki/wiki/Ethash
* [Benchmarking results for GPU mining](https://forum.ethereum.org/discussion/2134/gpu-mining-is-out-come-and-let-us-know-of-your-bench-scores)
* [historic moment](https://twitter.com/gavofyork/status/586623875577937922)
* [live mining statistic](https://ethstats.net/)
* [netstat ethereum network monitor](https://stats.ethdev.com)

View File

@ -0,0 +1,108 @@
---
title: Private network
---
An Ethereum network is a private network if the nodes are not connected to the main
network nodes. In this context private only means reserved or isolated, rather than
protected or secure.
## Choosing A Network ID
Since connections between nodes are valid only if peers have identical protocol version
and network ID, you can effectively isolate your network by setting either of these to a
non default value. We recommend using the `--networkid` command line option for this. Its
argument is an integer, the main network has id 1 (the default). So if you supply your own
custom network ID which is different than the main network your nodes will not connect to
other nodes and form a private network.
## Creating The Genesis Block
Every blockchain starts with the genesis block. When you run geth with default settings
for the first time, the main net genesis block is committed to the database. For a private
network, you usually want a different genesis block.
Here's an example of a custom genesis.json file. The `config` section ensures that certain
protocol upgrades are immediately available. The `alloc` section pre-funds accounts.
```json
{
"config": {
"chainId": 15,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"difficulty": "200000000",
"gasLimit": "2100000",
"alloc": {
"7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "300000" },
"f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "400000" }
}
}
```
To create a database that uses this genesis block, run the following command. This will
import and set the canonical genesis block for your chain.
```text
geth --datadir path/to/custom/data/folder init genesis.json
```
Future runs of geth on this data directory will use the genesis block you have defined.
```text
geth --datadir path/to/custom/data/folder --networkid 15
```
## Network Connectivity
With all nodes that you want to run initialized to the desired genesis state, you'll need
to start a bootstrap node that others can use to find each other in your network and/or
over the internet. The clean way is to configure and run a dedicated bootnode:
```text
bootnode --genkey=boot.key
bootnode --nodekey=boot.key
```
With the bootnode online, it will display an enode URL that other nodes can use to connect
to it and exchange peer information. Make sure to replace the displayed IP address
information (most probably [::]) with your externally accessible IP to get the actual
enode URL.
Note: You can also use a full fledged Geth node as a bootstrap node.
### Starting Up Your Member Nodes
With the bootnode operational and externally reachable (you can try `telnet <ip> <port>`
to ensure it's indeed reachable), start every subsequent Geth node pointed to the bootnode
for peer discovery via the --bootnodes flag. It will probably also be desirable to keep
the data directory of your private network separated, so do also specify a custom
`--datadir` flag.
```text
geth --datadir path/to/custom/data/folder --networkid 15 --bootnodes <bootnode-enode-url-from-above>
```
Since your network will be completely cut off from the main and test networks, you'll also
need to configure a miner to process transactions and create new blocks for you.
## Running A Private Miner
Mining on the public Ethereum network is a complex task as it's only feasible using GPUs,
requiring an OpenCL or CUDA enabled ethminer instance. For information on such a setup,
please consult the EtherMining subreddit and the Genoil miner repository.
In a private network setting however, a single CPU miner instance is more than enough for
practical purposes as it can produce a stable stream of blocks at the correct intervals
without needing heavy resources (consider running on a single thread, no need for multiple
ones either). To start a Geth instance for mining, run it with all your usual flags,
extended by:
```text
$ geth <usual-flags> --mine --minerthreads=1 --etherbase=0x0000000000000000000000000000000000000000
```
Which will start mining bocks and transactions on a single CPU thread, crediting all
proceedings to the account specified by --etherbase. You can further tune the mining by
changing the default gas limit blocks converge to (`--targetgaslimit`) and the price
transactions are accepted at (`--gasprice`).

View File

@ -1,80 +0,0 @@
---
title: Swarm TODO
---
# Sprint plan
# scope
- forwarding only (no recursive lookup and no connecting to new nodes, only working with active peers)
## TODO
- integrate new p2p
- write unit tests for protocol and netstore (without protocol)
- rework protocol errors using errs after PR merged
- integrate new p2p or develop branch after p2p merge
- integrate cademlia into hive / peer pool with new p2p
- work out timeouts and timeout encoding
- cli tools
- url bar and proxy
## CLI
- hooking into DPA local API
- running as a daemon accepting request via socket?
### -
## Encryption
- encryption gateway to incentivise encryption of public content
- xor encryption with random chunks
- in-memory encryption keys
- originator encryption for private content
## APIs
- DAPP API - js integration (Fabian, Alex)
- mist dapp storage scheme, url->hash mapping (Fabian, Alex) [URL scheme](../doc/url-scheme)
# Discuss alternatives
I suggest we each pick 2/3 and read up on their project status, features, useability, objectives, etc
- Is it even worth it to reinvent/reimplement the wheel?
- what features do we want now and in future
- roadmap
# Brainstorming
- storage economy, incentivisation, examples:
-- content owner pays recurring ether fee for storage.
-- scheme to reward content owner each time content is accessed. i.e accessing content would requires fee. this would reward popular content. should be optional though.
- dht - chain interaction
- proof of custody https://docs.google.com/document/d/1F81ulKEZFPIGNEVRsx0H1gl2YRtf0mUMsX011BzSjnY/edit
- proof of resources http://systemdocs.maidsafe.net/content/system_components/proof_of_resources.html
- nonoutsourceable proofs of storage as mining criteria
- proof of storage capacity directly rewarded by contract
- streaming, hash chains
- routing and learning graph traversal
- minimising hops
- forwarding strategies, optimising dispersion of requests
- lifetime of requests, renewals (repeated retrieval requests), expiry, reposting (repeated storage request)
- redundancy - store same data in multiple nodes (e.g 4x)
- the more accessed a content is, the more available it should be, should increase performance for popular content.
# Simulations
- full table homogeneous nodes network size vs density vs table size expected row-sizes
- forwarding strategy vs latency vs traffic
- stable table, dropout rate vs routing optimisation by precalculating subtables for all peers. expected distance change (proximity delta) per hop
## Swarm
How far does the analogy go?
swarm of bees | a decentralised network of peers
-------|------------
living in a hive | form a distributed preimage archive
where they | where they
gather pollen | gather data chunks which they
to produce honey | transform into a longer data stream (document)
they consume and store | they serve and store
buzzing bzz | using bzz as their communications protocol

View File

@ -1,69 +0,0 @@
---
title: Swarm - distributed preimage archive
---
# Resources
## Swarm, the name
- https://www.facebook.com/swarmcorp, http://swarm.fund/
- https://bitcointalk.org/index.php?topic=650143.0
- https://bitcoinmagazine.com/17956/swarm-1-rick-falkvinges-swarmops-project/
- http://www.amazon.co.uk/Swarmwise-Tactical-Manual-Changing-World/dp/1463533152/
## Docs & specs
- [Swarm TODO](./swarm-todo)
- Dani & Viktor on public wiki: https://github.com/ethereum/wiki/wiki/Distributed-Preimage-Archive
- Dani on swarm hash: https://github.com/ethereum/wiki/wiki/Swarm-Hash
- Dani on incentive system: https://github.com/ethersphere/swarm/blob/master/doc/incentives.md
- The swarm smart contract
- gav on url-hint https://github.com/ethereum/wiki/wiki/URL-Hint-Protocol
- Gav on public wiki: https://github.com/ethereum/cpp-ethereum/wiki/Swarm
- network (DEVp2p)
- [Peer-to-Peer](../developers/peer-to-peer)
- on kademlia: https://github.com/ethereum/wiki/wiki/Cademlia-Peer-Selection
## Talks
- https://twitter.com/ethereumproject/status/538030376858693633
- Dr. Daniel Nagy: Ethereum ÐΞVcon-0: Keeping the Public Record Safe and Accessible - https://www.youtube.com/watch?v=QzYZQ03ON2o&list=PLJqWcTqh_zKEjpSej3ddtDOKPRGl_7MhS&index=7&spfreload=10
## Forum
- empty as of 01/2015: https://forum.ethereum.org/categories/swarm
-
## Mentions, discussions
- http://www.reddit.com/r/ethereum/comments/2d4uyw/swarm_and_whisper/
- http://www.reddit.com/r/ethereum/comments/2ityfz/ethereum_swarm/
- https://www.maidsafe.org/t/ethereums-swarm-p2p-storage-and-whisper-p2p-messaging/1528
- Vitalik's blogpost of 08/2014 - https://blog.ethereum.org/2014/08/16/secret-sharing-erasure-coding-guide-aspiring-dropbox-decentralizer/
- Vitalik: 'Swarm is out-of-scope': https://www.reddit.com/r/ethereum/comments/2phvml/constructive_criticism_of_ethereum_project_not/cmwtfqq
- Vitalik on eth components, swarm at 4:00 http://www.naation.com/2015/02/02/ethereum-explained-with-vitalik-buterin-inventor-and-leader-of-the-ethereum-project/5764/
- https://www.youtube.com/watch?v=zgkmQ-jQJHk&feature=youtu.be
## Media
- https://twitter.com/jeffehh/status/565927366271467521
- https://twitter.com/avsa/status/566255260713627648
- https://twitter.com/zeligf/status/566042020909973504
- https://www.reddit.com/r/ethereum/comments/2wryru/eli5_how_is_ethereum_supposed_to_be_a_dropbox
- https://forum.ethereum.org/discussion/comment/7593/#Comment_7593
## Code
- bzz PR: https://github.com/ethereum/go-ethereum/pull/255,
- repo https://github.com/ethersphere/go-ethereum/tree/bzz/
- ethereum p2p: https://github.com/ethereum/go-ethereum/p2p
- peer selection, peer pool: https://github.com/ethereum/go-ethereum/pull/253
- p2p cademlia branch (discontinued): https://github.com/ethersphere/go-ethereum/tree/kademlia
- Felix's node discovery code: https://github.com/ethereum/go-ethereum/tree/develop/p2p/discover
# Alternatives
- storj - http://storj.io/
- maidsafe - http://maidsafe.net/
- ipfs - http://ipfs.io/, https://www.youtube.com/watch?v=Fa4pckodM9g, http://static.benet.ai/t/ipfs.pdf, https://github.com/jbenet/go-ipfs, https://www.youtube.com/watch?v=8CMxDNuuAiQ, https://www.reddit.com/r/ethereum/comments/2wot2i/ipfs_alpha_demo/
- filecoin - http://filecoin.io/
- permacoin - https://www.cs.umd.edu/~elaine/docs/permacoin.pdf, https://bitcointalk.org/index.php?topic=640410.0, http://blog.dshr.org/2014/06/permacoin.html
- siacoin - http://www.siacoin.com/
- riak - http://basho.com/riak/
- BitTorrent http://www.bittorrent.com/ maelstrom http://blog.bittorrent.com/2014/12/10/project-maelstrom-the-internet-we-build-next/
- Tahoe-LAFS https://www.tahoe-lafs.org/trac/tahoe-lafs
- retroshare http://retroshare.sourceforge.net/

View File

@ -1,105 +0,0 @@
---
title: Geth
---
`geth` is the the command line interface for running a full ethereum node implemented in Go.
It is the main deliverable of the [Frontier Release](https://ethereum.gitbooks.io/frontier-guide/content/frontier.html)
## Capabilities
By installing and running `geth`, you can take part in the ethereum frontier live network and
* mine real ether
* transfer funds between addresses
* create contracts and send transactions
* explore block history
* and much much more
## Install
Supported Platforms are Linux, Mac Os and Windows.
We support two types of installation: binary or scripted install for users.
See [Install instructions](../install-and-build/build-from-source) for binary and scripted installs.
Developers and community enthusiast are advised to read the [Developers' Guide](../install-and-build/developers-guide), which contains detailed instructions for manual build from source (on any platform) as well as detailed tips on testing, monitoring, contributing, debugging and submitting pull requests on github.
## Interfaces
* Javascript Console: `geth` can be launched with an interactive console, that provides a javascript runtime environment exposing a javascript API to interact with your node. [Javascript Console API](../interface/javascript-console) includes the `web3` javascript Ðapp API as well as an additional admin API.
* JSON-RPC server: `geth` can be launched with a server that exposes the [JSON-RPC API](https://github.com/ethereum/wiki/wiki/JSON-RPC)
* [Command line options](../interface/command-line-options) documents command line parameters as well as subcommands.
## Basic Use Case Documentation
* [Managing accounts](../interface/managing-your-accounts)
* [Mining](../legacy/mining)
**Note** buying and selling ether through exchanges is not discussed here.
## License
The Ethereum Core Protocol licensed under the [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html). All frontend client software (under [cmd](https://github.com/ethereum/go-ethereum/tree/master/cmd)) is licensed under the [GNU General Public License](https://www.gnu.org/copyleft/gpl.html).
## Reporting
Security issues are best sent to security@ethereum.org or shared in PM with devs on one of the channels (see Community and Suppport).
Non-sensitive bug reports are welcome on github. Please always state the version (on master) or commit of your build (if on develop), give as much detail as possible about the situation and the anomaly that occurred. Provide logs or stacktrace if you can.
## Contributors
Ethereum is joint work of ETHDEV and the community.
Name or blame = list of contributors:
* [go-ethereum](https://github.com/ethereum/go-ethereum/graphs/contributors)
* [cpp-ethereum](https://github.com/ethereum/cpp-ethereum/graphs/contributors)
* [web3.js](https://github.com/ethereum/web3.js/graphs/contributors)
* [ethash](https://github.com/ethereum/ethash/graphs/contributors)
* [netstats](https://github.com/cubedro/eth-netstats/graphs/contributors),
[netintelligence-api](https://github.com/cubedro/eth-net-intelligence-api/graphs/contributors)
## Community and support
### Ethereum on social media
- Main site: https://www.ethereum.org
- Forum: https://forum.ethereum.org
- Github: https://github.com/ethereum
- Blog: https://blog.ethereum.org
- Wiki: http://wiki.ethereum.org
- Twitter: http://twitter.com/ethereumproject
- Reddit: http://reddit.com/r/ethereum
- Meetups: http://ethereum.meetup.com
- Facebook: https://www.facebook.com/ethereumproject
- Youtube: http://www.youtube.com/ethereumproject
- Google+: http://google.com/+EthereumOrgOfficial
### IRC
IRC Freenode channels:
* `#ethereum`: for general discussion
* `#ethereum-dev`: for development specific questions and discussions
* `##ethereum`: for offtopic and banter
* `#ethereumjs`: for questions related to web3.js and node-ethereum
* `#ethereum-markets`: Trading
* `#ethereum-mining` Mining
* `#dappdevs`: Dapp developers channel
* `#ethdev`: buildserver etc
### Gitter
* [go-ethereum Gitter](https://gitter.im/ethereum/go-ethereum)
* [cpp-ethereum Gitter](https://gitter.im/ethereum/cpp-ethereum)
* [web3.js Gitter](https://gitter.im/ethereum/web3.js)
* [ethereum documentation project Gitter](https://gitter.im/ethereum/frontier-guide)
### Forum
- [Forum](https://forum.ethereum.org/categories/geth)
### Dapp developers' mailing list
https://dapplist.net/
### Helpdesk
On gitter, irc, skype or mail to helpdesk@ethereum.org

View File

@ -0,0 +1,33 @@
---
title: Sending ether
---
The basic way of sending a simple transaction of ether with the console is as follows:
```js
> eth.sendTransaction({from:sender, to:receiver, value: amount})
```
Using the built-in JavaScript, you can easily set variables to hold these values. For example:
```js
> var sender = eth.accounts[0];
> var receiver = eth.accounts[1];
> var amount = web3.toWei(0.01, "ether")
```
Alternatively, you can compose a transaction in a single line with:
```js
> eth.sendTransaction({from:eth.coinbase, to:eth.accounts[1], value: web3.toWei(0.05, "ether")})
Please unlock account d1ade25ccd3d550a7eb532ac759cac7be09c2719.
Passphrase:
Account is now unlocked for this session.
'0xeeb66b211e7d9be55232ed70c2ebb1bcc5d5fd9ed01d876fac5cff45b5bf8bf4'
```
The resulting transaction is `0xeeb66b211e7d9be55232ed70c2ebb1bcc5d5fd9ed01d876fac5cff45b5bf8bf4`
If the password was incorrect you will instead receive an error:
```js
error: could not unlock sender account
```