Handle transaction size limit properly
One can try to send more than 100 outputs through Silkaj. For now, no warning is displayed before generating the tx document through duniterpy's Transaction() class.
We should :
- either find a max number of outputs for which we are sure that we don't reach the max size of transaction doc
- or find an algorithm to check if the max size is reached, combining input and outputs number
btw, I don't find the max size of a transaction document in the RFC.
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- matograine changed milestone to %0.8.0
changed milestone to %0.8.0
- matograine added D: Transfer label
added D: Transfer label
- Moul changed the description
changed the description
Good question!
There is a limit on the number of sources inputs set to 40.
But I am not aware of a limit on the number of outputs. This question is raised since Silkaj and Remuniter are sending transactions with a lot of outputs.
There is a global limit on the entire size of the transaction which can growth based on previous tx one which entered the blockchain.
You should ask on the forum.
This ticket looks like a research for something not short term. I propose to move it to the next milestone. Do you have a reason to do it for this milestone?
I mean, I can’t prevent you working on something. From my side, I am thinking about doing a %0.8.0 release asap. Which will take at least one more month.
Edited by Moul- Author Maintainer
I thought 0.8 would be further in the future. There is no problem on doing this for 0.9.
- matograine changed title from Limit transaction file size to Limit transaction document size
changed title from Limit transaction file size to Limit transaction document size
- matograine changed the description
changed the description
- Author Maintainer
tx doc in compact format is limited to 100 lines :
- 3 constant lines
TX:VERSION:NB_ISSUERS:NB_INPUTS:NB_UNLOCKS:NB_OUTPUTS:HAS_COMMENT:LOCKTIME
BLOCKSTAMP
COMMENT- 2 fields linked to the SIG number
PUBLIC_KEY
SIGNATURE- 2 fields linked to inputs number
INPUT
UNLOCK- 1 fiels Outputs
OUTPUT
To optimize the size of transactions, we have to use the formula :
nbr_Input <= (100 - 3 - (2*nbr_SIG) - nbr_Outputs)/2
for a usual tx with 2 outputs and 1 issuer, max_inputs = 93/2 = 46
With the new feature "multiple amounts", we could create bugs when sending transaction with numerous outputs if we don't deal with this issue. But I think it is not a big deal.
for now with SOURCES_PER_TX = 40, we can send up to 14 outputs without any risk the tx might be refused.
Edited by matograine - matograine changed milestone to %0.8.0
changed milestone to %0.8.0
- Moul assigned to @matograine
assigned to @matograine
- Moul changed the description
changed the description
- matograine mentioned in commit e96171f0
mentioned in commit e96171f0
- matograine mentioned in commit e777d566
mentioned in commit e777d566
- matograine mentioned in commit 9163f6d8
mentioned in commit 9163f6d8
- matograine mentioned in commit d346b9b1
mentioned in commit d346b9b1
- matograine mentioned in commit 348abfb2
mentioned in commit 348abfb2
- matograine mentioned in commit 52621c59
mentioned in commit 52621c59
- matograine mentioned in commit 14765972
mentioned in commit 14765972
- matograine mentioned in commit b02a7776
mentioned in commit b02a7776
- matograine mentioned in commit 71eb45cf
mentioned in commit 71eb45cf
- Moul mentioned in merge request !129 (merged)
mentioned in merge request !129 (merged)
- Moul added enhancement label
added enhancement label
- matograine mentioned in commit 6dc5e7ef
mentioned in commit 6dc5e7ef
- matograine mentioned in commit 45024390
mentioned in commit 45024390
- matograine mentioned in commit e981bdb4
mentioned in commit e981bdb4
- matograine mentioned in commit df5d6bd3
mentioned in commit df5d6bd3
FYI, the transaction document for March 2020, which is 74 lines:
Version: 10 Type: Transaction Currency: g1 Blockstamp: 303388-000002FC14BECB8330B64E115E4728A1CBDBC93A6E097A2AB0722E35635513A8 Locktime: 0 Issuers: 78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8 Inputs: 20000:0:T:035FAFD6F8B2053377EBD84260734CD0AC649FC8C052F75E3C27C6CF633E5059:0 3000:0:T:0C7E4A070B8487D3D65B1AF2D6D31F821B2A6142EA2C2DD57B96998575A6CB94:0 23514:0:T:0E86982BE9501B8BBB769D7477618FF3E420E4B8349D383B76837A78F402AD90:19 200000:0:T:0F804A64EE3B7A249FCAF045D9921D78C5D53CDCA2304B02ED939172074F119B:0 1011:0:T:16195887B67665A1020FD7CFCB4B7F20520EC131B6165AC0C5E51517969B7DEF:0 3033:0:T:1C62DB0DAAD042487DB4316AABF7F3F32747525E4FE0F2DC1D51CDF310329F88:0 10000:0:T:22A8ABF26E7FA4CE9E07A4331DDE6C0C17EA3C5B838771C348C1AF5BB3BDB2AA:0 2022:0:T:31B457AFCF2FB7551FD11C1E7BD1DBAF92A29A5664F8E29C6CC6AD8432B23694:0 10000:0:T:3A9CFD8394B6D6089C502F960B564AF7C9E5C6EEBA9D28CEF40138502E6668FB:0 50550:0:T:550587C5C1B9B30F3A893800D754F60FFC66E7C6F5680DD5F1CB23CEAB7B9F42:0 3033:0:T:6269ECF1E7F05342FC059EA1A229573AF7688E1BC8D1BC0FBEE0B00D093A1EB8:0 10000:0:T:6D5B2DDC1EA53F7AC8040CA4BCAF85EBFC4E33BE9AD66BAC818B1588AB2AB899:0 13023:0:T:731F6B19ED4A6F3AD2FF3F2F0EA5AA1548AE0B55FF3AF426E65D65493A647D5C:1 2022:0:T:73702BADD224F0DA403ED718BCA22D92B1A664B4F099C092170B6C6FB92F84B6:1 1500:0:T:73D3B4F038E5FDCC4A11FBFF5E8F819FE08862101363EAED7A3208EF77BB6A46:0 15000:0:T:7B8264E8E2B790AB6E49EE89E63C01F5617C1C1466F198F119FF72358C1E1224:0 1200:0:T:7BC710501C3E9359FAC731A28E412FC397E65638734F8EB9DB791A8140273D94:1 29600:0:T:7BD382CFF299FDBDAAA237535BBF6A09D9DD01228CB3AFEC2865EA0E910479D4:0 97293:0:T:7E5EEA116C191D3B3EC9786A1E1C8AF4F099EB783CC20CF4568FEBD7CB1CF4B9:22 Unlocks: 0:SIG(0) 1:SIG(0) 2:SIG(0) 3:SIG(0) 4:SIG(0) 5:SIG(0) 6:SIG(0) 7:SIG(0) 8:SIG(0) 9:SIG(0) 10:SIG(0) 11:SIG(0) 12:SIG(0) 13:SIG(0) 14:SIG(0) 15:SIG(0) 16:SIG(0) 17:SIG(0) 18:SIG(0) Outputs: 15165:0:SIG(2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ) 15165:0:SIG(9UuWHs3ZDvV4EiViDGf2zJKNUa8V2ot7hH2zPD1C1sj1) 45495:0:SIG(D9D2zaJoWYWveii1JRYLVK3J4Z7ZH3QczoKrnQeiM6mx) 15165:0:SIG(D3krfq6J9AmfpKnS3gQVYoy7NzGCc61vokteTS8LJ4YH) 15165:0:SIG(55oM6F9ZE2MGi642GGjhCzHhdDdWwU6KchTjPzW7g3bp) 15165:0:SIG(3bLirJXUmNFxNHRRJprnf87VJVJsQembmpYCc1TGvVVi) 15165:0:SIG(77UVGVmbBLyh5gM51X8tbMtQSvnMwps2toB67qHn32aC) 15165:0:SIG(38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE) 15165:0:SIG(47JpfrGkoHJWtumeu7f67fbAxkvaHYVQBNo5GszNs61Z) 15165:0:SIG(4wUdA1dx1NCZUNSUPhTd9oJHv9gEiuFDgkFscGWKi8t1) 35385:0:SIG(GfKERHnJTYzKhKUma5h1uWhetbA8yHKymhVH2raf2aCP) 25275:0:SIG(CmFKubyqbmJWbhyH2eEPVSSs4H4NeXGDfrETzEnRFtPd) 15165:0:SIG(BDv28pi7c1GCbfZqcdEdXuMwubTjswepR1mAZW7YS9vt) 15165:0:SIG(DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech) 30330:0:SIG(7F6oyFQywURCACWZZGtG97Girh9EL1kg2WBwftEZxDoJ) 15165:0:SIG(JE6mkuzSpT3ePciCPRTpuMT9fqPUVVLJz2618d33p7tn) 15165:0:SIG(2JggyyUn2puL5PG6jsMYFC2y9KwjjMmy2adnx3c5fUf8) 15165:0:SIG(45GfjkWCWQhJ3epJVGC2NSg1Rcu4Ue1vDD3kk9eLs5TQ) 15165:0:SIG(2sZF6j2PkxBDNAqUde7Dgo5x3crkerZpQ4rBqqJGn8QT) 15165:0:SIG(CRBxCJrTA6tmHsgt9cQh9SHcCc8w8q95YTp38CPHx2Uk) 15165:0:SIG(4FgeWzpWDQ2Vp38wJa2PfShLLKXyFGRLwAHA44koEhQj) 15165:0:SIG(77UVGVmbBLyh5gM51X8tbMtQSvnMwps2toB67qHn32aC) 15165:0:SIG(5cnvo5bmR8QbtyNVnkDXWq6n5My6oNLd1o6auJApGCsv) 15165:0:SIG(Do99s6wQR2JLfhirPdpAERSjNbmjjECzGxHNJMiNKT3P) 56016:0:SIG(78ZwwgpgdH5uLZLbThUQH7LKwPgjMunYfLiCfUCySkM8) Comment:
- matograine mentioned in issue #327 (closed)
mentioned in issue #327 (closed)
- matograine mentioned in commit bf49e4bc
mentioned in commit bf49e4bc
- matograine mentioned in merge request !135 (closed)
mentioned in merge request !135 (closed)
- matograine mentioned in issue #356 (closed)
mentioned in issue #356 (closed)
- matograine mentioned in commit c1b1c89f
mentioned in commit c1b1c89f
- matograine mentioned in commit 3df4cd3f
mentioned in commit 3df4cd3f
- matograine mentioned in commit 3afc446f
mentioned in commit 3afc446f
- matograine mentioned in commit 5cc6df84
mentioned in commit 5cc6df84
- matograine mentioned in commit ad9e7603
mentioned in commit ad9e7603
- matograine mentioned in commit 718659b0
mentioned in commit 718659b0
- matograine mentioned in commit 17359a83
mentioned in commit 17359a83
- matograine mentioned in commit 4cebff36
mentioned in commit 4cebff36
- matograine mentioned in commit e19c777a
mentioned in commit e19c777a
- matograine mentioned in commit 8f4fdc79
mentioned in commit 8f4fdc79
- matograine mentioned in commit 6b17febd
mentioned in commit 6b17febd
- matograine mentioned in commit faf78c30
mentioned in commit faf78c30
- matograine mentioned in commit 458dfc0f
mentioned in commit 458dfc0f
- matograine mentioned in commit aeddf42e
mentioned in commit aeddf42e
- matograine mentioned in commit 83f2a0c8
mentioned in commit 83f2a0c8
- matograine mentioned in commit 8b19881a
mentioned in commit 8b19881a
- matograine mentioned in commit 89b73acc
mentioned in commit 89b73acc