diff --git a/.gitignore b/.gitignore index 57191a52..fdb8ad06 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ build/ out/ *.iml -dshackle.yaml -upstream.yaml +./dshackle.yaml +./upstream.yaml testsetup/ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..d7b3073a --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 ETCDEV GmbH + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on 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. diff --git a/README.adoc b/README.adoc index 5199f8ab..29973b9f 100644 --- a/README.adoc +++ b/README.adoc @@ -1,11 +1,184 @@ = Emerald Dshackle -Implements Emerald API for Blockchains +image:https://img.shields.io/docker/pulls/emeraldpay/dshackle?style=flat-square[Docker Pulls] +image:https://img.shields.io/github/license/emeraldpay/dshackle.svg?style=flat-square&maxAge=2592000["License", link="https://github.com/emeraldpay/dshackle/blob/master/LICENSE"] +image:https://badges.gitter.im/emeraldpay/community.svg[link="https://gitter.im/emeraldpay/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge] -== Start +Dshackle is a Blockchain API Load Balancer with automatic discovery and health checking, authentication and TLS termination. +It can be used as an edge proxy, middle proxy or API gateway. +Dshackle provided a high level aggregated API on top of several underlying upstreams (blockchain nodes or providers, +such as Geth, Parity, Infura, etc), it automatically verifies their availability and the current status of the network, +executes commands making sure that the response is consistent and/or data successfully broadcasted to the network. + +Project goals: + +- stable and fault tolerant access to blockchain nodes +- secure connections and authentication +- allows to build scalable APIs with nodes distributed over multiple data centers + +Dshackle connects to several upstreams via JSON RPC, Websockets or gRPC protocols. It verifies if a node ("upstream") is +fully synchronized (not in initial sync mode), has enough peers and its height is not behind other nodes. If an upstream +lags behind others, lost peers, started to resync, or simply went down then Dshackle temporarily excludes it from +requests and returns back when the the upstream problem is fixed. + +== Quick Start + +=== Configuration + +Create file `dshackle.yaml` with following content: +[source,yaml] ---- -gradle run +version: v1 +port: 9001 +tls: + enabled: false +upstreams: + config: "upstreams.yaml" ---- -Application runs on port 8090 +Which sets the following: + +- application listen on 0.0.0.0:9001 +- TLS security is disabled (_never use in production!_) +- read upstreams configuration from file `upstreams.yaml` in the current directory + +Now create file `upstreams.yaml`: +[source,yaml] +---- +version: v1 +upstreams: + - id: infura-eth + chain: ethereum + connection: + ethereum: + rpc: + url: "https://mainnet.infura.io/v3/${INFURA_USER}" + ws: + url: "wss://mainnet.infura.io/ws/v3/${INFURA_USER}" + - id: infura-kovan + chain: kovan + connection: + ethereum: + rpc: + url: "https://kovan.infura.io/v3/${INFURA_USER}" +---- + +This configures: + +- setups 2 upstreams, one for Ethereum Mainnet and another for Kovan Testnet (both upstreams are configured for Infura) +- for Ethereum Mainnet it connects using JSON RPC and Websockets connections, for Kovan just JSON RPC is used +- Infura authentication config is omitted for this demo +- `${INFURA_USER}` will be provided through environment variable + +==== Run docker image + +Official Docker image you can find at: emeraldpay/dshackle + +.Setup Infura username +[source,bash] +---- +export INFURA_USER=... +---- + +.Run Dshackle +[source,bash] +---- +docker run -p 9001:9001 -v $(pwd):/config -w /config -e "INFURA_USER=$INFURA_USER" emeraldpay/dshackle +---- + +Now it listen on port 9001 at the localhost and can be connected from any gRPC compatible client. +Tools such as https://github.com/fullstorydev/grpcurl[gRPCurl] can automatically parse protobuf definitions and connect +to it (actual Protobuf sources are located in a separate repository which you can find at https://github.com/emeraldpay/proto) + +.Connect and listen for new blocks on Ethereum Mainnet +[source,bash] +---- +grpcurl -import-path ./proto/ -proto blockchain.proto -d "{\"type\": 100}" -plaintext 127.0.0.1:9001 io.emeraldpay.api.Blockchain/SubscribeHead +---- + +.Output would be like +---- +{ + "chain": "CHAIN_ETHEREUM", + "height": 8396159, + "blockId": "fc58a258adccc94466ae967b1178eea721349b0667f59d5fe1b0b436460bce75", + "timestamp": 1566423564000, + "weight": "AnMcf2VJB5kOSQ==" +} +{ + "chain": "CHAIN_ETHEREUM", + "height": 8396160, + "blockId": "787899711b862b77df8d2faa69de664048598265a9f96abf178d341076e200e0", + "timestamp": 1566423574000, + "weight": "AnMch35tO6hSGg==" +} +... +... +---- + +The output above is for a _streaming subscription_ to all new blocks on Ethereum Mainnet. It's one of services provided +by Dshackle, in additional to standard methods provided by RPC JSON of underlying nodes. + +== Documentation + +For detailed documentation see link:docs/[] directory. + +== Client Libraries + +=== Java gRPC Client +image:https://api.bintray.com/packages/emerald/emerald-grpc/emerald-grpc/images/download.svg[link="https://bintray.com/emerald/emerald-grpc/emerald-grpc/"] + +https://github.com/emeraldpay/emerald-java-client + + +[source,groovy] +---- +repositories { + maven { + url "https://dl.bintray.com/emerald/emerald-grpc" + } +} + +dependencies { + compile 'io.emeraldpay:emerald-grpc:0.2' +} +---- + +=== Javascript gRPC Client +image:https://img.shields.io/npm/v/@emeraldplatform/grpc.svg["npm (scoped)", link="https://www.npmjs.com/package/@emeraldplatform/grpc"] + +https://github.com/emeraldpay/emerald-js-grpc + +[source,json] +---- +"dependencies": { + "@emeraldplatform/grpc": "0.10.0", +} +---- + +== Community + +=== Chat + +image:https://badges.gitter.im/emeraldpay/community.svg[link="https://gitter.im/emeraldpay/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge] + +== Support + +Contact splix@emeraldpay.io if you want to integrate Dshackle into your project or want to sponsor the development. + +== License + +Copyright 2019 ETCDEV GmbH + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on 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. \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3493125e..14bac3a0 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ plugins { group = 'io.emeraldpay.dshackle' -version = '0.3-SNAPSHOT' +version = '0.3' targetCompatibility = '1.8' sourceCompatibility = '1.8' diff --git a/demo/quick-start/dshackle.yaml b/demo/quick-start/dshackle.yaml new file mode 100644 index 00000000..f53b23d3 --- /dev/null +++ b/demo/quick-start/dshackle.yaml @@ -0,0 +1,6 @@ +version: v1 +port: 9001 +tls: + enabled: false +upstreams: + config: upstreams.yaml diff --git a/demo/quick-start/upstreams.yaml b/demo/quick-start/upstreams.yaml new file mode 100644 index 00000000..adc239a7 --- /dev/null +++ b/demo/quick-start/upstreams.yaml @@ -0,0 +1,16 @@ +version: v1 +upstreams: + - id: infura-eth + chain: ethereum + connection: + ethereum: + rpc: + url: "https://mainnet.infura.io/v3/${INFURA_USER}" + ws: + url: "wss://mainnet.infura.io/ws/v3/${INFURA_USER}" + - id: infura-kovan + chain: kovan + connection: + ethereum: + rpc: + url: "https://kovan.infura.io/v3/${INFURA_USER}" \ No newline at end of file diff --git a/docs/00-intro.adoc b/docs/00-intro.adoc new file mode 100644 index 00000000..0cdcd443 --- /dev/null +++ b/docs/00-intro.adoc @@ -0,0 +1,30 @@ +== What is Dshackle + +Dshackle is a L7 Load Balancer for Blockchain APIs with automatic discovery, health checking, secure access, TLS with +client authentication, and many other features. It can be configured as an edge proxy, middle proxy or API gateway. + +Dshackle provided a high level aggregated API on top of several underlying upstreams (blockchain nodes or providers, +such as Geth, Parity, Infura, etc), automatically verifies their availability and the current status of the network, +it routes requests to available node, and makes sure the response is consistent and/or data successfully broadcasted to +the networks. + +Example use cases: + +- Query for a _transaction_ (block, etc) tries to find it on different nodes and/or retry until it's found or there is + a consistent answer from upstreams +- Getting _nonce_ to send a transaction makes sure it's larges value over several nodes +- Sending _transaction_ distributes it to several nodes in parallel + +Availability and fault tolerance: + +- Dshackle connects to several upstreams via JSON RPC, Websockets or gRPC protocols +- It verifies if a node ("upstream") is fully synchronized (not in initial sync mode), has enough peers and its height + is not behind other nodes +- If an upstream lags behind, lost peers, started to resync, or simply goes down then Dshackle temporarily excludes it from + routing and returns back when the the upstream's problem is fixed + +Main goals: + +- stable and fault tolerant access to blockchain nodes +- secure connections and authentication +- allow to build scalable APIs with nodes distributed over multiple data centers \ No newline at end of file diff --git a/docs/01-architecture-intro.adoc b/docs/01-architecture-intro.adoc new file mode 100644 index 00000000..51a3872f --- /dev/null +++ b/docs/01-architecture-intro.adoc @@ -0,0 +1,17 @@ +== Architecture Overview + +Dshackle is built using/based on: + +- Java Virtual Machine, Java 8+ +- Kotlin +- Spring Framework, Boot and Reactor + +It's own communication protocol is based on Protobuf and gRPC, though it connects to other nodes using different protocols, +such as JSON RPC or Websockets. + +Dshackle connects to actual blockchain nodes and provides an aggregated API automatically directing requests to +currently healthy nodes. It's built using _reactive_ and non-blocking code and provides low latency and high efficient +API. + +Dshackle servers can be connected to each other as well, or work in parallel, to provide scalable and fault tolerant +connection to blockchains. All connections can be secured and authenticated with client/server certificates. \ No newline at end of file diff --git a/docs/02-quick-start.adoc b/docs/02-quick-start.adoc new file mode 100644 index 00000000..a4789f71 --- /dev/null +++ b/docs/02-quick-start.adoc @@ -0,0 +1,104 @@ +== Quick Start + +=== Prerequisites + +Dshackle is designed for cloud environment and supposed to be used withing Docker and/or Kubernetes. However it's a JVM +based application and therefore can be used in most of standard environment where Java Virtual Machine can be installed. + +We're going to use Docker image for this quick start. + +For demo access we use gRPCurl tool, which can be installed from https://github.com/fullstorydev/grpcurl + +=== Configuration + +NOTE: you can find following example configuration in demo/quick-start directory of the project + +Create file `dshackle.yaml` with following content: +[source,yaml] +---- +version: v1 +port: 9001 +tls: + enabled: false +upstreams: + config: "upstreams.yaml" +---- + +This very basic config says that: + +- application should listen on 0.0.0.0:9001 +- TLS security should be disabled (_never use in production!_) +- read upstreams configuration from file `upstreams.yaml` in current directory + +Now create file `upstreams.yaml`: +[source,yaml] +---- +version: v1 +upstreams: + - id: infura-eth + chain: ethereum + connection: + ethereum: + rpc: + url: "https://mainnet.infura.io/v3/${INFURA_USER}" + ws: + url: "wss://mainnet.infura.io/ws/v3/${INFURA_USER}" + - id: infura-kovan + chain: kovan + connection: + ethereum: + rpc: + url: "https://kovan.infura.io/v3/${INFURA_USER}" +---- + +This config: + +- setups 2 upstreams, one for Ethereum Mainnet and another for Kovan Testnet (both upstreams are configured for Infura for demo purposes, but you can use other compatible endpoints) +- for Ethereum Mainnet it connects using JSON RPC and Websockets connections, for Kovan just JSON RPC is used +- Infura authentication config is omitted for this demo +- `${INFURA_USER}` value can be provided through environment variables + +==== Run as docker + +Official Docker image you can find at: emeraldpay/dshackle + +.Setup Infura username +[source,bash] +---- +export INFURA_USER=... +---- + +.Run Dshackle +[source,bash] +---- +docker run -p 9001:9001 -v $(pwd):/config -w /config -e "INFURA_USER=$INFURA_USER" emeraldpay/dshackle +---- + +.Connect and listen for new blocks on Ethereum Mainnet +[source,bash] +---- +grpcurl -import-path ./proto/ -proto blockchain.proto -d "{\"type\": 100}" -plaintext 127.0.0.1:9001 io.emeraldpay.api.Blockchain/SubscribeHead +---- + +.Output would be like +---- +{ + "chain": "CHAIN_ETHEREUM", + "height": 8396159, + "blockId": "fc58a258adccc94466ae967b1178eea721349b0667f59d5fe1b0b436460bce75", + "timestamp": 1566423564000, + "weight": "AnMcf2VJB5kOSQ==" +} +{ + "chain": "CHAIN_ETHEREUM", + "height": 8396160, + "blockId": "787899711b862b77df8d2faa69de664048598265a9f96abf178d341076e200e0", + "timestamp": 1566423574000, + "weight": "AnMch35tO6hSGg==" +} +... +... +---- + +The output above is for a _streaming subscription_ to all new blocks on Ethereum Mainnet. It's a method provided +by Dshackle, provided in additional to methods provided by RPC JSON of underlying nodes. diff --git a/docs/03-server-config.adoc b/docs/03-server-config.adoc new file mode 100644 index 00000000..1f7c716e --- /dev/null +++ b/docs/03-server-config.adoc @@ -0,0 +1,25 @@ +== Server Configuration + +[source,yaml] +---- +version: v1 +port: 9001 +tls: + enabled: true + server: + certificate: "server.crt" + key: "server.p8.key" + client: + require: true + ca: "ca.crt" +upstreams: + config: "upstreams.yaml" +---- + +Configures following: + +- server is listening on `0.0.0.0:9001` +- TLS is enabled +- server certificate in located at `server.crt` with key for it at `server.p8.key` +- server requires a client authentication by TLS client certificate signed by `ca.crt` certificate +- upstreams configuration is configured in file `upstreams.yaml` diff --git a/docs/04-upstream-config.adoc b/docs/04-upstream-config.adoc new file mode 100644 index 00000000..bfcbbf0e --- /dev/null +++ b/docs/04-upstream-config.adoc @@ -0,0 +1,115 @@ +== Upstreams Configuration + +Dshackle can connect to multiple independent APIs ("upstreams") and provides an unified API on top of it. + +Supported upstream protocols: + +- JSON RPC +- Websockets +- gRPC (i.e. can connect to another Dshackle) + +Those protocols can be configures with additional security, TLS and authentication. + +=== Example + +.upstreams.yaml +[source,yaml] +---- +version: v1 + +defaultOptions: + - chains: + - ethereum + options: + min-peers: 10 + - chains: + - kovan + options: + min-peers: 2 + +upstreams: + - id: us-nodes + chain: auto + connection: + grpc: + host: 35.226.252.117 + port: 443 + tls: + ca: ca.crt + certificate: client.crt + key: client.p8.key + - id: infura-eth + chain: ethereum + labels: + provider: infura + options: + disable-validation: true + connection: + ethereum: + rpc: + url: "https://mainnet.infura.io/v3/${INFURA_USER}" + basic-auth: + username: ${INFURA_USER} + password: ${INFURA_PASSWD} + ws: + url: "wss://mainnet.infura.io/ws/v3/${INFURA_USER}" + basic-auth: + username: ${INFURA_USER} + password: ${INFURA_PASSWD} +---- + +There're two main segments for upstreams configuration: + +- _upstreams_ - a list of API to connect to, with all configuration specific for upstream and chain +- and _default options_ as common configuration options applied to all nodes in that group + +In the example above we have: + +- default configuration for _Ethereum Mainnet_ which accepts upstream as valid when it not in fast synchronization mode + and has at least 10 peers. For _Kovan Testnet_ nodes the requirements are much relieved +- as upstreams it has 2 configurations + * balancer connects to another Dshackle/another machine by using gRPC protocol + ** accepts (i.e. proxies) any blockchain available on that remote + ** verifies TLS certificate of the server + ** uses client certificate for authentication, i.e. remote server is accepting only clients authenticated by a + certificate + * connects to Infura provided _Ethereum Mainnet_ + ** configuration is using placeholders for `${INFURA_USER}` and `${INFURA_PASSWD}` which will be replaced with + corresponding environment variables values + ** uses Basic Authentication to authenticate requests on Infura + ** label `[provider: infura]` is set for that particular upstream, which can be selected during a request. For example for + some requests you may want to use nodes with that label only, i.e. _"send that tx to infura nodes only"_, + or _"read only from archive node, with label [archive: true]"_ + ** upstream validation (peers, sync status, etc) is disabled for that particular upstream + +=== Configuration options + +Options (default or as part of upstream config): + +- `disable-validation` - if `true` then Dshackle would not try to verify status of the upstream (useful for a trusted cloud + provider such as Infura, but is not recommended for an own node) +- `min-peers` - do not use upstream with less than specified connected peers + +=== Connection type + +Dshackle currently supports + +- `rpc` a standard Ethereum JSON RPC +- `ws` websocket connection (supposed to be used in addition to `rpc` connection) +- `grpc` connects to another Dshackle instance + +=== Authentication + +==== TLS + +All connection types can use TLS secured connection, with optional client certificate authentication: + +- `ca` path to certificate required from remote server +- optional `certificate` and `key` for client authentication. Please note that `key` is encoded with _PKCS 8_ + +==== Basic Authentication + +For JSON RPC and Websockets a Basic Authentication can be used: + +- `username` - username +- `password` - password \ No newline at end of file diff --git a/docs/05-start.adoc b/docs/05-start.adoc new file mode 100644 index 00000000..32367927 --- /dev/null +++ b/docs/05-start.adoc @@ -0,0 +1,3 @@ +== Launch a server + +TBD \ No newline at end of file diff --git a/docs/06-methods.adoc b/docs/06-methods.adoc new file mode 100644 index 00000000..1cf32957 --- /dev/null +++ b/docs/06-methods.adoc @@ -0,0 +1,159 @@ +== Methods + +IMPORTANT: Dshackle provides an unified API based on gRPC and Protobuf. + +Dshackle provides an unified API based on gRPC and Protobuf. I.e. it's not standard JSON RPC but client libraries could +be generated for all major libraries, and there're official libraries for Java and Javascript. + +=== gRPC definition + +[source,proto] +---- +service Blockchain { + rpc SubscribeHead (Chain) returns (stream ChainHead) {} + rpc SubscribeBalance (BalanceRequest) returns (stream AddressBalance) {} + rpc SubscribeTxStatus (TxStatusRequest) returns (stream TxStatus) {} + + rpc GetBalance (BalanceRequest) returns (stream AddressBalance) {} + + rpc NativeCall (NativeCallRequest) returns (stream NativeCallReplyItem) {} + + rpc Describe (DescribeRequest) returns (DescribeResponse) {} + rpc SubscribeStatus (StatusRequest) returns (stream ChainStatus) {} +} +---- + +=== Wrapped JSON RPC methods + +Standard JSON RPC methods provided by Ethereum nodes are available wrapped into gRPC/Protobuf with additional features. +To call standard methods you use `NativeCall` method. + +.NativeCallRequest +[source,proto] +---- +message NativeCallRequest { + ChainRef chain = 1; + repeated NativeCallItem items = 2; + Selector selector = 3; + int32 quorum = 4; + AvailabilityEnum min_availability = 5; +} + +message NativeCallItem { + uint32 id = 1; + string method = 3; + bytes payload = 4; +} +---- + +Where: + +- `chain` target chain (see reference for ids) +- `items` as a list of independent requests, which may be executed in different nodes in parallels or in different order, with: + * `method` - a JSON RPC standard name, ex: `eth_getBlockByHash` + * `payload` - list of parameters for the methods, encoded as JSON string, ex. `["0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", true]` +- `Selector` and `AvailabilityEnum` are described in reference, in short they allow to specify which nodes are allowed +to execute the request. + +.NativeCallReplyItem +[source,proto] +---- + +message NativeCallReplyItem { + uint32 id = 1; + bool succeed = 2; + bytes payload = 3; + bytes error = 4; +} +---- + +Where: + +- `payload` is JSON response for a particular call, encoded into a string (when `succeed` is true) +- or `error` if request failed (`succeed` is false) + +NOTE: Reply Items comes right after their execution on an upstream, therefore streaming response. It allows to build + non-blocking queries + +=== SubscribeHead + +Subscribes to new blocks on the specified chain. Returns stream of blocks right after it was accepted (and verified by +Dshackle) by any of the upstreams. + +.ChainHead +[source,proto] +---- +message ChainHead { + ChainRef chain = 1; + uint64 height = 2; + string block_id = 3; + uint64 timestamp = 4; + bytes weight = 5; + uint64 reorg = 6; +} +---- + +Where: + +- `chain` - chain id +- `height` - block number +- `block_id` - block hash, as a string (please note that it doesn't have `0x` prefix) +- `timestamp` - timestamp of that block +- `weight` - total network difficulty on that block, as raw bytes +- `reorg` - number of reorganized blocks, if reorg happened + +=== SubscribeBalance or GetBalance + +Subscribes to changes of the balance for a single address or a set of addresses + +.Request +---- +message BalanceRequest { + Asset asset = 1; + AnyAddress address = 2; +} + +message AnyAddress { + oneof addr_type { + SingleAddress address_single = 1; + MultiAddress address_multi = 2; + XpubAddress address_xpub = 3; + ReferenceAddress address_ref = 4; + } +} +---- + +.Response +---- +message AddressBalance { + Asset asset = 1; + SingleAddress address = 2; + string balance = 3; +} +---- + +==== SubscribeTxStatus + +Subscribes to transaction confirmations. Allows to send a transactions and then listen to all changes until it +gets enough confirmations. Changes is `NOTFOUND -> BROADCASTED <- -> MINED <- -> CONFIRMED` + +.Request +---- +message TxStatusRequest { + ChainRef chain = 1; + string tx_id = 2; + uint32 confirmation_limit = 3; +} +---- + +.Response (stream of) +---- +message TxStatus { + string tx_id = 1; + bool broadcasted = 2; + bool mined = 3; + BlockInfo block = 4; + uint32 confirmations = 5; +} +---- + diff --git a/docs/07-authentication.adoc b/docs/07-authentication.adoc new file mode 100644 index 00000000..ce79d428 --- /dev/null +++ b/docs/07-authentication.adoc @@ -0,0 +1,83 @@ +== Authentication and encryption + +=== Server authentication + +Dshackle server supports both server and client certificate authentication, it's strongly recommended to use TLS to +connect to Dshackle server. More to that, the server uses gRPC which is based on HTTP/2, and most of 3rd party tools and +libraries expect it to be encrypted. + +Please note that for most of use cases for Dshackle, which is designed to be an internal load balancer, a self-signed +certificates would be enough. In the example below a https://github.com/square/certstrap[certstrap] tool is used to +generate certificates, but traditional `openssl` tool can be used as well. + +==== Setup Server certificate + +.Generate a server certificate +---- +SERVER_CA="ca.myhost.dev" +SERVER_IP="127.0.0.1" +ORG="My Company" +ORG_UNIT="Blockchain" + +certstrap init --common-name "$SERVER_CA" --passphrase "" -o "$ORG" -ou "$ORG_UNIT CA" +certstrap request-cert -ip $SERVER_IP --passphrase "" -o "$ORG" -ou "$ORG_UNIT Server" +certstrap sign $SERVER_IP --CA $SERVER_CA + +openssl pkcs8 -topk8 -inform PEM -outform PEM -in out/$SERVER_IP.key -out out/$SERVER_IP.p8.key -nocrypt +---- + +.Update dshackle.yaml to have: +---- +version: v1 +port: 9001 +tls: + enabled: true + server: + certificate: out/127.0.0.1.crt + key: out/127.0.0.1.p8.key +---- + +.Verify that server uses the certificate +---- +openssl s_client -alpn h2 -connect 127.0.0.1:9001 -CAfile out/ca.myhost.dev.crt +---- + +With the configuration above the server listen using TLS and the server identity can be verified by a client against public +server certificate. Please note that a server certificate doesn't prevent from connection by an unauthorized client, it only +verifies the server and encrypts a connection. + +==== Setup Client certificate + +To have authentication in both ways you'll need to configure client side certificates as well, at that case the server +will also verify each incoming connection and allow to connect only by a client with a trusted certificate. + +.Generate a client certificate +---- +CLIENT_CA="client-ca.myhost.dev" +CLIENT_ID="client_1" +ORG="My Company" +ORG_UNIT="Client" + +certstrap init --common-name "$CLIENT_CA" --passphrase "" -o "$ORG" -ou "$ORG_UNIT CA" +certstrap request-cert --common-name "$CLIENT_ID" --passphrase "" +certstrap sign "$CLIENT_ID" --CA $CLIENT_CA +---- + +.Update dshackle.yaml to have: +---- +version: v1 +port: 9001 +tls: + enabled: true + server: + certificate: out/127.0.0.1.crt + key: out/127.0.0.1.p8.key + client: + require: true + ca: out/client-ca.myhost.dev.crt +---- + +.Verify connection with client certificate +---- +openssl s_client -alpn h2 -connect 127.0.0.1:9001 -CAfile out/ca.myhost.dev.crt -cert out/client_1.crt -key out/client_1.key +---- diff --git a/docs/08-quorum-and-selectors.adoc b/docs/08-quorum-and-selectors.adoc new file mode 100644 index 00000000..3499b49e --- /dev/null +++ b/docs/08-quorum-and-selectors.adoc @@ -0,0 +1,7 @@ +== Quorum + +TBD + +== Selectors + +TBD \ No newline at end of file diff --git a/docs/09-caching.adoc b/docs/09-caching.adoc new file mode 100644 index 00000000..caf800df --- /dev/null +++ b/docs/09-caching.adoc @@ -0,0 +1,9 @@ +== Caching + +=== In memory cache + +Dshackle keeps latest blocks in memory (by default 64 blocks) + +=== Redis cache + +TBD \ No newline at end of file diff --git a/docs/10-client-libraries.adoc b/docs/10-client-libraries.adoc new file mode 100644 index 00000000..7ef2847a --- /dev/null +++ b/docs/10-client-libraries.adoc @@ -0,0 +1,19 @@ +== Client Libraries + +=== Java Client + +TBD + +=== EtherJar Java library + +TBD + +=== Javascript Client + +TBD + +=== Protobuf + +Original Protobuf definitions + +TBD \ No newline at end of file diff --git a/docs/99-ending.adoc b/docs/99-ending.adoc new file mode 100644 index 00000000..7a332662 --- /dev/null +++ b/docs/99-ending.adoc @@ -0,0 +1,11 @@ +== Links + +- Github: https://github.com/emeraldpay/dshackle + +== Chat + +image:https://badges.gitter.im/emeraldpay/community.svg[link="https://gitter.im/emeraldpay/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge] + +== Support + +Contact splix@emeraldpay.io if you want to integrate Dshackle into your project or want to sponsor the development. \ No newline at end of file diff --git a/docs/README.adoc b/docs/README.adoc new file mode 100644 index 00000000..d917186e --- /dev/null +++ b/docs/README.adoc @@ -0,0 +1,18 @@ += Dshackle Documentation + +include::00-intro.adoc[] + +== Table of Content + +. link:01-architecture-intro.adoc[Architecture Overview] +. link:02-quick-start.adoc[Quick Start] +. link:03-server-config.adoc[Server Configuration] +. link:04-upstream-config.adoc[Upstreams Configuration] +. link:05-start.adoc[How to launch a server] +. link:06-methods.adoc[API methods] +. link:07-authentication.adoc[Authentication] +. link:08-quorum-and-selectors.adoc[Quorum and Selectors] +. link:09-caching.adoc[Caching] +. link:10-client-libraries.adoc[Client Libraries] + +include::99-ending.adoc[] \ No newline at end of file diff --git a/docs/tls.adoc b/docs/tls.adoc deleted file mode 100644 index a9c2d7b6..00000000 --- a/docs/tls.adoc +++ /dev/null @@ -1,53 +0,0 @@ -== Setting Up TLS/SSL Security - -=== Server Authentication - -.Example generating of server certificate ----- -SERVER_CA="ca.myhost.dev" -SERVER_IP="127.0.0.1" -ORG="My Company" -ORG_UNIT="Blockchain" - -certstrap init --common-name "$SERVER_CA" --passphrase "" -o "$ORG" -ou "$ORG_UNIT CA" -certstrap request-cert -ip $SERVER_IP --passphrase "" -o "$ORG" -ou "$ORG_UNIT Server" -certstrap sign $SERVER_IP --CA $SERVER_CA - -openssl pkcs8 -topk8 -inform PEM -outform PEM -in out/$SERVER_IP.key -out out/$SERVER_IP.p8.key -nocrypt ----- - -.Setup application.properties ----- -ssl=true -ssl.cert=out/127.0.0.1.crt -ssl.key=out/127.0.0.1.p8.key ----- - -.Verify server certificate ----- -openssl s_client -alpn h2 -connect 127.0.0.1:8090 -CAfile out/ca.myhost.dev.crt ----- - -=== Client Authentication (optional) - -.Example generating of client certifiacte ----- -CLIENT_CA="client-ca.myhost.dev" -CLIENT_ID="client_1" -ORG="My Company" -ORG_UNIT="Client" - -certstrap init --common-name "$CLIENT_CA" --passphrase "" -o "$ORG" -ou "$ORG_UNIT CA" -certstrap request-cert --common-name "$CLIENT_ID" --passphrase "" -certstrap sign "$CLIENT_ID" --CA $CLIENT_CA ----- - -.Setup application.properties ----- -ssl.client.cert=out/client-ca.myhost.dev.crt ----- - -.Vetify connection with client certificate ----- -openssl s_client -alpn h2 -connect 127.0.0.1:8090 -CAfile out/ca.myhost.dev.crt -cert out/client_1.crt -key out/client_1.key ----- diff --git a/src/main/kotlin/io/emeraldpay/dshackle/Config.kt b/src/main/kotlin/io/emeraldpay/dshackle/Config.kt index d5eac516..44a3d635 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/Config.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/Config.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle import com.fasterxml.jackson.core.Version diff --git a/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt b/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt index 6c99a7a7..e9eb91e2 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle import io.grpc.Server diff --git a/src/main/kotlin/io/emeraldpay/dshackle/Starter.kt b/src/main/kotlin/io/emeraldpay/dshackle/Starter.kt index 5b06f471..96fdfbc6 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/Starter.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/Starter.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle import org.springframework.beans.factory.config.YamlPropertiesFactoryBean diff --git a/src/main/kotlin/io/emeraldpay/dshackle/YamlPropertySourceFactory.kt b/src/main/kotlin/io/emeraldpay/dshackle/YamlPropertySourceFactory.kt index c37db036..691e6270 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/YamlPropertySourceFactory.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/YamlPropertySourceFactory.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle import org.apache.commons.lang3.StringUtils diff --git a/src/main/kotlin/io/emeraldpay/dshackle/cache/BlocksMemCache.kt b/src/main/kotlin/io/emeraldpay/dshackle/cache/BlocksMemCache.kt index 9e51d8c9..dd036087 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/cache/BlocksMemCache.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/cache/BlocksMemCache.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.cache import io.infinitape.etherjar.domain.BlockHash diff --git a/src/main/kotlin/io/emeraldpay/dshackle/config/UpstreamsConfig.kt b/src/main/kotlin/io/emeraldpay/dshackle/config/UpstreamsConfig.kt index addd605d..cd3801a8 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/config/UpstreamsConfig.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/config/UpstreamsConfig.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.config import java.net.URI diff --git a/src/main/kotlin/io/emeraldpay/dshackle/config/UpstreamsConfigReader.kt b/src/main/kotlin/io/emeraldpay/dshackle/config/UpstreamsConfigReader.kt index 60fde658..09bcd001 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/config/UpstreamsConfigReader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/config/UpstreamsConfigReader.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.config import org.apache.commons.lang3.StringUtils diff --git a/src/main/kotlin/io/emeraldpay/dshackle/reader/BlockApiReader.kt b/src/main/kotlin/io/emeraldpay/dshackle/reader/BlockApiReader.kt index 276e2baf..1e4bec7a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/reader/BlockApiReader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/reader/BlockApiReader.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.reader import io.emeraldpay.dshackle.upstream.Selector diff --git a/src/main/kotlin/io/emeraldpay/dshackle/reader/BlockCacheReader.kt b/src/main/kotlin/io/emeraldpay/dshackle/reader/BlockCacheReader.kt index 752c3626..8083f808 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/reader/BlockCacheReader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/reader/BlockCacheReader.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.reader import io.emeraldpay.dshackle.cache.BlocksMemCache diff --git a/src/main/kotlin/io/emeraldpay/dshackle/reader/CompoundReader.kt b/src/main/kotlin/io/emeraldpay/dshackle/reader/CompoundReader.kt index 8944dff4..65d10285 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/reader/CompoundReader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/reader/CompoundReader.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.reader import reactor.core.publisher.Mono diff --git a/src/main/kotlin/io/emeraldpay/dshackle/reader/EmptyReader.kt b/src/main/kotlin/io/emeraldpay/dshackle/reader/EmptyReader.kt index 77df0c6a..14c6acfd 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/reader/EmptyReader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/reader/EmptyReader.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.reader import reactor.core.publisher.Mono diff --git a/src/main/kotlin/io/emeraldpay/dshackle/reader/Reader.kt b/src/main/kotlin/io/emeraldpay/dshackle/reader/Reader.kt index d5fb5752..da505c04 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/reader/Reader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/reader/Reader.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.reader import reactor.core.publisher.Mono diff --git a/src/main/kotlin/io/emeraldpay/dshackle/rpc/BlockchainRpc.kt b/src/main/kotlin/io/emeraldpay/dshackle/rpc/BlockchainRpc.kt index 962fc359..8e14c3d3 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/rpc/BlockchainRpc.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/rpc/BlockchainRpc.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import io.emeraldpay.api.proto.BlockchainOuterClass diff --git a/src/main/kotlin/io/emeraldpay/dshackle/rpc/Describe.kt b/src/main/kotlin/io/emeraldpay/dshackle/rpc/Describe.kt index 40bf007d..6dde5473 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/rpc/Describe.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/rpc/Describe.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import io.emeraldpay.api.proto.BlockchainOuterClass diff --git a/src/main/kotlin/io/emeraldpay/dshackle/rpc/NativeCall.kt b/src/main/kotlin/io/emeraldpay/dshackle/rpc/NativeCall.kt index f167b254..8305c328 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/rpc/NativeCall.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/rpc/NativeCall.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt index 93680315..7b82d5c5 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/rpc/StreamHead.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import com.google.protobuf.ByteString diff --git a/src/main/kotlin/io/emeraldpay/dshackle/rpc/SubscribeStatus.kt b/src/main/kotlin/io/emeraldpay/dshackle/rpc/SubscribeStatus.kt index 0f910e2f..f8c14c1d 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/rpc/SubscribeStatus.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/rpc/SubscribeStatus.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import io.emeraldpay.api.proto.BlockchainOuterClass diff --git a/src/main/kotlin/io/emeraldpay/dshackle/rpc/TrackAddress.kt b/src/main/kotlin/io/emeraldpay/dshackle/rpc/TrackAddress.kt index 44adda38..a6f0cb1f 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/rpc/TrackAddress.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/rpc/TrackAddress.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import io.emeraldpay.api.proto.BlockchainOuterClass diff --git a/src/main/kotlin/io/emeraldpay/dshackle/rpc/TrackTx.kt b/src/main/kotlin/io/emeraldpay/dshackle/rpc/TrackTx.kt index e315cf99..d8708f30 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/rpc/TrackTx.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/rpc/TrackTx.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import com.google.protobuf.ByteString diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/AggregatedUpstream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/AggregatedUpstream.kt index b6b1bdc4..b17bf0d3 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/AggregatedUpstream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/AggregatedUpstream.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/AlwaysQuorum.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/AlwaysQuorum.kt index dcce7093..a326b96d 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/AlwaysQuorum.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/AlwaysQuorum.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/BroadcastQuorum.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/BroadcastQuorum.kt index caa3a6d8..b12f604a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/BroadcastQuorum.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/BroadcastQuorum.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/CachingEthereumApi.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/CachingEthereumApi.kt index 75cdb99e..9330d219 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/CachingEthereumApi.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/CachingEthereumApi.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/CallMethods.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/CallMethods.kt index 912aac0c..60670fc6 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/CallMethods.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/CallMethods.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream interface CallMethods { diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/CallQuorum.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/CallQuorum.kt index cc8a572b..f03ee058 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/CallQuorum.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/CallQuorum.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ChainUpstreams.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ChainUpstreams.kt index 5549f567..6041b7b0 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ChainUpstreams.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ChainUpstreams.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ConfiguredUpstreams.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ConfiguredUpstreams.kt index 0bc16ebc..1c0f5a49 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ConfiguredUpstreams.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ConfiguredUpstreams.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt index 221f85af..80a81faa 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DefaultUpstream.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import reactor.core.publisher.Flux diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DirectCallMethods.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DirectCallMethods.kt index e8dbe3ce..4ef9ef7a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DirectCallMethods.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DirectCallMethods.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream class DirectCallMethods : CallMethods { diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DirectEthereumApi.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DirectEthereumApi.kt index 29d7efb8..44926af4 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/DirectEthereumApi.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/DirectEthereumApi.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EmptyEthereumHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EmptyEthereumHead.kt index 4771d117..89faf03c 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EmptyEthereumHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EmptyEthereumHead.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumApi.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumApi.kt index f25a16b2..531ee39a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumApi.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumApi.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumGrpcTransport.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumGrpcTransport.kt index 73eb5b76..7d7ce3d4 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumGrpcTransport.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumGrpcTransport.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumHead.kt index 816a3c69..848a239d 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumHead.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumHeadMerge.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumHeadMerge.kt index 36a9399e..9c8ad957 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumHeadMerge.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumHeadMerge.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumRpcHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumRpcHead.kt index 0409cd4f..24c670c6 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumRpcHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumRpcHead.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumUpstream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumUpstream.kt index 2e4e8757..2b74f38e 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumUpstream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumUpstream.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.config.UpstreamsConfig diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumWs.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumWs.kt index 0ebc7471..16dc9865 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumWs.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumWs.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.config.UpstreamsConfig diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumWsHead.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumWsHead.kt index 40b0b7e7..e1a05ed8 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumWsHead.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/EthereumWsHead.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.grpc.Chain diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/FilteringApiIterator.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/FilteringApiIterator.kt index f7483ab3..1daad19e 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/FilteringApiIterator.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/FilteringApiIterator.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream class FilteringApiIterator( diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/GrpcUpstream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/GrpcUpstream.kt index b8859f60..f3099630 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/GrpcUpstream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/GrpcUpstream.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/GrpcUpstreams.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/GrpcUpstreams.kt index fa702a94..1ccc975a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/GrpcUpstreams.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/GrpcUpstreams.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Head.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Head.kt index 03446ec4..24e5daed 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Head.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Head.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import reactor.core.publisher.Flux diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt index 1fa8326f..4a954c4f 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/HeadLagObserver.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/NodeDetailsList.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/NodeDetailsList.kt index 09e65d9b..033c0d10 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/NodeDetailsList.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/NodeDetailsList.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.config.UpstreamsConfig diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/NonEmptyQuorum.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/NonEmptyQuorum.kt index 15f336d4..2f3526ab 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/NonEmptyQuorum.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/NonEmptyQuorum.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/NonceQuorum.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/NonceQuorum.kt index df33b453..237801fe 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/NonceQuorum.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/NonceQuorum.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/NotLaggingQuorum.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/NotLaggingQuorum.kt index 1fb6d8ea..759dfba1 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/NotLaggingQuorum.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/NotLaggingQuorum.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.domain.TransactionId diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/QuorumBasedMethods.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/QuorumBasedMethods.kt index d87af109..22402b3b 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/QuorumBasedMethods.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/QuorumBasedMethods.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Selector.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Selector.kt index d78614ec..2e727212 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Selector.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Selector.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.api.proto.BlockchainOuterClass diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Upstream.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Upstream.kt index c79bf851..9aceba5f 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Upstream.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Upstream.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.config.UpstreamsConfig diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamAvailability.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamAvailability.kt index 3e726aeb..6074b6c2 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamAvailability.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamAvailability.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream enum class UpstreamAvailability(val grpcId: Int) { diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamServices.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamServices.kt index a87265c4..ad4658da 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamServices.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamServices.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import reactor.core.publisher.Flux diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamValidator.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamValidator.kt index fc67cd63..e0ab3f3d 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamValidator.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/UpstreamValidator.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.config.UpstreamsConfig diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Upstreams.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Upstreams.kt index 5b245eea..32f29258 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/Upstreams.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/Upstreams.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.grpc.Chain diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ValueAwareQuorum.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ValueAwareQuorum.kt index 27ba2c32..43e37d5f 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ValueAwareQuorum.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ValueAwareQuorum.kt @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.rpc.JacksonRpcConverter diff --git a/src/test/groovy/io/emeraldpay/dshackle/cache/BlocksMemCacheSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/cache/BlocksMemCacheSpec.groovy index d58d71b1..3b2eb0b0 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/cache/BlocksMemCacheSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/cache/BlocksMemCacheSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.cache import io.infinitape.etherjar.domain.BlockHash diff --git a/src/test/groovy/io/emeraldpay/dshackle/config/UpstreamsConfigReaderSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/config/UpstreamsConfigReaderSpec.groovy index 81232d19..390c882f 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/config/UpstreamsConfigReaderSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/config/UpstreamsConfigReaderSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.config import spock.lang.Specification diff --git a/src/test/groovy/io/emeraldpay/dshackle/rpc/NativeCallSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/rpc/NativeCallSpec.groovy index fa222f83..14505e72 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/rpc/NativeCallSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/rpc/NativeCallSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/test/groovy/io/emeraldpay/dshackle/rpc/StreamHeadSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/rpc/StreamHeadSpec.groovy index 6254a282..5ccc7152 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/rpc/StreamHeadSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/rpc/StreamHeadSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import com.google.protobuf.ByteString diff --git a/src/test/groovy/io/emeraldpay/dshackle/rpc/TrackAddressSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/rpc/TrackAddressSpec.groovy index f5260a9b..15b2a9fb 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/rpc/TrackAddressSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/rpc/TrackAddressSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import io.emeraldpay.api.proto.BlockchainOuterClass diff --git a/src/test/groovy/io/emeraldpay/dshackle/rpc/TrackTxSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/rpc/TrackTxSpec.groovy index aecc9908..bd820a0e 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/rpc/TrackTxSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/rpc/TrackTxSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.rpc import com.google.protobuf.ByteString diff --git a/src/test/groovy/io/emeraldpay/dshackle/test/EthereumApiMock.groovy b/src/test/groovy/io/emeraldpay/dshackle/test/EthereumApiMock.groovy index 43e2a3c8..d2b4947d 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/test/EthereumApiMock.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/test/EthereumApiMock.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.test import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/test/groovy/io/emeraldpay/dshackle/test/EthereumHeadMock.groovy b/src/test/groovy/io/emeraldpay/dshackle/test/EthereumHeadMock.groovy index 3858d4ad..0a2fcf04 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/test/EthereumHeadMock.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/test/EthereumHeadMock.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.test import io.emeraldpay.dshackle.upstream.EthereumHead diff --git a/src/test/groovy/io/emeraldpay/dshackle/test/EthereumUpstreamMock.groovy b/src/test/groovy/io/emeraldpay/dshackle/test/EthereumUpstreamMock.groovy index 000edacb..07b82e10 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/test/EthereumUpstreamMock.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/test/EthereumUpstreamMock.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.test import io.emeraldpay.dshackle.upstream.DirectEthereumApi diff --git a/src/test/groovy/io/emeraldpay/dshackle/test/MockServer.groovy b/src/test/groovy/io/emeraldpay/dshackle/test/MockServer.groovy index 471750a5..2940b2ce 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/test/MockServer.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/test/MockServer.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.test import io.emeraldpay.api.proto.BlockchainGrpc diff --git a/src/test/groovy/io/emeraldpay/dshackle/test/TestingCommons.groovy b/src/test/groovy/io/emeraldpay/dshackle/test/TestingCommons.groovy index c1d80a16..49505e64 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/test/TestingCommons.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/test/TestingCommons.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.test import com.fasterxml.jackson.core.Version diff --git a/src/test/groovy/io/emeraldpay/dshackle/test/UpstreamsMock.groovy b/src/test/groovy/io/emeraldpay/dshackle/test/UpstreamsMock.groovy index 23f65a53..36a8a7a0 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/test/UpstreamsMock.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/test/UpstreamsMock.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.test diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/BroadcastQuorumSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/BroadcastQuorumSpec.groovy index 9bc1d28c..c79db55e 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/BroadcastQuorumSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/BroadcastQuorumSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.test.TestingCommons diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/EthereumGrpcTransportSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/EthereumGrpcTransportSpec.groovy index 22f93a5a..d1729876 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/EthereumGrpcTransportSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/EthereumGrpcTransportSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/FilteringApiIteratorSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/FilteringApiIteratorSpec.groovy index bfaec6ef..4e100278 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/FilteringApiIteratorSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/FilteringApiIteratorSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.config.UpstreamsConfig diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/GrpcUpstreamSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/GrpcUpstreamSpec.groovy index 4f439b9d..eefb396d 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/GrpcUpstreamSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/GrpcUpstreamSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import com.fasterxml.jackson.databind.ObjectMapper diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/HeadLagObserverSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/HeadLagObserverSpec.groovy index d6013f9e..3d51517e 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/HeadLagObserverSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/HeadLagObserverSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.infinitape.etherjar.rpc.json.BlockJson diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/NodeDetailsListSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/NodeDetailsListSpec.groovy index 1b3ddade..89c48dfe 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/NodeDetailsListSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/NodeDetailsListSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.config.UpstreamsConfig diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/NonceQuorumSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/NonceQuorumSpec.groovy index 34535afd..4a46f0d0 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/NonceQuorumSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/NonceQuorumSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.dshackle.test.TestingCommons diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/NotLaggingQuorumSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/NotLaggingQuorumSpec.groovy index 10b0c313..5ac1714f 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/NotLaggingQuorumSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/NotLaggingQuorumSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import spock.lang.Specification diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/SelectorSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/SelectorSpec.groovy index b961dd59..0f884f8b 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/SelectorSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/SelectorSpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import io.emeraldpay.api.proto.BlockchainOuterClass diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/UpstreamAvailabilitySpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/UpstreamAvailabilitySpec.groovy index 43846f4b..9c4c55e9 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/UpstreamAvailabilitySpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/UpstreamAvailabilitySpec.groovy @@ -1,3 +1,18 @@ +/** + * Copyright (c) 2019 ETCDEV GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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. + */ package io.emeraldpay.dshackle.upstream import spock.lang.Specification