bitaps (OP)
Member
Offline
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 17, 2015, 12:18:54 PM Last edit: September 18, 2015, 05:40:37 PM by bitaps |
|
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!
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
September 17, 2015, 12:38:16 PM |
|
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
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 17, 2015, 12:45:54 PM Last edit: September 17, 2015, 12:57:14 PM by bitaps |
|
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
|
|
|
|
|
bitaps (OP)
Member
Offline
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 17, 2015, 12:57:57 PM |
|
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
|
|
September 17, 2015, 01:01:13 PM |
|
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.
|
|
|
|
bitaps (OP)
Member
Offline
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 17, 2015, 01:05:00 PM |
|
Yes and we use variable MAX_BLOCK_SIZE, this variable at this moment = 1 MB
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
September 17, 2015, 01:24:04 PM |
|
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.) 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
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 17, 2015, 04:30:00 PM |
|
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
Activity: 1260
Merit: 1019
|
|
September 17, 2015, 04:42:39 PM |
|
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? 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
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 17, 2015, 07:37:03 PM |
|
Standard type of transactions is the Node policy or protocol rules?
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
September 17, 2015, 08:00:50 PM |
|
Standard type of transactions is the Node policy or protocol rules?
node policy of course
|
|
|
|
yakuza699
|
|
September 17, 2015, 08:05:26 PM |
|
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.
|
|
|
|
bitaps (OP)
Member
Offline
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 17, 2015, 08:19:45 PM |
|
Mempool of unconfirmed transations is this relate to Node policy? Unconfirmed transactions is part of Bitcoin protocol?
|
|
|
|
bitaps (OP)
Member
Offline
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 18, 2015, 03:19:25 PM |
|
Fixed both schemas Node add transaction to pool policy Blockchain transaction validation rules
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
September 18, 2015, 03:57:51 PM |
|
Output coins pubkey script must be one of next types: p2pkh, p2sh, pubkey (no more accepted), multisig, null-data What? Are you kidding us?
|
|
|
|
bitaps (OP)
Member
Offline
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 18, 2015, 04:28:53 PM |
|
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-transactionsWhats wrong?
|
|
|
|
amaclin
Legendary
Offline
Activity: 1260
Merit: 1019
|
|
September 18, 2015, 04:38:17 PM |
|
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/pubkeyand several thousands of them were sent last week
|
|
|
|
bitaps (OP)
Member
Offline
Activity: 148
Merit: 45
https://bitaps.com/
|
|
September 18, 2015, 04:56:08 PM Last edit: September 18, 2015, 06:05:15 PM by bitaps |
|
fixed Pubkey type -> Added coinbase sig script length constraints ->
|
|
|
|
|