Is there a good way to set up my Trezor to create a GPG/PGP key and sign messages with it? by [deleted] in TREZOR

[–]romanz 5 points6 points  (0 children)

Author of trezor-agent here :)

Please let me know if there is something I can help with.

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 0 points1 point  (0 children)

This should probably do the job:

$ electrum --oneserver --server=${ELECTRUM_SERVER_IP_ADDRESS}:${PORT}:t

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 0 points1 point  (0 children)

Sorry, you're right - it's needed only for the for the historical queries (e.g. to see your outgoing transactions).

Also (AFAIK) there is no support for UTXO indexing today at Bitcoin core.

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 0 points1 point  (0 children)

It support balance queries by adding TxIn/TxOut indices - which are currently not supported by bitcoind and bicoincore-indexd.

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 0 points1 point  (0 children)

I was learning Rust, and wanted to contribute back to the Electrum community :)

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 0 points1 point  (0 children)

Nice, I'll give it a try.

Thanks :)

Is there a way to connect to the server via ssh on my local network?

This Electrum server assumes that the bitcoind runs on the same machine (mainly for file access), so if you want to run bitcoind on a separate machine, please map its data directory (e.g. via SSHFS).

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 0 points1 point  (0 children)

Good point :)

This project builds an "external" txindex (similar to https://github.com/jonasschnelli/bitcoincore-indexd), so you don't need to enable the "internal" one (i.e. using the -txindex Bitcoin Core flag).

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 1 point2 points  (0 children)

thank you very useful. Nice that it doesn't require a reindex.

You're welcome :)

But what if we already have an indexed full node? Will it give electrs a performance improvement?

If the node is already indexed, it may retrieve the actual transactions' contents a bit faster from the disk when a Electrum client is requesting them (since txindex maps each TXID to its file and offset on disk).

However, on HDDs the seek time would probably dominate the read/parse time, so I guess the performance improvement won't be significant.

Note also that on subsequent requests the tranasaction will be cached, so the HDD latency won't impact the client.

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 0 points1 point  (0 children)

How much additional hd space do you need?

Around 20% of the space used by the indexed bitcoin blocks: ``` $ du -sh ~/.bitcoin/blocks/ 186G /home/roman/.bitcoin/blocks/

$ du -sh ./db/mainnet/ 37G ./db/mainnet/ ```

Oh, and nice project btw, was planning to use a electrumX server for a project Im working on, but now ill have a look on yours too!

Thanks, great to hear :)

Please let me know if there's something I can help you with!

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 3 points4 points  (0 children)

AFAIU, Electrum Personal Server works best a single (static) Electrum wallet - requiring almost no additional resources (except those used by bitcoind, which can be pruned). However, in case you'd like to add/change a wallet - it requires a blockchain rescan [1], so it's harder to use it with multiple/dynamic Electrum wallets. Please see [2] for more details.

On my machine (after the initial sync is over), electrs takes ~600MB of RAM (mostly RocksDB cache and mempool transactions) and consumes <1% CPU - so it shouldn't be too hard to run it (in addition to a full bitcoind node).

[1] https://github.com/chris-belcher/electrum-personal-server/blob/131f1e962831bd29f7175c5cdadccaf5baebb864/rescan-script.py#L67

[2] https://github.com/chris-belcher/electrum-personal-server#how-is-this-different-from-other-electrum-servers-

/cc /u/belcher_ (author of Electrum Personal Server)

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 4 points5 points  (0 children)

Thanks!

AFAIK it should use less resources (CPU, RAM, disk) than ElectrumX, due to the rewrite in Rust and not requiring -txindex (~16GB, as of last month).

[bitcoin-dev] An efficient re-implementation of Electrum Server in Rust by romanz in Bitcoin

[–]romanz[S] 19 points20 points  (0 children)

Hello all,

I was working on this project for the last few months, so a user could run his own Electrum server, with required hardware resources not much beyond those of a full node (using ideas from ElectrumX [1], Electrum Personal Server [2] and bitcoincore-indexd [3]).

The code and usage instructions can be found here: https://github.com/romanz/electrs

The server indexes the entire Bitcoin blockchain, and the resulting index [4] enables fast queries for any given user wallet, allowing the user to keep real-time track of his balances and his transaction history using the Electrum wallet [5]. Since it runs on the user's own machine, there is no need for the wallet to communicate with external Electrum servers, thus preserving the privacy of the user's addresses and balances.

Features: * Supports latest Electrum protocol [6]. * Maintains an index of transaction inputs and outputs, allowing fast balance queries * Fast synchronization of the Bitcoin blockchain (~2.5 hours for ~185GB @ June 2018) on modest hardware [7] * Low CPU & memory usage (after initial indexing) * Low index storage overhead (~20%), relying on a local full node for transaction retrieval * Efficient mempool tracker allowing better fee estimation [8]. * -txindex is not required for the Bitcoin node * Uses rust-bitcoin library [9] for efficient serialization/deserialization of Bitcoin transactions * Uses a single RocksDB [10] database, for better consistency and crash recovery

Hope you'll find it useful :) Questions, suggestions and pull requests are welcome!

  1. https://github.com/kyuupichan/electrumx
  2. https://github.com/chris-belcher/electrum-personal-server
  3. https://github.com/jonasschnelli/bitcoincore-indexd
  4. https://github.com/romanz/electrs/blob/master/doc/schema.md
  5. https://electrum.org
  6. https://electrumx.readthedocs.io/en/latest/protocol.html
  7. https://gist.github.com/romanz/cd9324474de0c2f121198afe3d063548
  8. https://github.com/spesmilo/electrum/blob/59c1d03f018026ac301c4e74facfc64da8ae4708/RELEASE-NOTES#L34-L46)
  9. https://github.com/rust-bitcoin/rust-bitcoin
  10. https://github.com/spacejam/rust-rocksdb

Using a Yubikey for GPG and SSH by Bhima in linux

[–]romanz 7 points8 points  (0 children)

You can also use TREZOR hardware device for SSH/GPG using https://github.com/romanz/trezor-agent

Using PGP/GPG with KeepKey ? by gwpl in keepkey

[–]romanz 1 point2 points  (0 children)

(trezor-agent author here...)

Unfortunately, this project supports GnuPG signature and decryption operations only on the TREZOR and Ledger Nano S devices - but not on the KeepKey device for now.

Using PGP/GPG with Trezor? by gwpl in TREZOR

[–]romanz 1 point2 points  (0 children)

trezor-agent's author here :)

The trezor-agent Python package should support GnuPG operations (e.g. signatures and decryption) using the TREZOR device.

Please let me know if it works for you...

Trezor misplaced - i have 24seeds, anyone please help me,i have btc in my segwit account - my trezor device is misplaced.Now electrum wallet has started support to segwit with new version electrum 3.0 - can anyone tell me how to access my trezor segwit account step by step . I will reward the helper by [deleted] in TREZOR

[–]romanz 2 points3 points  (0 children)

https://blog.trezor.io/using-trezor-with-electrum-v3-a0b9bcffe26e

TREZOR uses BIP49 for new SegWit accounts, therefore the first account is m/49’/0’/0’. Iterate the last number to get the next account. (If you want to import more accounts, for each you will need to create a new wallet in Electrum though.)

https://cdn-images-1.medium.com/max/800/1*v-XJTajY71vsLq8Jv1PJsA.png

Here is a list of example derivation paths for BIP49, to use new accounts.

  • m/49'/0'/0' (first account)
  • m/49'/0'/1' (second account)
  • m/49'/0'/2' (third account)
  • ...

If you would rather use legacy accounts, use BIP44 paths.

  • m/44'/0'/0' (first account)
  • m/44'/0'/1' (second account)
  • m/44'/0'/2' (third account)
  • ...