Bitcoin Forum
May 09, 2024, 10:14:04 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JSON-RPC mass-pay  (Read 1103 times)
Gavin Andresen (OP)
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
March 02, 2011, 12:21:17 AM
 #1

Add a mass-pay JSON-RPC method, provided that the user interface requires a TX fee parameter (NOTE: zero is a valid TX fee)

I've got a (private so far) patch that creates mass-pay transactions.  API is:
  sendmulti <fromaccount> {address:amount,...} [minconf=1] [comment]

This code in CTransaction::AcceptToMemoryPool will need to change, too:
Code:
      if (GetSigOpCount() > 2 || nSize < 100)
        return error("AcceptToMemoryPool() : nonstandard transaction");
(a mass-pay transaction will have N+1 OP_CHECKSIGs in it, where N is the number of people being paid).

Replacing in the stock client with something like:
Code:
  if (GetSigOpCount() > 2) minFee += GetSigOpCount()*GetArgMoney("-masspayfee", CENT/100);
... seems like the right direction to go.

BUT: I think a higher priority is figuring out how to deal with fees for the other two send methods.

How often do you get the chance to work on a potentially world-changing project?
1715292844
Hero Member
*
Offline Offline

Posts: 1715292844

View Profile Personal Message (Offline)

Ignore
1715292844
Reply with quote  #2

1715292844
Report to moderator
1715292844
Hero Member
*
Offline Offline

Posts: 1715292844

View Profile Personal Message (Offline)

Ignore
1715292844
Reply with quote  #2

1715292844
Report to moderator
1715292844
Hero Member
*
Offline Offline

Posts: 1715292844

View Profile Personal Message (Offline)

Ignore
1715292844
Reply with quote  #2

1715292844
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715292844
Hero Member
*
Offline Offline

Posts: 1715292844

View Profile Personal Message (Offline)

Ignore
1715292844
Reply with quote  #2

1715292844
Report to moderator
1715292844
Hero Member
*
Offline Offline

Posts: 1715292844

View Profile Personal Message (Offline)

Ignore
1715292844
Reply with quote  #2

1715292844
Report to moderator
1715292844
Hero Member
*
Offline Offline

Posts: 1715292844

View Profile Personal Message (Offline)

Ignore
1715292844
Reply with quote  #2

1715292844
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12982


View Profile
March 02, 2011, 05:04:37 AM
 #2

That seems fair for a default fee rule, though nodes should ignore all fees when relaying.

When I complained about the introduction of that particular code on the forum, Satoshi asked me to stop talking about it due to a DoS risk. He seemed to think the risk was pretty serious. This makes me think there might be some hidden DoS vulnerability we don't know about. This was when clients were still waiting for a block number to change the rule, though, so it might have been just the transitioning that caused the vulnerability.

Quote from: satoshi
The thing you highlighted is a patch for a DoS
weakness.  I don't want to post an instruction manual for how to use the
weakness to DoS the previous versions.

I think most P2P networks, and websites for that matter, are vulnerable
to an endless number of DoS attacks.  The best we can realistically do
is limit the worst cases.

(I'm absolutely in favor of the feature -- I just want to mention Satoshi's view.)

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1091


View Profile
March 02, 2011, 05:42:25 AM
 #3

[...] though nodes should ignore all fees when relaying.

Such a policy increases the ability of third parties to force the entire network to relay garbage.


Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
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!