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

Fix oracle service behaviour #2074

Merged
merged 2 commits into from
Jul 20, 2021
Merged

Conversation

roman-khimov
Copy link
Member

We don't have many of the problems neo-project/neo-modules#608 fixes, but we have one of our own.

@roman-khimov roman-khimov added this to the v0.96.0 milestone Jul 19, 2021
If an oracle node is resynchronized from the genesis the service receives all
requests from all blocks via AddRequests() invoked from the native
contract. Almost all of them are long obsolete and need to be removed, native
oracle contract will try to do that with RemoveRequests() calls, but they
won't change anything.

So queue up all "initial" requests in special map and manage it directly
before the module is Run() which happens after synchronization
completion. Then process any requests that are still active and work with new
blocks as usual.
@roman-khimov roman-khimov force-pushed the fix-oracle-service-behaviour branch from c2e87a5 to 3a93977 Compare July 19, 2021 19:53
@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #2074 (3a93977) into master (5e26170) will increase coverage by 0.01%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2074      +/-   ##
==========================================
+ Coverage   84.19%   84.20%   +0.01%     
==========================================
  Files         287      287              
  Lines       26860    26884      +24     
==========================================
+ Hits        22616    22639      +23     
  Misses       3017     3017              
- Partials     1227     1228       +1     
Impacted Files Coverage Δ
pkg/services/oracle/oracle.go 77.87% <66.66%> (-0.98%) ⬇️
pkg/services/oracle/request.go 59.23% <70.58%> (+7.16%) ⬆️
pkg/services/oracle/response.go 85.26% <100.00%> (ø)
pkg/services/notary/notary.go 92.30% <0.00%> (-0.91%) ⬇️
pkg/consensus/consensus.go 72.58% <0.00%> (-0.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e26170...3a93977. Read the comment docs.

@roman-khimov roman-khimov merged commit 7477e2c into master Jul 20, 2021
@roman-khimov roman-khimov deleted the fix-oracle-service-behaviour branch July 20, 2021 08:29
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.

3 participants