[incubator-tuweni] branch main updated: more readmes
This is an automated email from the ASF dual-hosted git repository. toulmean pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git The following commit(s) were added to refs/heads/main by this push: new e3d0b479d more readmes new 6b1a86f9c Merge pull request #514 from atoulme/readmes e3d0b479d is described below commit e3d0b479dda36d713f4705f9a72499d4877d3885 Author: Antoine Toulme AuthorDate: Sat Feb 4 14:56:37 2023 -0800 more readmes --- merkle-trie/README.md | 20 stratum/proxy/README.md| 22 ++ stratum/server/README.md | 6 ++ .../apache/tuweni/stratum/server/StratumServer.kt | 7 +++ wallet/README.md | 6 ++ 5 files changed, 57 insertions(+), 4 deletions(-) diff --git a/merkle-trie/README.md b/merkle-trie/README.md index 4bcafd28d..f97634499 100644 --- a/merkle-trie/README.md +++ b/merkle-trie/README.md @@ -17,5 +17,25 @@ specific language governing permissions and limitations under the License. | Stability | [stable] | | Component Type | [library] | +This library introduces a [Patricia Merkle tree](https://en.wikipedia.org/wiki/Merkle_tree) [implementation](https://tuweni.apache.org/docs/org.apache.tuweni.trie/-merkle-patricia-trie/index.html). + +It can be backed in memory or using a [key-value store](https://tuweni.apache.org/docs/org.apache.tuweni.kv/index.html). + +The library offers a few methods to define a trie in memory quickly: + +* [`MerklePatriaTrie.storingStrings()`](https://tuweni.apache.org/docs/org.apache.tuweni.trie/-merkle-patricia-trie/storing-strings.html) defines a trie using keys and values as Strings. +* [`MerklePatriaTrie.storingBytes()`](https://tuweni.apache.org/docs/org.apache.tuweni.trie/-merkle-patricia-trie/storing-bytes.html) defines a trie using keys and values as Bytes. + +The same approach works with a stored trie: + +* [`StoredMerklePatriciaTrie.storingStrings(storage: MerkleStorage)`](https://tuweni.apache.org/docs/org.apache.tuweni.trie/-stored-merkle-patricia-trie/storing-strings.html) +* [`StoredMerklePatriciaTrie.storingBytes(storage: MerkleStorage)`](https://tuweni.apache.org/docs/org.apache.tuweni.trie/-stored-merkle-patricia-trie/storing-bytes.html) + +You will need to provide a storage in this case, which you will define by implementing [`MerkleStorage`](https://tuweni.apache.org/docs/org.apache.tuweni.trie/-merkle-storage/index.html). + +Note in Java, you should use [`AsyncMerkleStorage`](https://tuweni.apache.org/docs/org.apache.tuweni.trie/-async-merkle-storage/index.html) instead to avoid dealing with coroutines. + +An easy way to provide storage is to rely on a key-value store as defined in the [kv](https://tuweni.apache.org/docs/org.apache.tuweni.kv/index.html) library. + [stable]:https://github.com/apache/incubator-tuweni/tree/main/docs/index.md#stable [library]:https://github.com/apache/incubator-tuweni/tree/main/docs/index.md#library \ No newline at end of file diff --git a/stratum/proxy/README.md b/stratum/proxy/README.md index a19d39b28..f77d0c1f0 100644 --- a/stratum/proxy/README.md +++ b/stratum/proxy/README.md @@ -12,10 +12,24 @@ specific language governing permissions and limitations under the License. ---> # Stratum Proxy -| Status | | -||---| -| Stability | [beta]| -| Component Type | [library] | +| Status | | +||---| +| Stability | [beta]| +| Component Type | [application] | + +This application acts as a proxy between an Ethereum client and miners. + +It connects to the client over JSON-RPC (using http://localhost:8545), polling for new work periodically, and submitting work sent by clients. + +It runs a [Stratum server](https://tuweni.apache.org/docs/org.apache.tuweni.stratum.server/-stratum-server/index.html) to which miners can connect to over Stratum. + +Usage: +* Expose a Stratum server on 0.0.0.0:16000: +```bash +$> stratum-proxy 16000 +``` + + [beta]:https://github.com/apache/incubator-tuweni/tree/main/docs/index.md#beta [library]:https://github.com/apache/incubator-tuweni/tree/main/docs/index.md#library \ No newline at end of file diff --git a/stratum/server/README.md b/stratum/server/README.md index 1be4c7167..8c1bbdcf1 100644 --- a/stratum/server/README.md +++ b/stratum/server/README.md @@ -17,5 +17,11 @@ specific language governing permissions and limitations under the License. | Stability | [beta]| | Component Type | [library] | +This library introduces a [Stratum server](https://tuweni.apache.org/docs/org.apache.tuweni.stratum.server/-stratum-server/index.html) which listens on a TCP port for connections from stratum clients. + +The server is compatible with the eth-proxy and Stratum1 protocols. + +The server accepts
[incubator-tuweni] branch main updated: more READMEs
This is an automated email from the ASF dual-hosted git repository. toulmean pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git The following commit(s) were added to refs/heads/main by this push: new dbc8f59c2 more READMEs new 69b0da6e3 Merge pull request #505 from atoulme/add_readmes dbc8f59c2 is described below commit dbc8f59c2e9f59935d1d59e9a92c758114040418 Author: Antoine Toulme AuthorDate: Sun Jan 29 20:49:54 2023 -0800 more READMEs --- {eth-crawler => app-commons}/README.md| 10 ++-- bytes/README.md | 8 +++ {eth-crawler => concurrent-coroutines}/README.md | 10 ++-- {eth-crawler => concurrent}/README.md | 10 ++-- {eth-crawler => config}/README.md | 10 ++-- {eth-crawler => crypto}/README.md | 10 ++-- {eth-crawler => devp2p-eth}/README.md | 10 ++-- {eth-crawler => devp2p-proxy}/README.md | 10 ++-- {eth-crawler => devp2p}/README.md | 10 ++-- {eth-crawler => dns-discovery}/README.md | 10 ++-- docs/index.md | 66 +++ {eth-crawler => eth-blockprocessor}/README.md | 15 -- {eth-client => eth-client-app}/README.md | 12 - {eth-crawler => eth-client-ui}/README.md | 15 -- eth-client/README.md | 51 +++--- eth-crawler/README.md | 8 +++ eth-faucet/README.md | 8 +++ {eth-crawler => eth-precompiles}/README.md| 10 ++-- {eth-crawler => eth-repository}/README.md | 10 ++-- {eth-crawler => eth}/README.md| 14 +++-- {eth-crawler => ethstats}/README.md | 10 ++-- {eth-crawler => evm-dsl}/README.md| 10 ++-- {eth-crawler => evm}/README.md| 10 ++-- {eth-crawler => genesis}/README.md| 10 ++-- gossip/README.md | 11 +++- hobbits-relayer/README.md | 14 - {eth-crawler => hobbits}/README.md| 10 ++-- {eth-crawler => io}/README.md | 10 ++-- jsonrpc-app/README.md | 12 - {eth-crawler => jsonrpc}/README.md| 10 ++-- {eth-crawler => junit}/README.md | 10 ++-- {eth-crawler => kademlia}/README.md | 10 ++-- {eth-crawler => kv}/README.md | 10 ++-- {eth-crawler => les}/README.md| 10 ++-- {eth-crawler => merkle-trie}/README.md| 10 ++-- {eth-crawler => metrics}/README.md| 10 ++-- net/README.md | 10 +++- {eth-crawler => peer-repository}/README.md| 10 ++-- {eth-crawler => plumtree-servlet}/README.md | 10 ++-- {eth-crawler => plumtree-vertx}/README.md | 10 ++-- {eth-crawler => plumtree}/README.md | 10 ++-- {eth-crawler => pow}/README.md| 10 ++-- {eth-crawler => rlp}/README.md| 10 ++-- {eth-crawler => rlpx}/README.md | 10 ++-- {eth-crawler => scuttlebutt-client-lib}/README.md | 10 ++-- {eth-crawler => scuttlebutt-discovery}/README.md | 10 ++-- {eth-crawler => scuttlebutt-handshake}/README.md | 10 ++-- {eth-crawler => scuttlebutt-rpc}/README.md| 10 ++-- {eth-crawler => scuttlebutt}/README.md| 10 ++-- {eth-crawler => ssz}/README.md| 10 ++-- stratum/client/src/main/resources/logback.xml | 27 -- {eth-crawler => stratum/proxy}/README.md | 10 ++-- {eth-crawler => stratum/server}/README.md | 10 ++-- toml/README.md| 35 +++- units/README.md | 10 +++- {eth-crawler => wallet}/README.md | 10 ++-- wallet/build.gradle | 2 +- 57 files changed, 496 insertions(+), 222 deletions(-) diff --git a/eth-crawler/README.md b/app-commons/README.md similarity index 72% copy from eth-crawler/README.md copy to app-commons/README.md index 16ebab3e4..d08825ac1 100644 --- a/eth-crawler/README.md +++ b/app-commons/README.md @@ -10,8 +10,12 @@ Unless required by applicable law or agreed to in writing, software distributed an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ---> -# Ethereum crawler +# Application Commons -The crawler is a discv5 server that constantly looks for new peers. +| Status | | +||---| +| Stability | [stable] | +| Component Type | [library] | -Whenever it connects to peers, it asks for all their known peers, and keeps going until it has exhausted all peers it
[incubator-tuweni] branch main updated: more READMEs
This is an automated email from the ASF dual-hosted git repository. toulmean pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git The following commit(s) were added to refs/heads/main by this push: new 839c31a7f more READMEs new 636ffb07e Merge pull request #504 from atoulme/add_readmes 839c31a7f is described below commit 839c31a7f44d991747319ba775cbbf447d8e5399 Author: Antoine Toulme AuthorDate: Sun Jan 29 18:43:56 2023 -0800 more READMEs --- eth-client/README.md | 61 +++ eth-crawler/README.md | 17 eth-faucet/README.md | 85 +++--- gossip/README.md | 60 +++ hobbits-relayer/README.md | 38 + jsonrpc-app/README.md | 43 +++ net/README.md | 102 ++ 7 files changed, 392 insertions(+), 14 deletions(-) diff --git a/eth-client/README.md b/eth-client/README.md new file mode 100644 index 0..1bea31757 --- /dev/null +++ b/eth-client/README.md @@ -0,0 +1,61 @@ + +# Ethereum client + +The `tuweni` application is an Ethereum client that can run multiple chains and multiple discovery mechanisms. + +`tuweni` can sync multiple chains at once. It also has a web UI. + +NOTE: everything at this point is at best a prototype. This may change at any time. + +Usage: + +```bash +Apache Tuweni client loading +Usage: [-h] [-c=] [-w=] +-c, --config= +Configuration file. +-h, --helpPrints usage prompt +-w, --web= Web console host:port +``` + +Most of the action happens in the configuration file, written with TOML. + +Example with one chain: + +```toml +[storage.default] +path="data" +genesis="default" +[genesis.default] +path=default.json +``` + +The `default.json` file is your usual genesis configuration file. + +Example with two chains: + +Example with one chain: + +```toml +[storage.foo] +path="data" +genesis="foo" +[genesis.foo] +path=default.json +[storage.bar] +path="data" +genesis="bar" +[genesis.bar] +path=other.json +``` \ No newline at end of file diff --git a/eth-crawler/README.md b/eth-crawler/README.md new file mode 100644 index 0..16ebab3e4 --- /dev/null +++ b/eth-crawler/README.md @@ -0,0 +1,17 @@ + +# Ethereum crawler + +The crawler is a discv5 server that constantly looks for new peers. + +Whenever it connects to peers, it asks for all their known peers, and keeps going until it has exhausted all peers it could discover, then starts all over again. diff --git a/eth-faucet/README.md b/eth-faucet/README.md index 66ad8abcf..6752705a8 100644 --- a/eth-faucet/README.md +++ b/eth-faucet/README.md @@ -1,10 +1,80 @@ + # Ethereum Faucet This example allows you to set up a faucet with Github authentication. The application is written in Kotlin with Spring Boot, with Spring Web, Spring Security and Thymeleaf templates. -The app is configured with the values in src/main/resources/application.yml. +## Configuration + +The faucet works with a configuration file, `application.yml`. Here is a template of the file: + +```yaml +server: + use-forward-headers: true + forward-headers-strategy: native +spring: + main: +banner-mode: "off" + security: +oauth2: + client: +registration: + github: +clientId: +clientSecret: +html: + title: Faucet + request_message: Welcome to our faucet. You can ask for up to 1 ETH on this faucet. + +security: + oauth2: +client: + preEstablishedRedirectUri: + registeredRedirectUri: + useCurrentUri: false + +faucet: + maxETH: + chainId: + rpcPort: + rpcHost: + +wallet: + path: wallet.key +banner: > + Apache Tuweni Faucet example. + + + `:oyhdhhyo-` + :yds/../sdy: + :mh::hm: + `ym::my` + hm` `mh ++N..N+ +my :ydh/ /hdy- ym +Mo`M`.N oM +my /hdh/ +hdh: ym ++N..N+ + hm` `m: `mh + `ym:`sN::my` + :dh: `` :hd: + :yds/../sdy: + `-oyhddhyo-` +``` + +You should register a Github OAuth application to go along and fill the template. # Faucet @@ -39,16 +109,3 @@ In the web page, note the faucet account address. Make sure to send money to tha Now you can send money using the faucet. Enter any valid address and press OK. The second time you ask for money, the faucet will detect the balance of the account matches the max the faucet with top up. - -# License - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE -file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file -to You under