Skip to content
New issue

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

Limit block production time #1507

Closed
3 tasks done
evgenykuzyakov opened this issue Oct 21, 2019 · 3 comments
Closed
3 tasks done

Limit block production time #1507

evgenykuzyakov opened this issue Oct 21, 2019 · 3 comments
Assignees
Labels
A-security Area: Security issues

Comments

@evgenykuzyakov
Copy link
Collaborator

evgenykuzyakov commented Oct 21, 2019

Currently there is no limit for the number of incoming transactions from the mempool and we also process all incoming receipts in the Runtime. We should limit both.

  • Limit the number of new signed transactions included in the chunk using max total send fee.
  • Limit the number of receipts processed in Runtime::apply() using max total burnt fee.

The remaining unprocessed receipts should either be returned from the Runtime as outgoing or stored locally in the state as postponed with the list of postponed receipts.

  • Store postponed receipts instead of returning them
@evgenykuzyakov evgenykuzyakov added performance A-security Area: Security issues labels Oct 21, 2019
@evgenykuzyakov evgenykuzyakov self-assigned this Oct 21, 2019
@MaksymZavershynskyi
Copy link
Contributor

Relevant: near/NEPs#20

@MaksymZavershynskyi
Copy link
Contributor

Limit the number of new signed transactions included in the chunk using max total send fee.

It would be good to rename "send" fee to "dispatch" or "ship" fee to reflect that this fee is not only about sending an object over the network, but also a fee for including it in the block.

evgenykuzyakov pushed a commit that referenced this issue Nov 18, 2019
- Filter transactions using by draining the pool using pool iterator.
- The order is defined by https://nomicon.io/BlockchainLayer/Transactions.html

Fixes #1579
Ref #1507
@evgenykuzyakov
Copy link
Collaborator Author

Follow ups #1700 #1702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-security Area: Security issues
Projects
None yet
Development

No branches or pull requests

2 participants