Bitcoin Forum
May 05, 2024, 05:59:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Node add transactions to pool policy , basic transaction validation rules  (Read 1937 times)
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 17, 2015, 12:18:54 PM
Last edit: September 18, 2015, 05:40:37 PM by bitaps
 #1

I am trying to collect all infromation about adding and verification transaction into Blockchain.


Could any experts in this question verify that collected information is actual and correct? Thank you

Node add transaction to pool policy


Blockchain transaction validation rules



Fixed  both schemas, thank  to yakuza699 and amaclin for help and explanations!

1714888766
Hero Member
*
Offline Offline

Posts: 1714888766

View Profile Personal Message (Offline)

Ignore
1714888766
Reply with quote  #2

1714888766
Report to moderator
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714888766
Hero Member
*
Offline Offline

Posts: 1714888766

View Profile Personal Message (Offline)

Ignore
1714888766
Reply with quote  #2

1714888766
Report to moderator
1714888766
Hero Member
*
Offline Offline

Posts: 1714888766

View Profile Personal Message (Offline)

Ignore
1714888766
Reply with quote  #2

1714888766
Report to moderator
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
September 17, 2015, 12:38:16 PM
 #2

Not correct.
For example, you (and anyone) have a right to accept 1-megabyte transactions into a mempool and in block
For more information:
https://en.bitcoin.it/wiki/Protocol_rules
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 17, 2015, 12:45:54 PM
Last edit: September 17, 2015, 12:57:14 PM by bitaps
 #3

source -> https://bitcoin.org/en/developer-guide#non-standard-transactions  

As of Bitcoin Core 0.9.3, standard transactions must also meet the following conditions:
    The transaction must be finalized: either its locktime must be in the past (or less than or equal to the current block height), or all of its sequence numbers must be 0xffffffff.
    The transaction must be smaller than 100,000 bytes. That’s around 200 times larger than a typical single-input, single-output P2PKH transaction.
    Each of the transaction’s signature scripts must be smaller than 1,650 bytes. That’s large enough to allow 15-of-15 multisig transactions in P2SH using compressed public keys.
    Bare (non-P2SH) multisig transactions which require more than 3 public keys are currently non-standard.
    The transaction’s signature script must only push data to the script evaluation stack. It cannot push new OP codes, with the exception of OP codes which solely push data to the stack.
    The transaction must not include any outputs which receive fewer than 1/3 as many satoshis as it would take to spend it in a typical input. That’s currently 546 satoshis for a P2PKH or P2SH output on a Bitcoin Core node with the default relay fee. Exception: standard null data outputs must receive zero satoshis.

So standard transactions have limit 100,000 bytes
For transaction that we add inside blocks no check for isStandard so limit Size in bytes < MAX_BLOCK_SIZE ( 1 megabyte).
1 MB tx is not possible

Maximum possible Nonstandart Transaction size is MAX_BLOCK_SIZE - block header info (80 bytes) and this transaction should be coinbase !


Not all information on bitkoin wiki is actual ! This is a reason why we try collect actual rules in one place and then post on bitcoin wiki

yakuza699
Hero Member
*****
Offline Offline

Activity: 935
Merit: 1002


View Profile
September 17, 2015, 12:54:44 PM
 #4

1MB transaction is VALID but non-standard under 0.9.3 but no one in the world disallows you to change these rules and make your node relay 1MB transactions.For example this is my transaction https://live.blockcypher.com/btc/tx/657b57238c7e442227f30c40e6f7a621eaed66087cace0ff66394c28bcf4162c/ which size is 219KB.

▄▄▄▄▄▄▄▄
▄▄▄▄▄▄
▄▄▄▄
BTC BitDice.me 
.
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 17, 2015, 12:57:57 PM
 #5

1 MB tx is not possible!

Maximum possible Non-standart Transaction size is MAX_BLOCK_SIZE (1 MB) - block header info (80 bytes) and this transaction should be coinbase !

And this constraints is correctly described in attached pictures

yakuza699
Hero Member
*****
Offline Offline

Activity: 935
Merit: 1002


View Profile
September 17, 2015, 01:01:13 PM
 #6

1 MB tx is not possible!

Maximum possible Non-standart Transaction size is MAX_BLOCK_SIZE (1 MB) - block header info (80 bytes) and this transaction should be coinbase !

And this constraints is correctly described in attached pictures
You're right but 1MB tx will be possible in the next forks.

▄▄▄▄▄▄▄▄
▄▄▄▄▄▄
▄▄▄▄
BTC BitDice.me 
.
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 17, 2015, 01:05:00 PM
 #7

Yes and we use variable  MAX_BLOCK_SIZE, this variable at this moment = 1 MB

amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
September 17, 2015, 01:24:04 PM
 #8

1 MB tx is not possible!
OK, you are right.
999000 bytes is quite good transaction and I will be happy to put it into mempool and confirm into a block
(Oups! I am not a miner and even do not have node.)

Quote
So standard transactions have limit 100,000 bytes
Have you said that you want a rules only for standard transactions and bitcoin core client without any patches?
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 17, 2015, 04:30:00 PM
 #9

We want rules  for  bitcoin protocol.  Many documents that we can see on bitcoin wiki website, is not actual for recent protocol changes. Other source of information is Bitcoin core github repository, but same rules not described in separate documents like BIPs, and information only available inside  C++ bitcoin core source files. So we collected all available information in this sources and want verify with community that our implementation of this part of bitcoin prorocol rules is correct.

amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
September 17, 2015, 04:42:39 PM
 #10

You should understand the difference between bitcoin protocol and node policy.
Transaction with the size 999000 bytes is valid transaction.
But most of nodes do not relay/accept it.
Nodes can implement their own policy.
For example Eligius pool does not accept transactions to 1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T
My node can reject transactions with the size 18347-19456 bytes. Why not?

Quote
Many documents that we can see on bitcoin wiki website, is not actual for recent protocol changes
No. There are only a couple of changes in consensus code from the very beginning
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 17, 2015, 07:37:03 PM
 #11

Standard type of transactions is the Node policy or protocol rules?

amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
September 17, 2015, 08:00:50 PM
 #12

Standard type of transactions is the Node policy or protocol rules?
node policy of course
yakuza699
Hero Member
*****
Offline Offline

Activity: 935
Merit: 1002


View Profile
September 17, 2015, 08:05:26 PM
 #13

Standard type of transactions is the Node policy or protocol rules?
What do you mean by standard type?All standard and non-standard tx's as long as they are valid can be included in a block.Protocol rules state which kind of tx's can be included in a block node policy rules state which tx's will be relayed.Node policy rules can only be tighter and not looser.For example under current protocol rules(and tx rules) tx over 1MB is invalid thus block that included this transaction is also invalid.A transaction of over 100KB is not relayed under current node policy but it is perfectly valid and good under protocol rules and it can be included in block.

▄▄▄▄▄▄▄▄
▄▄▄▄▄▄
▄▄▄▄
BTC BitDice.me 
.
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 17, 2015, 08:19:45 PM
 #14

Mempool of unconfirmed transations is this relate to Node policy? Unconfirmed transactions is part of Bitcoin protocol?

bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 18, 2015, 03:19:25 PM
 #15

Fixed both schemas


Node add transaction to pool policy


Blockchain transaction validation rules



amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
September 18, 2015, 03:57:51 PM
 #16

Quote
Output coins pubkey script must be one of next types: p2pkh, p2sh, pubkey (no more accepted), multisig, null-data
What? Grin
Are you kidding us?
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 18, 2015, 04:28:53 PM
 #17

Quote
Pubkey outputs are a simplified form of the P2PKH pubkey script, but they aren’t as secure as P2PKH, so they generally aren’t used in new transactions anymore.

source ->  https://bitcoin.org/en/developer-guide#standard-transactions


Whats wrong?


amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
September 18, 2015, 04:38:17 PM
 #18

Quote
Pubkey outputs are a simplified form of the P2PKH pubkey script, but they aren’t as secure as P2PKH, so they generally aren’t used in new transactions anymore.
source ->  https://bitcoin.org/en/developer-guide#standard-transactions
Whats wrong?
1) aren't used != no more accepted
2) they are used. do not trust bitcoin.org.
there are more than 40 mln such transactions proof: http://webbtc.com/scripts/pubkey
and several thousands of them were sent last week Smiley
bitaps (OP)
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
September 18, 2015, 04:56:08 PM
Last edit: September 18, 2015, 06:05:15 PM by bitaps
 #19

fixed  Pubkey type  ->

Added coinbase sig script length constraints   ->  

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!