SatoshiPortal / cyphernode

Modular Bitcoin full-node microservices API server architecture and utilities toolkit to build scalable, secure and featureful apps and services without trusted third parties
MIT License
362 stars 68 forks source link

Features/async walletnotify #266

Closed phillamy closed 2 years ago

phillamy commented 2 years ago

First commit usng MQTT to send events from core to Proxy. Event are filtrer t send watching wallets tx only.

Next: remove code in confirmation and use data received in sub message

phillamy commented 2 years ago

I added coreutils in Dockerfile to use the most recent version of base64.

The date command changed breaking this. -D Option is not an option anymore: inserted_ts=$(date -d "$(echo "${watching}" | cut -d '|' -f2)" -D '%Y-%m-%d %H:%M:%S' +"%s")

Line replaced by (in manage_missed_conf.sh): inserted_ts=$(date -d "$(echo "${watching}" | cut -d '|' -f2)" +%s)

phillamy commented 2 years ago

Core will filter out transactions based on the wallet and will only send trx concerning the "watching" wallets. Core sends the trx details to the broker since it had to do a "gettransaction" to identify the wallet. The proxy will not have to do this anymore

phillamy commented 2 years ago

I had to build a new core image called "async-blocknotify". It brings a script that gets called by walletnotify=...

In setup.sh, you can see BITCOIN_VERSION="async-blocknotify"

Kexkey commented 2 years ago

I had to build a new core image called "async-blocknotify". It brings a script that gets called by walletnotify=...

In setup.sh, you can see BITCOIN_VERSION="async-blocknotify"

I don't understand why you had to build a new Bitcoin Core image? The templates' bitcoin/bitcoin.conf file has the new walletnotify instruction, no?

Kexkey commented 2 years ago

I had to build a new core image called "async-blocknotify". It brings a script that gets called by walletnotify=... In setup.sh, you can see BITCOIN_VERSION="async-blocknotify"

I don't understand why you had to build a new Bitcoin Core image? The templates' bitcoin/bitcoin.conf file has the new walletnotify instruction, no?

Ah it's probably to include the mosquitto package to be able to publish the message...