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

Poll (remote) enclave for local public keys #861

Merged
merged 2 commits into from
Aug 20, 2019
Merged

Poll (remote) enclave for local public keys #861

merged 2 commits into from
Aug 20, 2019

Conversation

prd-fox
Copy link
Contributor

@prd-fox prd-fox commented Aug 20, 2019

This PR adds a poller that will fetch public keys from the Enclave and add them to the local store.
This means that if a remote enclave is restarted with different keys, then they will get picked up by the transaction manager without having to restart, which then propagates across the network.

This is essentially a no-op for local enclaves for now, although after #703 is implemented, it would be picked up automatically (although whether this is worth the cost is arguable, tending towards not).

A poller was chosen so that we can keep the 1-way communication of TM->Enclave.
A polling time of 5000ms was chosen arbitrarily, which keep the amount of time a user must wait before the key is accessible down, if we want to increase the time to reduce strain then please do suggest.

Fixes #702

Supersedes #853


Although this PR creates more spring beans, which is the opposite direction of where we want to go, I have raised the ticket #860 to capture a removing all the possible tessera-partyinfo beans as its own change.

added to the local PartyInfo (and eventually propagated).
@codecov-io
Copy link

codecov-io commented Aug 20, 2019

Codecov Report

Merging #861 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #861      +/-   ##
============================================
+ Coverage     99.44%   99.44%   +<.01%     
  Complexity     2076     2076              
============================================
  Files           311      312       +1     
  Lines          6096     6101       +5     
  Branches        312      312              
============================================
+ Hits           6062     6067       +5     
  Misses            5        5              
  Partials         29       29
Impacted Files Coverage Δ Complexity Δ
...rum/tessera/partyinfo/PartyInfoServiceFactory.java 100% <ø> (ø) 1 <0> (ø) ⬇️
...quorum/tessera/partyinfo/PartyInfoServiceImpl.java 97.22% <100%> (-0.22%) 18 <2> (-3)
...a/com/quorum/tessera/partyinfo/PartyInfoStore.java 100% <100%> (ø) 8 <2> (-1) ⬇️
...tessera/partyinfo/PartyInfoServiceFactoryImpl.java 100% <100%> (ø) 9 <2> (+1) ⬆️
...orum/tessera/partyinfo/EnclaveKeySynchroniser.java 100% <100%> (ø) 3 <3> (?)

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 d2ec968...756ff43. Read the comment docs.

@prd-fox prd-fox added the 0.11 label Aug 20, 2019
@melowe melowe merged commit 938b7b1 into Consensys:master Aug 20, 2019
@prd-fox prd-fox deleted the 702-update-local-keys branch August 20, 2019 15:38
chris-j-h pushed a commit that referenced this pull request Sep 2, 2019
…861)

added to the local PartyInfo (and eventually propagated).
@Krish1979 Krish1979 added 0.10.1 and removed 0.11 labels Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.10.1 feature User features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote Enclave to update TM when new keys are added real time
4 participants