Update README

This commit is contained in:
Evgeny Medvedev
2019-04-15 18:38:34 +07:00
parent e69148ca9e
commit fcd963ced6

View File

@@ -56,7 +56,7 @@ Stream blockchain data continually to Google Pub/Sub:
```bash
> export GOOGLE_APPLICATION_CREDENTIALS=/path_to_credentials_file.json
> ethereumetl stream --start-block 500000 --output projects/your-project/topics/crypto_ethereum
> ethereumetl stream --start-block 500000 --output projects/<your-project>/topics/crypto_ethereum
For the latest version, check out the repo and call
@@ -311,7 +311,7 @@ Read this article for details https://medium.com/@medvedev1088/how-to-export-the
> echo "Stream to console"
> docker run ethereum-etl:latest-streaming stream --start-block 500000 --log-file log.txt
> echo "Stream to Pub/Sub"
> docker run -v /path_to_credentials_file/:/ethereum-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/ethereum-etl/credentials_file.json ethereum-etl:latest-streaming stream --start-block 500000 --output projects/your-project/topics/crypto_ethereum
> docker run -v /path_to_credentials_file/:/ethereum-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/ethereum-etl/credentials_file.json ethereum-etl:latest-streaming stream --start-block 500000 --output projects/<your-project>/topics/crypto_ethereum
```
### Command Reference
@@ -515,14 +515,15 @@ You can tune `--batch-size`, `--max-workers` for performance.
#### stream
```bash
> pip install ethereum-etl[streaming]
> ethereumetl stream --provider-uri https://mainnet.infura.io --start-block 500000
```
- This command outputs blocks, transactions, logs, token_transfers to the console by default.
- Entity types can be specified with the `-e` option, e.g. `-e block,transaction,log,token_transfer,trace,contract,token`
- Use `--output` option to specify the Google Pub/Sub topic where to publish blockchain data,
e.g. `projects/your-project/topics/bitcoin_blockchain`. Data will be pushed to
`projects/your-project/topics/bitcoin_blockchain.blocks`, `projects/your-project/topics/bitcoin_blockchain.transactions`
e.g. `projects/<your-project>/topics/bitcoin_blockchain`. Data will be pushed to
`projects/<your-project>/topics/bitcoin_blockchain.blocks`, `projects/<your-project>/topics/bitcoin_blockchain.transactions`
etc. topics.
- The command saves its state to `last_synced_block.txt` file where the last synced block number is saved periodically.
- Specify either `--start-block` or `--last-synced-block-file` option. `--last-synced-block-file` should point to the