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

Millisecond Block Time + Reduce Future Bound + Remove Block Cost #248

Merged
merged 50 commits into from
Jul 20, 2023

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Jul 18, 2023

Resolves: #244
Resolves: #182
Resolves: #247

Challenges

  • Second-level granularity prevents a number of important data structures from getting too large -> leads to slight over-estimation of windows
  • UX for configs easier to reason about in seconds

TODO

  • store ms in block timestamp
  • remove blockCost + blockCostWindow
  • reduce future bound to 1s
  • remove MaxBlockTxs
  • add min block time to rules
  • remove preferred blocks per second from config, just try to build as soon as min block time has surpassed using rules
  • reduce tx/block precision for gas cost window + emap
  • make block builder dynamic (don't just check every X ms)
  • ensure GetValidityWindow is being used correctly
    • convert to ms to avoid multiplying by consts.MillisecondsPerSecond everywhere
    • need to wait for n+1 second before exiting during sync (otherwise may not get beginning of modulo range)? (as a simple example, consider a 500ms range -> missing first 500ms but other nodes will use those txs to determine if replay)
    • ensure oldest allowed lookback in blocks matches behavior in seen emap (non-determinism)
  • add replay test where accept, then submit again to see if this is a bug
  • [Different Approach] reduce precision of txs instead of truncating inner buckets (can assert as well in tx verification)
  • clarify in a comment whether expiry time is inclusive
  • Fix hang during E2E builder

@patrick-ogrady patrick-ogrady marked this pull request as draft July 18, 2023 23:24
@patrick-ogrady patrick-ogrady changed the title Millisecond Block Time Millisecond Block Time + Reduce Future Bound Jul 19, 2023
@patrick-ogrady patrick-ogrady changed the title Millisecond Block Time + Reduce Future Bound Millisecond Block Time + Reduce Future Bound + Remove Block Cost Jul 19, 2023
@patrick-ogrady
Copy link
Contributor Author

Current log:

./node1-bls/logs/2Kr5MFwVZoAbaXL7u6NQBvMNMahKeokFfxj2An5eZvH3iFFztj.log:[07-19|22:36:54.606] DEBUG <2Kr5MFwVZoAbaXL7u6NQBvMNMahKeokFfxj2An5eZvH3iFFztj Chain> snowman/transitive.go:877 block verification failed {"error": "time must monotonically increase"}

@patrick-ogrady patrick-ogrady marked this pull request as ready for review July 20, 2023 20:06
@patrick-ogrady patrick-ogrady merged commit ab7a619 into main Jul 20, 2023
@patrick-ogrady patrick-ogrady deleted the millisecond-times-v2 branch July 20, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Block Cost Millisecond Block Time Change "Future Bound" to 2s
1 participant