-
Notifications
You must be signed in to change notification settings - Fork 22
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
Reveal pre-images on a timer #860
Conversation
I should have pressed Draft PR, but I couldn't. :( |
You can change it :) |
With regards to the timer implementation, you will need to first submit a PR to LocalRest with a test-case. |
I'd like to PR |
7bd84f7
to
2b2cc99
Compare
Codecov Report
@@ Coverage Diff @@
## v0.x.x #860 +/- ##
==========================================
- Coverage 90.44% 90.17% -0.27%
==========================================
Files 70 70
Lines 5569 5570 +1
==========================================
- Hits 5037 5023 -14
- Misses 532 547 +15
Continue to review full report at Codecov.
|
571e8dd
to
c8363a3
Compare
Actually I am a little bit confused about vibe.d. It claims it supports null delegates, but it has two overloads of It's probably an oversight? Hmm. |
I think maybe we should just reject null delegates? I don't know of any use-case for it. |
https://github.com/vibe-d/vibe-core/blob/872bff8472cc6755e4d0424b347a19a4f5d86ec3/source/vibe/core/core.d#L873-L883 |
Yes but your code doesn't call that overload. It calls this one: |
That's right. It's overloaded. |
There is an existing networking test which tests that preimages are revealed when a transaction is sent. That test should now be rewritten. |
The existing issue comments were deleted and the test was simplified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broadly LGTM
@bpfkorea/core Is 10 seconds appropriate for my suggested interval of Reveal pre-images? |
I think it's a good start |
I'll add a task item about making the period for revalation of pre-image configurable in the issue #520 . |
We need a timer function in the operating or test environment. This function is delegate called repeatedly or after a certain time.
The having pre-image is currently being checked in FullNode.putTransaction to see if pre-image is required. It's call location is inefficient And that function is only needed by the validator. Therefore, it is checked using a timer that is called periodically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Merge at will.
Described in each commit.
Relates to #582