Bitcoin Forum
May 03, 2024, 08:44:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: New/Custom RPC calls  (Read 1253 times)
bitcreditscc (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 01, 2015, 02:49:58 AM
 #1

This is part of a series of questions stemming from here Embarrassedhttps://bitcointalk.org/index.php?topic=909391.0

I need help creating new RPC call list  that can give me the following information or if you know how to change/add a few lines that will provide the following results. (explicitly)

1) count of all incoming wallet tx - then all incoing wallet tx by account
2) count of all outgoing wallet tx  - then all outgoing tx by account

3) count of transactions to a specific address
4) count of transactions from a specific address

5) total value of all incoming wallet tx
6) total of all outgoing wallet tx

7) count of mined blocks by this specific wallet
8 )  total transactions in the entire blockchain
10) date of each accounts first tx

I have re-introduced IRC in my version of the wallet and wish to use it to automatically send payment requests (URIs), if anyone can help with that too  Smiley

I need to make these changes in the core client as the information should be displayed there. I think once i get this i'll be all set and within a week or two i can explain what it is exactly i am up to.

Assistance is most appreciated.

**note  i know of the existing call list and listtransactions, however it does not explicitly give these results.

1714769087
Hero Member
*
Offline Offline

Posts: 1714769087

View Profile Personal Message (Offline)

Ignore
1714769087
Reply with quote  #2

1714769087
Report to moderator
1714769087
Hero Member
*
Offline Offline

Posts: 1714769087

View Profile Personal Message (Offline)

Ignore
1714769087
Reply with quote  #2

1714769087
Report to moderator
1714769087
Hero Member
*
Offline Offline

Posts: 1714769087

View Profile Personal Message (Offline)

Ignore
1714769087
Reply with quote  #2

1714769087
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714769087
Hero Member
*
Offline Offline

Posts: 1714769087

View Profile Personal Message (Offline)

Ignore
1714769087
Reply with quote  #2

1714769087
Report to moderator
1714769087
Hero Member
*
Offline Offline

Posts: 1714769087

View Profile Personal Message (Offline)

Ignore
1714769087
Reply with quote  #2

1714769087
Report to moderator
1714769087
Hero Member
*
Offline Offline

Posts: 1714769087

View Profile Personal Message (Offline)

Ignore
1714769087
Reply with quote  #2

1714769087
Report to moderator
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
January 01, 2015, 03:36:51 AM
 #2

I need help creating new RPC call list  that can give me the following information or if you know how to change/add a few lines that will provide the following results. (explicitly)

1) count of all incoming wallet tx - then all incoing wallet tx by account
2) count of all outgoing wallet tx  - then all outgoing tx by account
3) count of transactions to a specific address
5) total value of all incoming wallet tx
6) total of all outgoing wallet tx
7) count of mined blocks by this specific wallet
10) date of each accounts first tx
**note  i know of the existing call list and listtransactions, however it does not explicitly give these results.
As you note, these are indirectly accomplished via listtransactions already. It's not going to be faster to generate them directly as it will take the same process as a listtransaction to handle them internally.

Since you need help to do so, perhaps adding RPCs aren't the best way to handle your needs.

Keep in mind that errors made while programming here may cause funds loss. The threshold for where you need to add something new should be accordingly somewhat high.

Quote
4) count of transactions from a specific address
Bitcoin transactions do not have from addresses. https://iwilcox.me.uk/2014/no-from-address

Quote
8 )  total transactions in the entire blockchain
This data is in chainActive.Tip()->nChainTx

Quote
I have re-introduced IRC in my version of the wallet and wish to use it to automatically send payment requests (URIs), if anyone can help with that too  Smiley
IRC is a pretty crappy way to have a centralized server handle things... it's crappy because the server has few tools for DOS mitigation, because messages are very limited in size, and because it's frequently blocked.

If you're willing to trust a server to mediate communications, there are better options. Though, I won't if you really are willing... what happens when that IRC server replaces addresses in payment URIs?

Quote
Assistance is most appreciated.
You haven't actually asked a question. By assistance do you mean "I'd like someone to do the work for me, for free, and I'm not even going to tell you why"?  Thats what it sounds like, absent an actual specific question. If that isn't the impression you want to give you should try making it clear that you've attempted this stuff yourself already and ask specific questions.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4615



View Profile
January 01, 2015, 03:43:55 AM
 #3

- snip -
1) count of all incoming wallet tx - then all incoing wallet tx by account
2) count of all outgoing wallet tx  - then all outgoing tx by account
- snip -

In my experience, "accounts" in Bitcoin Core do not work the way most people want them to work.  Most people find that they'll be much better off implementing accounts outside of Bitcoin Core in their own system and just using Bitcoin Core as a gateway.

If you think that the accounts are going to meet your needs, or you've assumed that they will meet your needs, and you haven't taken the time yet to understand exactly how Bitcoin Code manages accounts, then you are probably going to be unpleasantly surprised later.

- snip -
I need help creating new RPC call list
- snip -

Certainly.  My rates are 0.33 BTC per hour, and I'll need well specified requirements for the exact behavior you expect for each new call.  Furthermore, you'll need to have reasonable expectations for performance given the constraints of scanning the entire blockchain for some of the information that you are requesting.
bitcreditscc (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 01, 2015, 04:21:28 AM
 #4

I need help creating new RPC call list  that can give me the following information or if you know how to change/add a few lines that will provide the following results. (explicitly)

1) count of all incoming wallet tx - then all incoing wallet tx by account
2) count of all outgoing wallet tx  - then all outgoing tx by account
3) count of transactions to a specific address
5) total value of all incoming wallet tx
6) total of all outgoing wallet tx
7) count of mined blocks by this specific wallet
10) date of each accounts first tx
**note  i know of the existing call list and listtransactions, however it does not explicitly give these results.
As you note, these are indirectly accomplished via listtransactions already. It's not going to be faster to generate them directly as it will take the same process as a listtransaction to handle them internally.

Since you need help to do so, perhaps adding RPCs aren't the best way to handle your needs.

Keep in mind that errors made while programming here may cause funds loss. The threshold for where you need to add something new should be accordingly somewhat high.

Quote
4) count of transactions from a specific address
Bitcoin transactions do not have from addresses. https://iwilcox.me.uk/2014/no-from-address

Quote
8 )  total transactions in the entire blockchain
This data is in chainActive.Tip()->nChainTx

Quote
I have re-introduced IRC in my version of the wallet and wish to use it to automatically send payment requests (URIs), if anyone can help with that too  Smiley
IRC is a pretty crappy way to have a centralized server handle things... it's crappy because the server has few tools for DOS mitigation, because messages are very limited in size, and because it's frequently blocked.

If you're willing to trust a server to mediate communications, there are better options. Though, I won't if you really are willing... what happens when that IRC server replaces addresses in payment URIs?

Quote
Assistance is most appreciated.
You haven't actually asked a question. By assistance do you mean "I'd like someone to do the work for me, for free, and I'm not even going to tell you why"?  Thats what it sounds like, absent an actual specific question. If that isn't the impression you want to give you should try making it clear that you've attempted this stuff yourself already and ask specific questions.


great, thanks you are right, i wasn't as articulate as i should have been. I asked for help to add the as RPCs since i thought that was the most efficient way but if another way exists i would be thankful if you point me in the right direction.

Quote
Bitcoin transactions do not have from addresses. https://iwilcox.me.uk/2014/no-from-address

lol, i know...i need to figure out a way to monitor the relationship between every other "address" in the chain and 3 very specific "addresses"

This data is in chainActive.Tip()->nChainTx

One down!!!! this puts some of the stuff miles ahead, thanks!

Quote
IRC is a pretty crappy way to have a centralized server handle things... it's crappy because the server has few tools for DOS mitigation, because messages are very limited in size, and because it's frequently blocked.

If you're willing to trust a server to mediate communications, there are better options. Though, I won't if you really are willing... what happens when that IRC server replaces addresses in payment URIs?

I am limited in means and technical know-how, i have the idea and can only think of crude implementations to get the result i want, and as you have pointed out, it's a leaking sieve. if you know of a more secure way for clients to pass URIs automatically to a set 3 addresses, then please share. I learn as i go along and refine my ideas on the fly, i'm actually putting most of what you say onto a note so i think along those lines.

Quote
By assistance do you mean "I'd like someone to do the work for me, for free, and I'm not even going to tell you why"?  Thats what it sounds like, absent an actual specific question. If that isn't the impression you want to give you should try making it clear that you've attempted this stuff yourself already and ask specific questions.

Yes i'd like someone to help me, free if they are willing. As for why i don't just come right out and say it, any person who gives assistance is likely to already know what i am attempting to do, if not i will tell them, and if they are crazy enough, they may just decide to stick around and see how far I can go. And you already know what i am doing so you don't count.

bitcreditscc (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 01, 2015, 04:29:16 AM
 #5

- snip -
1) count of all incoming wallet tx - then all incoing wallet tx by account
2) count of all outgoing wallet tx  - then all outgoing tx by account
- snip -

In my experience, "accounts" in Bitcoin Core do not work the way most people want them to work.  Most people find that they'll be much better off implementing accounts outside of Bitcoin Core in their own system and just using Bitcoin Core as a gateway.

If you think that the accounts are going to meet your needs, or you've assumed that they will meet your needs, and you haven't taken the time yet to understand exactly how Bitcoin Code manages accounts, then you are probably going to be unpleasantly surprised later.

- snip -
I need help creating new RPC call list
- snip -

Certainly.  My rates are 0.33 BTC per hour, and I'll need well specified requirements for the exact behavior you expect for each new call.  Furthermore, you'll need to have reasonable expectations for performance given the constraints of scanning the entire blockchain for some of the information that you are requesting.

You are right, and at some point DOS and any other number of issues will bite me where it hurts, but i'd like to get a proof of concept out first, then if it can be scaled, push on with refinements.

The reason it has to be in the core client , is that it will be decentralized. for now it seems like i am building up to a centralized model, and it is the only way i see of testing the theory, once i prove it works i'll then start asking questions that will lead to decentralization.

For now i need this model to work. Already i have been warned away from IRC ,so i need to re-think how i a going to handle that part

As for your rates, hell if i could pay that much, i would. I have faith in my idea, just wish my wallet had as much faith in me.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4615



View Profile
January 01, 2015, 04:36:46 AM
 #6

- snip -
I am limited in means and technical know-how, i have the idea and can only think of crude implementations to get the result i want,
- snip -

Ideas that aren't supported by basic knowledge and understanding of the underlying technology really don't impress me much.

There are a lot of people who have "the idea" for a perpetual motion (or "over unity") machine, but they can only think of crude implementations that don't "quite" accomplish their exact goal.  They generally feel that all they need is a bit of refinement on their basic idea.  Because of their lack of basic knowledge, they aren't capable of seeing the underlying flaws in their goals.

Unless you are willing to provide significant details on exactly what you're trying to accomplish, and are willing to accept the knowledge of well studied "experts", I suspect that your "project" won't get very far at all.
bitcreditscc (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 01, 2015, 04:52:06 AM
Last edit: January 01, 2015, 05:06:23 AM by bitcreditscc
 #7

- snip -
I am limited in means and technical know-how, i have the idea and can only think of crude implementations to get the result i want,
- snip -

Ideas that aren't supported by basic knowledge and understanding of the underlying technology really don't impress me much.

There are a lot of people who have "the idea" for a perpetual motion (or "over unity") machine, but they can only think of crude implementations that don't "quite" accomplish their exact goal.  They generally feel that all they need is a bit of refinement on their basic idea.  Because of their lack of basic knowledge, they aren't capable of seeing the underlying flaws in their goals.

Unless you are willing to provide significant details on exactly what you're trying to accomplish, and are willing to accept the knowledge of well studied "experts", I suspect that your "project" won't get very far at all.

So you envision a world where one has the idea, the knowledge and understanding  and of course the means to back up their idea?

I'm sorry , but in my world that does not compute. The general way things work for us mere mortals, is we come up with an idea, we investigate, poke and ask questions. We then try our best to get it to work even just once under lab conditions, we then tell people and show them. From there on, experts in the field become very interested and it takes on a whole different face, and if it's good enough backing will materialize. You are saying that in order to have an idea that you can take seriously, i need to know all there is to know about bitcoin protocol. If i have said something that is out of it's scope, please point it out. If only experts are allowed to bring up ideas and try things out, then why do we call ourselves a community? What is the point in opensource if people cant play around with it?

Just to add some sugar in my tea, the points raised and answers given by gmaxwell have already pushed me past a lot of stuff i had on my mind as well as giving me new things to worry about and new problems to solve. Basically in one post he answered 1 question directly, gave e an idea on what to do for 7 others and warned me away from a fatal mistake.

Please stop trying to poke holes in my kite and help me build a stronger one. I can understand your frustration with people's questions and ideas sometimes, i just need a helping hand.

bitcreditscc (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 01, 2015, 05:12:29 AM
 #8

So, to keep this thread on track:-

1) count of all incoming wallet tx - then all incoing wallet tx by account
2) count of all outgoing wallet tx  - then all outgoing tx by account

3) count of transactions to a specific address
4) count of transactions from a specific address

5) total value of all incoming wallet tx
6) total of all outgoing wallet tx

7) count of mined blocks by this specific wallet
8 )  total transactions in the entire blockchain answered by gmaxwell
10) date of each accounts first tx

I have re-introduced IRC in my version of the wallet and wish to use it to automatically send payment requests (URIs), if anyone can help with that too need to rethink that
 

The others i have been warned to be careful in how it's done.

So if someone can give me number 1 and number 3 , that will take another 4 off the list.  

Again, doing it outside the client is not ideal since i need to use the stats inside the client.

shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1499


No I dont escrow anymore.


View Profile WWW
January 01, 2015, 11:53:29 AM
 #9

-snip-
Unless you are willing to provide significant details on exactly what you're trying to accomplish, and are willing to accept the knowledge of well studied "experts", I suspect that your "project" won't get very far at all.

IMHO its pretty clear and I have no idea why bitcreditscc tries to keep something a secret that clearly is none,

https://bitcointalk.org/index.php?topic=896133.0
https://github.com/bitcreditscc

Im not really here, its just your imagination.
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4158
Merit: 8382



View Profile WWW
January 01, 2015, 12:31:51 PM
 #10

Ah, it's the standard game of trying to con the Bitcoin technical community into doing the engineering work for some competing altcoin which doesn't actually have any technical backing.

Thanks Shorena.
bitcreditscc (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 01, 2015, 03:02:50 PM
 #11

Oh yes of course gmaxwell, it's a con, that's why i ask publicly .  /thick choking sarcasm

You are free to oppose my position, but the previous thread got example uses for my ideas and questions without any further input from me, to which you replied in a typical tech manner.

And by the way i'm not just one to complain, you'll note that since i opened this account, i also participate on github/bitcoin when i can. And everytime i bump into something in the code you will see questions and pull requests. So don't lump me in whatever group conned you for an altcoin, i asked questions and asked for help, i didn't ask for your money or anything unreasonable, it's a choice whether to broadcast my entire list of to-do's or not, choosing to selectively release information is the act of a shrewd person and like you clearly stated, there are cons around here and it is best at times to play your cards close. One would then point out your fixation on my releasing information rather than actually trying to help, meaning that you are more interested in the ideas behind my questions than in helping. It's like asking for directions to to a toilet and then getting quizzed about the specifics of your plans in the toilet.


of course, let's not point out that you yourself have thrown a few fixes at some of these "competing" altcoins.

I really appreciate your help thus far don't get me wrong, hell if you had 5 minutes a day, i'd love to bounce of what i have thought about after each conversation with you and how i propose to deal with the obstacles.

Like i tried to say earlier, put down the shotgun and instead of saying my questions and ideas are a con, pay attention and help when you can. there is likely more good to come out of exploration than staying in the village

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4615



View Profile
January 01, 2015, 04:55:21 PM
 #12

-snip-
Unless you are willing to provide significant details on exactly what you're trying to accomplish, and are willing to accept the knowledge of well studied "experts", I suspect that your "project" won't get very far at all.

IMHO its pretty clear and I have no idea why bitcreditscc tries to keep something a secret that clearly is none,

https://bitcointalk.org/index.php?topic=896133.0
https://github.com/bitcreditscc

I should have taken the time to look through his posting history.  I suppose I was just too busy celebrating last night. Thanks Shorena.

It looks like he's posted a few threads in "Development & Technical Discussion that belong in the altcoin sub-forum.  Perhaps a moderator will notice and move them, but I suspect they are well enough disguised that a moderator won't have time to figure it all out.  Regardless, I suppose I can killfile and move on.
siameze
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000



View Profile
January 01, 2015, 08:59:49 PM
 #13

-snip-
Unless you are willing to provide significant details on exactly what you're trying to accomplish, and are willing to accept the knowledge of well studied "experts", I suspect that your "project" won't get very far at all.

IMHO its pretty clear and I have no idea why bitcreditscc tries to keep something a secret that clearly is none,

https://bitcointalk.org/index.php?topic=896133.0
https://github.com/bitcreditscc

6m ICO and 87% minable .... wow. Is there like a template for these scams?   Roll Eyes


                     ▀▀█████████▀████████████████▄
                        ████▄      ▄████████████████
                     ▄██████▀  ▄  ███████████████████
                  ▄█████████▄████▄███████████████████
                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████
                                               ▀▀███▀
    ▄█▀█       ▄▀  ▄▀▀█  ▄▀   █████████████████▄ ██▀         ▄▀█
   ▄█ ▄▀      ▀█▀ █▀ █▀ ▀█▀  ███████████████████ █▀ ▀▀      ▄▀▄▀
  ▄█    ▄███  █     █   █   ████████████████████  ▄█     ▄▀▀██▀ ▄███
███▄▄▄  █▄▄▄ █▄▄ ▄▄▀   █▄▄ ██████████████████▀▀   █▄▄ ▄▄ █▄▄█▄▄▄█▄▄▄
                           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                            ▀▀█████████████▄
                                █████████████▄
                                  █████████████▄
                                    ▀███████▀▀▀▀▀
                                      ▀████▀
                                        ▀█▀
LetItRideINNOVATIVE ▬▬▬
DICE GAME
                        ▄███████████▄
                       ██  ██████████▄
                     ▄█████████████  ██▄
            ▄▄▀█▄▄▄▄▄████████████████████▄
        ▄▄█▀   ███████████  █████  ████  █
    ▄██████ ▄▄███████████████████████████▀
 ▄▀▀ ██████████████████████████  ████  █
█  ▄███████████▀▀▀█████████████████████
██████████████    ████████▀▀██████  █▀
██████████████▄▄▄██████████   ▀▀▀▀▀▀▀
███▀ ▀██████████████████████
██    ███████████████████████
██▄▄██████████████████████████
██████████████▀   ██████████
  █████████████   ▄██████▀▀
     ▀▀██████████████▀▀
         ▀▀██████▀▀
PROVABLY
F A I R
▄█████████████▀ ▄█
██            ▄█▀
██          ▄██ ▄█
██ ▄█▄    ▄███  ██
██ ▀███▄ ▄███   ██
██  ▀███████    ██
██    █████     ██
██     ███      ██
██      ▀       ██
██              ██
▀████████████████▀
BUY  BACK
PLANS
[BTC]
bitcreditscc (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 01, 2015, 09:34:19 PM
 #14

-snip-
Unless you are willing to provide significant details on exactly what you're trying to accomplish, and are willing to accept the knowledge of well studied "experts", I suspect that your "project" won't get very far at all.

IMHO its pretty clear and I have no idea why bitcreditscc tries to keep something a secret that clearly is none,

https://bitcointalk.org/index.php?topic=896133.0
https://github.com/bitcreditscc

6m ICO and 87% minable .... wow. Is there like a template for these scams?   Roll Eyes

Your signature.

siameze
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000



View Profile
January 01, 2015, 09:36:20 PM
 #15

What does my signature have to do with scamcoins? Unless you need a way to launder your ico funds when you run, in which case I highly recommend you look into such a service.


                     ▀▀█████████▀████████████████▄
                        ████▄      ▄████████████████
                     ▄██████▀  ▄  ███████████████████
                  ▄█████████▄████▄███████████████████
                ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████
                                               ▀▀███▀
    ▄█▀█       ▄▀  ▄▀▀█  ▄▀   █████████████████▄ ██▀         ▄▀█
   ▄█ ▄▀      ▀█▀ █▀ █▀ ▀█▀  ███████████████████ █▀ ▀▀      ▄▀▄▀
  ▄█    ▄███  █     █   █   ████████████████████  ▄█     ▄▀▀██▀ ▄███
███▄▄▄  █▄▄▄ █▄▄ ▄▄▀   █▄▄ ██████████████████▀▀   █▄▄ ▄▄ █▄▄█▄▄▄█▄▄▄
                           ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
                            ▀▀█████████████▄
                                █████████████▄
                                  █████████████▄
                                    ▀███████▀▀▀▀▀
                                      ▀████▀
                                        ▀█▀
LetItRideINNOVATIVE ▬▬▬
DICE GAME
                        ▄███████████▄
                       ██  ██████████▄
                     ▄█████████████  ██▄
            ▄▄▀█▄▄▄▄▄████████████████████▄
        ▄▄█▀   ███████████  █████  ████  █
    ▄██████ ▄▄███████████████████████████▀
 ▄▀▀ ██████████████████████████  ████  █
█  ▄███████████▀▀▀█████████████████████
██████████████    ████████▀▀██████  █▀
██████████████▄▄▄██████████   ▀▀▀▀▀▀▀
███▀ ▀██████████████████████
██    ███████████████████████
██▄▄██████████████████████████
██████████████▀   ██████████
  █████████████   ▄██████▀▀
     ▀▀██████████████▀▀
         ▀▀██████▀▀
PROVABLY
F A I R
▄█████████████▀ ▄█
██            ▄█▀
██          ▄██ ▄█
██ ▄█▄    ▄███  ██
██ ▀███▄ ▄███   ██
██  ▀███████    ██
██    █████     ██
██     ███      ██
██      ▀       ██
██              ██
▀████████████████▀
BUY  BACK
PLANS
[BTC]
bitcreditscc (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 501



View Profile
January 01, 2015, 09:39:43 PM
 #16

What does my signature have to do with scamcoins? Unless you need a way to launder your ico funds when you run, in which case I highly recommend you look into such a service.

And a quick browse of your post history says you are an angry lil fella. No thanks, i wont indulge trolls.

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!