[SON ETH] Investigate ETH SON prerequisites #341

Closed
opened 2022-04-07 19:27:29 +00:00 by serkixenos · 8 comments
serkixenos commented 2022-04-07 19:27:29 +00:00 (Migrated from gitlab.com)

Generic Sidechain Listener HLD suggest that there are three prerequisites for implementing a listener:

  • Blockchain node provides interface for monitoring changes in a blockchain.
  • Monitoring is based on new block, new transaction or filtered single event (like transfer operation to specific address).
  • There is a sufficient C/C++ library OR there is a RPC API for connecting to monitoring interface.

Investigate the prerequisites and provide answers to following questions:

  • How can we get the information on new block produced on Ethereum node?
  • How can we get the information on transaction containing event of interest (transfer to deposit address or primary wallet)?
  • Is there a C++ library for communicating with Ethereum node?
Generic Sidechain Listener HLD suggest that there are three prerequisites for implementing a listener: - Blockchain node provides interface for monitoring changes in a blockchain. - Monitoring is based on new block, new transaction or filtered single event (like transfer operation to specific address). - There is a sufficient C/C++ library OR there is a RPC API for connecting to monitoring interface. Investigate the prerequisites and provide answers to following questions: - How can we get the information on new block produced on Ethereum node? - How can we get the information on transaction containing event of interest (transfer to deposit address or primary wallet)? - Is there a C++ library for communicating with Ethereum node?
serkixenos commented 2022-04-07 19:27:29 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
serkixenos commented 2022-04-07 19:28:05 +00:00 (Migrated from gitlab.com)

changed title from Investigate ETH SON prerequisite to Investigate ETH SON prerequisite{+s+}

changed title from **Investigate ETH SON prerequisite** to **Investigate ETH SON prerequisite{+s+}**
pavel.baykov commented 2022-04-08 11:24:08 +00:00 (Migrated from gitlab.com)

known official clients listed here, they have different modes, full node require SSD for production and 400GB to 1.2TB disk space and in full archived mode 6TB+
https://ethereum.org/en/developers/docs/nodes-and-clients/
Ethereum C++ client implementation: https://github.com/ethereum/aleth, it was discontinued supporting , checked code i see: «Berlin» update was the latest one.

https://github.com/ethereum/go-ethereum in Go have the best support,

however there are other options: which listed in first link ,
OpenEthereum (in Rust) was officially stopped supporting 2021 July, but i see recents commits there. and team said they will focus on Erigon.

There is option without having own node is https://infura.io/, free of charge up 100000 requests/day

known official clients listed here, they have different modes, full node require SSD for production and 400GB to 1.2TB disk space and in full archived mode 6TB+ https://ethereum.org/en/developers/docs/nodes-and-clients/ Ethereum C++ client implementation: https://github.com/ethereum/aleth, it was discontinued supporting , checked code i see: «Berlin» update was the latest one. https://github.com/ethereum/go-ethereum in Go have the best support, however there are other options: which listed in first link , OpenEthereum (in Rust) was officially stopped supporting 2021 July, but i see recents commits there. and team said they will focus on Erigon. There is option without having own node is https://infura.io/, free of charge up 100000 requests/day
pavel.baykov commented 2022-04-08 11:28:51 +00:00 (Migrated from gitlab.com)

there are different types of test nets:
https://phemex.com/academy/ropsten-faucet-vs-rinkeby-faucet-vs-kovan-faucet

I was able to run gEth node in docker, testnet, rinkeby

Download

docker pull ethereum/client-go:latest

directory for local data

mkdir ~/.geth-rinkeby

Run the container:

docker run --name eth -p 8546:8546 -v ~/.geth-rinkeby:/geth -it \
           ethereum/client-go --rinkeby --ws --ipcdisable \
           --ws.addr 0.0.0.0 --ws.origins="*" --datadir /geth
there are different types of test nets: https://phemex.com/academy/ropsten-faucet-vs-rinkeby-faucet-vs-kovan-faucet I was able to run gEth node in docker, testnet, rinkeby Download ``` docker pull ethereum/client-go:latest ``` directory for local data ``` mkdir ~/.geth-rinkeby ``` Run the container: ``` docker run --name eth -p 8546:8546 -v ~/.geth-rinkeby:/geth -it \ ethereum/client-go --rinkeby --ws --ipcdisable \ --ws.addr 0.0.0.0 --ws.origins="*" --datadir /geth ```
pavel.baykov commented 2022-04-08 11:32:01 +00:00 (Migrated from gitlab.com)

Geth v1.4 and later support publish / subscribe using JSON-RPC notifications. This allows clients to wait for events instead of polling for them.

https://geth.ethereum.org/docs/rpc/pubsub

Geth v1.4 and later support publish / subscribe using JSON-RPC notifications. This allows clients to wait for events instead of polling for them. https://geth.ethereum.org/docs/rpc/pubsub
pavel.baykov commented 2022-04-08 11:37:18 +00:00 (Migrated from gitlab.com)

newHeads could be used to subscribe for events about new blocks. Bloom filter could be used to determine if the block contains logs that are interested.

In case of a chain reorganization the subscription will emit all new headers for the new chain. Therefore the subscription can emit multiple headers on the same height.

newHeads could be used to subscribe for events about new blocks. Bloom filter could be used to determine if the block contains logs that are interested. In case of a chain reorganization the subscription will emit all new headers for the new chain. Therefore the subscription can emit multiple headers on the same height.
pavel.baykov commented 2022-04-08 11:37:49 +00:00 (Migrated from gitlab.com)

newPendingTransactions
Returns the hash for all transactions that are added to the pending state and are signed with a key that is available in the node.

When a transaction that was previously part of the canonical chain isn’t part of the new canonical chain after a reorganization its again emitted.

newPendingTransactions Returns the hash for all transactions that are added to the pending state and are signed with a key that is available in the node. When a transaction that was previously part of the canonical chain isn’t part of the new canonical chain after a reorganization its again emitted.
serkixenos commented 2022-04-27 13:04:23 +00:00 (Migrated from gitlab.com)

changed title from Investigate ETH SON prerequisites to {+[SON ETH] +}Investigate ETH SON prerequisites

changed title from **Investigate ETH SON prerequisites** to **{+[SON ETH] +}Investigate ETH SON prerequisites**
serkixenos (Migrated from gitlab.com) closed this issue 2022-05-04 15:37:26 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#341
No description provided.