Bitcoin Forum
May 02, 2024, 08:08:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: listreceivedbyaddress vs listaddressgroupings  (Read 147 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)
1714680488
Hero Member
*
Offline Offline

Posts: 1714680488

View Profile Personal Message (Offline)

Ignore
1714680488
Reply with quote  #2

1714680488
Report to moderator
1714680488
Hero Member
*
Offline Offline

Posts: 1714680488

View Profile Personal Message (Offline)

Ignore
1714680488
Reply with quote  #2

1714680488
Report to moderator
1714680488
Hero Member
*
Offline Offline

Posts: 1714680488

View Profile Personal Message (Offline)

Ignore
1714680488
Reply with quote  #2

1714680488
Report to moderator
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714680488
Hero Member
*
Offline Offline

Posts: 1714680488

View Profile Personal Message (Offline)

Ignore
1714680488
Reply with quote  #2

1714680488
Report to moderator
1714680488
Hero Member
*
Offline Offline

Posts: 1714680488

View Profile Personal Message (Offline)

Ignore
1714680488
Reply with quote  #2

1714680488
Report to moderator
BitMaxz
Legendary
*
Offline Offline

Activity: 3248
Merit: 2955


Block halving is coming.


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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6723


bitcoincleanup.com / bitmixlist.org


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).


.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BitMaxz
Legendary
*
Offline Offline

Activity: 3248
Merit: 2955


Block halving is coming.


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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!