sugarchain-project / sugarchain

Sugarchain: one-CPU-one-vote, the world's fastest PoW blockchain
https://bitcointalk.org/index.php?topic=5177722.0
MIT License
129 stars 63 forks source link

Transaction too large #28

Open cryptozeny opened 4 years ago

cryptozeny commented 4 years ago
    // Extremely large transactions with lots of inputs can cost the network
    // almost as much to process as they cost the sender in fees, because
    // computing signature hashes is O(ninputs*txsize). Limiting transactions
    // to MAX_STANDARD_TX_WEIGHT mitigates CPU exhaustion attacks.

https://github.com/bitcoin/bitcoin/issues/6522

https://github.com/sugarchain-project/sugarchain/blob/master-v0.16.3/src/policy/policy.cpp#L89-L97

https://github.com/sugarchain-project/sugarchain/blob/master-v0.16.3/src/wallet/wallet.cpp#L2991-L2996

src/policy/policy.h:static const unsigned int MAX_STANDARD_TX_WEIGHT = 400000;

its common issue on BTC based blockchain. it will fixed in Schnorr Signature update.

cryptozeny commented 4 years ago

Reference

in case SV https://github.com/bitcoin-sv/bitcoin-sv/blob/master/src/policy/policy.cpp#L62-L70

https://github.com/bitcoin-sv/bitcoin-sv/commit/b569a7134199f898098b736341ef8bb4cceb6d11#diff-e88cad3b27bf83e522e164d82186712dL25-R24

https://github.com/bitcoin-sv/bitcoin-sv/commit/b569a7134199f898098b736341ef8bb4cceb6d11#diff-cbe22f30d7e480617350ef6ceca97d0cL18-R14

reason https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#sigops

cryptozeny commented 4 years ago

Workaround image

rakutens: Transaction too large is not very serious in sugar, because transfer records can be selected from wallet

cryptozeny commented 4 years ago

https://github.com/bitcoin/bitcoin/issues/1643

https://github.com/bitcoin/bitcoin/issues/5782

decryp2kanon commented 4 years ago

https://github.com/cryptozeny/sugarchain-v0.16.3/issues/47