-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
BacklogBacklog issues and PRsBacklog issues and PRsDiscussionInitial issue state - proposed but not yet acceptedInitial issue state - proposed but not yet accepted
Description
Developing the rpc storage in test engine (neo-project/neo-devpack-dotnet#904) I have realized how "expensive" it is to calculate the gas per block.
Currently, we store a history of gas changes, which is necessary for calculating the reward of accounts when they call claim, but it is not necessary for the OnPersist of the block. However, we iterate backwards to calculate it in the same way during the block's persist, something completely unnecessary.
It can be optimized by avoiding iterating over the storage, we have 2 options.
- Do it with the fork introduced at Allow Native Contracts to be updated #2942
- Modify the current
Prefix_GasPerBlock, I think it has never been done in any of the networks and can only be done by consensus
Opinions?
Metadata
Metadata
Assignees
Labels
BacklogBacklog issues and PRsBacklog issues and PRsDiscussionInitial issue state - proposed but not yet acceptedInitial issue state - proposed but not yet accepted