We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two ordering methods in Waves,
in waves v0.7.9 (Aug 14, 2017), they use sort 1 first and choose 100 valid txs, then use sort 2 to package the utxs.
start from waves v0.8.0 ( Oct 13, 2017), an extra parameter (sortInBlock) added to control the sort 2. if sortInBlock then return utxs with sort 2 else return utxs.reverse (tx +: valid is used to generate the utxs, so reverse is needed) https://github.com/wavesplatform/Waves/blob/00c59dd68ef19d8dcfc252909295f43c86ae4d50/src/main/scala/com/wavesplatform/UtxPool.scala#L124
the sortInBlock is defined as follows: sortInBlock = history.height() <= blockchainSettings.functionalitySettings.dontRequireSortedTransactionsAfter https://github.com/wavesplatform/Waves/blob/00c59dd68ef19d8dcfc252909295f43c86ae4d50/src/main/scala/com/wavesplatform/mining/Miner.scala#L104 dontRequireSortedTransactionsAfter: Long = blockVersion3After https://github.com/wavesplatform/Waves/blob/00c59dd68ef19d8dcfc252909295f43c86ae4d50/src/main/scala/com/wavesplatform/settings/BlockchainSettings.scala#L29 in waves v0.8.7 (Dec 7, 2017), this value fixed blockVersion3AfterHeight = 795000 https://github.com/wavesplatform/Waves/blob/de7f53841e6589354062f458e5d3ecdd72c8e902/src/main/scala/com/wavesplatform/settings/BlockchainSettings.scala#L50 before that blockVersion3AfterHeight = Long.MaxValue
from the blockVersion3, all new blocks will not use the sort 2, which means that the order of txs fixed.
a fixed transaction order can handle the blocks with reliant txs (ex. contend/release txs or smart contract txs)
The text was updated successfully, but these errors were encountered:
thanks for documenting this!
Sorry, something went wrong.
reset the order by (feeScale, fee, timestamp, txType)
sunnyking
DaraSnow
ning2056
ncying
No branches or pull requests
Two ordering methods in Waves,
https://github.com/wavesplatform/Waves/blob/v0.7.9/src/main/scala/scorex/consensus/TransactionsOrdering.scala
in waves v0.7.9 (Aug 14, 2017), they use sort 1 first and choose 100 valid txs, then use sort 2 to package the utxs.
start from waves v0.8.0 ( Oct 13, 2017), an extra parameter (sortInBlock) added to control the sort 2.
if sortInBlock then return utxs with sort 2
else return utxs.reverse (tx +: valid is used to generate the utxs, so reverse is needed)
https://github.com/wavesplatform/Waves/blob/00c59dd68ef19d8dcfc252909295f43c86ae4d50/src/main/scala/com/wavesplatform/UtxPool.scala#L124
the sortInBlock is defined as follows:
sortInBlock = history.height() <= blockchainSettings.functionalitySettings.dontRequireSortedTransactionsAfter
https://github.com/wavesplatform/Waves/blob/00c59dd68ef19d8dcfc252909295f43c86ae4d50/src/main/scala/com/wavesplatform/mining/Miner.scala#L104
dontRequireSortedTransactionsAfter: Long = blockVersion3After
https://github.com/wavesplatform/Waves/blob/00c59dd68ef19d8dcfc252909295f43c86ae4d50/src/main/scala/com/wavesplatform/settings/BlockchainSettings.scala#L29
in waves v0.8.7 (Dec 7, 2017), this value fixed
blockVersion3AfterHeight = 795000
https://github.com/wavesplatform/Waves/blob/de7f53841e6589354062f458e5d3ecdd72c8e902/src/main/scala/com/wavesplatform/settings/BlockchainSettings.scala#L50
before that
blockVersion3AfterHeight = Long.MaxValue
from the blockVersion3, all new blocks will not use the sort 2, which means that the order of txs fixed.
a fixed transaction order can handle the blocks with reliant txs (ex. contend/release txs or smart contract txs)
The text was updated successfully, but these errors were encountered: