Author

Topic: Please, help with bitcoin core (Read 345 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
October 29, 2018, 07:39:04 PM
#8
Those errors look like permission errors. Make sure that the user that bitcoind is running as has permission to read and execute the file. Note that the user that you are currently using in the shell is not necessarily the same user. Further, if you have to use sudo to do anything to the file, then something is probably wrong, unless bitcoind is being run as root (which you shouldn't be doing).
jr. member
Activity: 49
Merit: 23
October 27, 2018, 12:16:15 PM
#7
I'm now trying to test blocknotify and walletnotify, but it gives me errors. I retried different combinations,but still the same.
Error is:
https://i.imgur.com/KOD2own.png
My config file is(from docker of btcpayserver):
https://i.imgur.com/Sbon9uo.png
Running it on digitalocean.
And test.sh has run permissions, I tried different combinations like sudo chmod a+x test.sh or sudo chmod a+rwx /root
test.sh is:
https://i.imgur.com/YN7HbrA.png
echo to file is just to test if my python script will not work,and python script is:
https://i.imgur.com/FAcrhJ3.png
Thank you.
jr. member
Activity: 49
Merit: 23
October 24, 2018, 02:30:00 PM
#6
Thank you very much for your answers! Will try them soon. But as I saw walletnotify notifies up to 1 confirmation, and I need up to 3 because I count payment succeeded after 3 confirmations.(Oh sorry,noticed about blocknotify,thanks!)
legendary
Activity: 1624
Merit: 2481
October 24, 2018, 06:11:54 AM
#5
You can't achieve all of this functionality in core.

Core is a wallet. Not a hot-/cold- wallet seperation and deposit software.

You'll need to build your software around utilizing core's RPC's.



1. Create bitcoin address which forwards 30% send to it to hot wallet, other 70% to cold wallet.

Simply check the received amount and either (1) instantly create a new transaction (not recommended) or (2) batch transactions until you have X, then split them as you wish using sendmany.


2. Send bitcoins from wallet(hotwallet) to other users.

A simple RPC call to generate a transaction is enough here.


3. When user paid to address created, send notification to callback_handler.

You need to use walletnotify (if you only care about the first confirmation) and/or blocknotify (if you want to track the amount of confirmations).



There isn't too much work needed to achieve that. Most commands are self-explanatory and/or are very well documented.
staff
Activity: 3458
Merit: 6793
Just writing some code
October 23, 2018, 10:04:08 AM
#4
But getnewaddress creates address based on one account. And I need separation between two wallets(accounts)-30% to hot wallet, 70% to cold.
An address is not a program, it can't forward anything automagically. You will need to have something that waits for transactions to that address and creates the forwarding transaction for you. You can do this by using -walletnotify.
jr. member
Activity: 49
Merit: 23
October 23, 2018, 08:30:30 AM
#3
But getnewaddress creates address based on one account. And I need separation between two wallets(accounts)-30% to hot wallet, 70% to cold.
staff
Activity: 3458
Merit: 6793
Just writing some code
October 22, 2018, 11:20:04 PM
#2
1. Create bitcoin address which forwards 30% send to it to hot wallet, other 70% to cold wallet.
getnewaddress

2. Send bitcoins from wallet(hotwallet) to other users.
Use sendmany to send to multiple recipients

3. When user paid to address created, send notification to callback_handler.
You can start Bitcoin Core with the -walletnotify= option where is a command (i.e. a script) that Bitcoin Core will execute when a transaction is received. Read the help text (start with -help) for more information.
jr. member
Activity: 49
Merit: 23
October 22, 2018, 11:09:06 PM
#1
Hello bitcoin devs! I'm new to bitcoin core.
And I have installed full node bitcoin core on my server(prune=500 in bitcoin.conf if it changes something).
I'm working on a project where I need only a few things:
1. Create bitcoin address which forwards 30% send to it to hot wallet, other 70% to cold wallet.
2. Send bitcoins from wallet(hotwallet) to other users.
3. When user paid to address created, send notification to callback_handler.
Please, help me to figure out which commands to use.
getnewaddress creates address,but without separaton and callback handler.
Jump to: