Bitcoin Forum
November 11, 2024, 05:53:27 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: listreceivedbyaddress vs listaddressgroupings  (Read 165 times)
ayza_aa (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
June 14, 2021, 09:27:42 AM
Merited by ABCbits (1)
 #1

hi, i am an amateur in blockchain, So forgive me for the trivial questions

I want to know the difference between listreceivedbyaddress and listaddressgroupings method in the bitcoin-cli?

it is wired after call this: bitcoin-cli -regtest generatetoaddress 101 $(bitcoin-cli -regtest getnewaddress)

with listaddressgroupings i have 50 bitcoin, but with listreceivedbyaddress i have zero (by same address)
BitMaxz
Legendary
*
Offline Offline

Activity: 3430
Merit: 3168


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
June 14, 2021, 11:35:20 AM
 #2

Have you read the bitcoin core documentation?

If not yet read them here
- https://developer.bitcoin.org/reference/rpc/index.html

About "listreceivedbyaddress" read this https://developer.bitcoin.org/reference/rpc/listreceivedbyaddress.html
According to documentation, it is "List balances by receiving address."


And for "listaddressgroupings" read them here https://developer.bitcoin.org/reference/rpc/listaddressgroupings.html
According to documentation about this command:
"Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions"

Based on what I understand about listaddressgroupings the returning result must be the addresses with inputs or past transactions that exist on the mainnet blockchain meaning if you use this command and the target address doesn't have inputs or past transaction it won't show anything.

For listreceivedbyaddress I think it only shows the total amount received of the target address and shows the confirmations of the recent transaction.
I got this on "listreceivedbyaddress"


I don't know if it's a bug, but i tried same thing on regtest using Bitcoin Core 0.21.1. But command listreceivedbyaddress never shows correct amount even if i use different parameter

Code:
listreceivedbyaddress
listreceivedbyaddress 0
listreceivedbyaddress 0 true
listreceivedbyaddress 0 true "the_address"

Can you try this command below?

Code:
bitcoin-cli listreceivedbyaddress 0 true true '"replacethiswiththetargetaddress"'

Don't remove the quotes.

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
NotATether
Legendary
*
Offline Offline

Activity: 1778
Merit: 7372


Top Crypto Casino


View Profile WWW
June 14, 2021, 05:48:56 PM
 #3

Based on what I understand about listaddressgroupings the returning result must be the addresses with inputs or past transactions that exist on the mainnet blockchain meaning if you use this command and the target address doesn't have inputs or past transaction it won't show anything.

listaddressgroupings calculates the total number of BTC received by each wallet address and returns a list of addresses alongside its total balance. This struct is wrapped inside another array that lists every wallet address that has ever been involved in transactions with that address.



That's all there is to it. There isn't much "common ownership made public" or correlation stuff involved in this RPC (or else it would be prohibitively expensive to run on large wallets since it would be stateless information calculated at runtime).


███████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████

███████████████████████
.
BC.GAME
▄▄▀▀▀▀▀▀▀▄▄
▄▀▀░▄██▀░▀██▄░▀▀▄
▄▀░▐▀▄░▀░░▀░░▀░▄▀▌░▀▄
▄▀▄█▐░▀▄▀▀▀▀▀▄▀░▌█▄▀▄
▄▀░▀░░█░▄███████▄░█░░▀░▀▄
█░█░▀░█████████████░▀░█░█
█░██░▀█▀▀█▄▄█▀▀█▀░██░█
█░█▀██░█▀▀██▀▀█░██▀█░█
▀▄▀██░░░▀▀▄▌▐▄▀▀░░░██▀▄▀
▀▄▀██░░▄░▀▄█▄▀░▄░░██▀▄▀
▀▄░▀█░▄▄▄░▀░▄▄▄░█▀░▄▀
▀▄▄▀▀███▄███▀▀▄▄▀
██████▄▄▄▄▄▄▄██████
.
..CASINO....SPORTS....RACING..


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
BitMaxz
Legendary
*
Offline Offline

Activity: 3430
Merit: 3168


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
June 15, 2021, 05:34:44 PM
 #4

~snip~

Can you try it again but this time add this setting on the Bitcoin.conf file

Code:
server=1

Then use the command again but this time with bitcoind

Code:
bitcoind listreceivedbyaddress 0 true

Just reading their API calls here
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

I found in the description to use the bitcoind.

Let see if it will work

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!