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

Automated Action Delay Due to Block Size #2721

Closed
3 tasks done
youkaicountry opened this issue Aug 6, 2018 · 3 comments
Closed
3 tasks done

Automated Action Delay Due to Block Size #2721

youkaicountry opened this issue Aug 6, 2018 · 3 comments

Comments

@youkaicountry
Copy link
Contributor

youkaicountry commented Aug 6, 2018

If an automated action would overrun the block size, it should be delayed.

AC:

  • Action delay during block generation
  • Action delay during block validation
  • Cleanup of delayed optional actions
@mvandeberg
Copy link
Contributor

Action delay in block generation is already implemented. Action delay in block validation is still needed.

@mvandeberg
Copy link
Contributor

Cleaning up optional actions is needed and will be implemented in this issue.

@mvandeberg
Copy link
Contributor

Cleaning up expiration was already implemented and updated in #2718

// Clear out "expired" optional_actions. If the block when an optional action was generated
// has become irreversible then a super majority of witnesses have chosen to not include it
// and it is safe to delete.
const auto& pending_action_idx = get_index< pending_optional_action_index, by_execution >();
auto pending_itr = pending_action_idx.begin();
auto lib_time = fetch_block_by_number( get_dynamic_global_properties().last_irreversible_block_num )->timestamp;
while( pending_itr != pending_action_idx.end() && pending_itr->execution_time <= lib_time )
{
remove( *pending_itr );
pending_itr = pending_action_idx.begin();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants