Closed nunojusto closed 5 years ago
neo-cli images from neo-local-privnet don't have the plugin SimplePolicy. This will render wrong consensus mechanism.
This was reported by @belane __ First, new transactions are filtered on arrive to the memory pool, here https://github.com/neo-project/neo/blob/master/neo/Ledger/Blockchain.cs#L364
Then when the primary CN make a proposal for a new block, https://github.com/neo-project/neo/blob/master/neo/Consensus/ConsensusService.cs#L107 uses the policy to order the transactions.
And in AddTransaction is used to filter tx https://github.com/neo-project/neo/blob/master/neo/Consensus/ConsensusService.cs#L39
All this logic is in the plugin https://github.com/neo-project/neo-plugins/blob/master/SimplePolicy/SimplePolicyPlugin.cs
If you don't use the SimplePolicy, of course you can generate blocks, but you are not following the policy, I mean blocks of 500 tx, only 20 free tx per block, tx prioritized by fee, __
Docker images 2.8 and above
Summary
neo-cli images from neo-local-privnet don't have the plugin SimplePolicy. This will render wrong consensus mechanism.
To Reproduce
This was reported by @belane __ First, new transactions are filtered on arrive to the memory pool, here https://github.com/neo-project/neo/blob/master/neo/Ledger/Blockchain.cs#L364
Then when the primary CN make a proposal for a new block, https://github.com/neo-project/neo/blob/master/neo/Consensus/ConsensusService.cs#L107 uses the policy to order the transactions.
And in AddTransaction is used to filter tx https://github.com/neo-project/neo/blob/master/neo/Consensus/ConsensusService.cs#L39
All this logic is in the plugin https://github.com/neo-project/neo-plugins/blob/master/SimplePolicy/SimplePolicyPlugin.cs
If you don't use the SimplePolicy, of course you can generate blocks, but you are not following the policy, I mean blocks of 500 tx, only 20 free tx per block, tx prioritized by fee, __
Which version...
Docker images 2.8 and above