vulpemventures / neutrino-elements

MIT License
3 stars 4 forks source link

Watch wallet descriptor outputs #15

Closed sekulicd closed 2 years ago

sekulicd commented 2 years ago

This adds support to Scanner to "watch" scripts generated by wallet descriptor.

It is in WIP state cause i am not able to test it against testnet, i noticed that node is not getting messages. Do we support syncing of filters from height=0?

@tiero @altafan @louisinger please review.

tiero commented 2 years ago

i noticed that node is not getting messages, Do we support syncing of filters from height=0

Looks like to me MUST be possible. Am I wrong? @altafan @louisinger

louisinger commented 2 years ago

This adds support to Scanner to "watch" scripts generated by wallet descriptor. It is in WIP state cause i am not able to test it against testnet, i noticed that node is not getting messages. Do we support syncing of filters from height=0?

Weird u get zero messages from the node :thinking: note that if are using the CLI you need to change some URLs and config param manually to sync on non-regtest network.

However u're right, there is a sync problem on testnet (and mainnet): https://github.com/vulpemventures/neutrino-elements/issues/16

sekulicd commented 2 years ago

@tiero @louisinger please take a look from 75c817c commit changes related to syncing. For testnet it takes few minutes to sync, tried few times and it synced successfully.

sekulicd commented 2 years ago

@tiero looks like CI is not stable, i noticed locally that sometimes tests(TestWalletDescriptorRange) are failing cause nigiri doest add txs to the block even if same is mined, txs stays unconfirmed and scanner never receives events about conf tx.

tiero commented 2 years ago

@tiero looks like CI is not stable, i noticed locally that sometimes tests(TestWalletDescriptorRange) are failing cause nigiri doest add txs to the block even if same is mined, txs stays unconfirmed and scanner never receives events about conf tx.

Are you using POST /tx endpoint to broadcast? otherwise it does not automatically generate block

sekulicd commented 2 years ago

@tiero looks like CI is not stable, i noticed locally that sometimes tests(TestWalletDescriptorRange) are failing cause nigiri doest add txs to the block even if same is mined, txs stays unconfirmed and scanner never receives events about conf tx.

Are you using POST /tx endpoint to broadcast? otherwise it does not automatically generate block

tiero commented 2 years ago

@tiero looks like CI is not stable, i noticed locally that sometimes tests(TestWalletDescriptorRange) are failing cause nigiri doest add txs to the block even if same is mined, txs stays unconfirmed and scanner never receives events about conf tx.

Are you using POST /tx endpoint to broadcast? otherwise it does not automatically generate block

and after there are 10 tx in mempool to call "generatetoaddress" in order to add them in next block and immediately

Did you used rescanblockchain Elements RPC right after? Maybe it helps

There is some problem in Elements Core apparently with such a long unconfirmed chain in the mempool. Shall the number of confirmed txs?

Eventually using only one if not works