neo-project / neo

NEO Smart Economy
MIT License
3.47k stars 1.03k forks source link

Extend `getversion` RPC response with additional protocol settings #3401

Open AnnaShaleva opened 1 week ago

AnnaShaleva commented 1 week ago

Summary or problem description

Some dApp developers face the necessity to restore blockchain using settings from protocol section of getversion RPC response without additional knowledge about node configuration. I discovered that this section doesn't contain the following protocol settings:

Without StandByCommittee it's impossible to restore blockchain. Without MaxBlockSystemFee and MaxBlockSize it's impossible to properly verify blocks and/or transactions. Without SeedList it's impossible to sync the network.

I see that there's a need for these settings to be included into getversion response, it would be beneficial for Dora Explorer back-end development.

Do you have any solution you want to propose? Extend protocol section of getversion RPC response with these protocol parameters. MaxBlockSize, MaxBlockSystemFee and StandbyCommittee are a must-have from my PoW, whereas SeedList is a matter of discussion.

It's easy to implement, but I'd like to collect some more opinions on this topic before the modification. If we agree, then I'll implement it.

Where in the software does this update applies to?

shargon commented 1 week ago

Some of these values comes from DBFTPlugin, so this will produce a dependency between both plugins

AnnaShaleva commented 1 week ago

Some of these values comes from DBFTPlugin

I forgot about it, NeoGo has everything in a single configuration. Can we live with this dependency? Or another solution may be to move MaxBlockSize and MaxBlockSystemFee settings to the core settings.

dusmart commented 6 days ago

If it's from DBFTPlugin's configuration, it means that they won't be essential for validating the block by normal nodes. Which also means that MaxBlockSize and MaxBlockSystemFee are actually not the hard standard for validating the blocks. The CNs can change them at any time at their wills.

Therefore, I'm not sure if it's a good idea to expose those settings to others.

vncoelho commented 6 days ago

I am in favor of living without the dependency for now.

roman-khimov commented 9 hours ago

MaxBlockSize and MaxBlockSystemFee can be omitted, but committee/seeds are easy to add and they really open up some additional possibilities.