CityOfZion / neo-local

Personal blockchain for NEO dApp development!
MIT License
52 stars 26 forks source link

Missing SimplePolicy plugin from neo-cli Docker images #99

Closed nunojusto closed 5 years ago

nunojusto commented 5 years ago

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