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

Use LocalCache per default #2417

Merged
merged 1 commit into from Dec 3, 2020
Merged

Use LocalCache per default #2417

merged 1 commit into from Dec 3, 2020

Conversation

ineiti
Copy link
Member

@ineiti ineiti commented Dec 1, 2020

When a new byzcoinrpc is instantiated, it uses a LocalCache if no DB is given.

Closes #2416

@ineiti ineiti self-assigned this Dec 1, 2020
@ineiti ineiti added this to WIP in Cothority via automation Dec 1, 2020
@ineiti ineiti moved this from WIP to Ready4Merge in Cothority Dec 1, 2020
When a new byzcoinrpc is instantiated, it uses a LocalCache if no DB is given.
@cgrigis
Copy link
Collaborator

cgrigis commented Dec 3, 2020

I see that the tests pass on Travis, but when I try to npm test locally on the branch, with byzcoin-rpc.spec.ts fdescribe-ed, I get these errors:

1. ByzCoinRPC Tests
=== starting conodes ===
Check output.log for the logs
=== conodes started ===

.   ✔ should create an rpc and evolve/spawn darcs (2420ms)
.   ✔ should create an rpc and get it from byzcoin (70ms)
E : byzcoin-rpc.ts:82:46           -> couldn't getUpdates {Array}: Error: Endpoint terminated the connection due to a protocol error. Reason: unexpected error: processing request: processing error: cannot find skipblock while getting proof,Error: Endpoint terminated the connection due to a protocol error. Reason: unexpected error: processing request: processing error: cannot find skipblock while getting proof
F   ✖ should use a LocalCache when no DB is given (1 failure) (111ms)
.   ✔ should throw an error for non-existing instance or wrong type (59ms)
E : byzcoin-rpc.ts:82:46           -> couldn't getUpdates {Array}: Error: Endpoint terminated the connection due to a protocol error. Reason: unexpected error: processing request: processing error: cannot find skipblock while getting proof,Error: Endpoint terminated the connection due to a protocol error. Reason: unexpected error: processing request: processing error: cannot find skipblock while getting proof
F   ✖ should get updated when an instance is updated (1 failure) (54ms)
Failed Specs:

1. ByzCoinRPC Tests : should use a LocalCache when no DB is given
   Error: Error: Endpoint terminated the connection due to a protocol error. Reason: unexpected error: processing request: processing error: cannot find skipblock while getting proof,Error: Endpoint terminated the connection due to a protocol error. Reason: unexpected error: processing request: processing error: cannot find skipblock while getting proof
       at ByzCoinRPC.<anonymous> /home/cgrigis/C4DT/Projects/cothority/external/js/cothority/src/byzcoin/byzcoin-rpc.ts:82:46
       at <Jasmine>
       at rejected /home/cgrigis/C4DT/Projects/cothority/external/js/cothority/node_modules/tslib/tslib.js:108:69

2. ByzCoinRPC Tests : should get updated when an instance is updated
   Error: Error: Endpoint terminated the connection due to a protocol error. Reason: unexpected error: processing request: processing error: cannot find skipblock while getting proof,Error: Endpoint terminated the connection due to a protocol error. Reason: unexpected error: processing request: processing error: cannot find skipblock while getting proof
       at ByzCoinRPC.<anonymous> /home/cgrigis/C4DT/Projects/cothority/external/js/cothority/src/byzcoin/byzcoin-rpc.ts:82:46
       at <Jasmine>
       at rejected /home/cgrigis/C4DT/Projects/cothority/external/js/cothority/node_modules/tslib/tslib.js:108:69

Any idea why?

@ineiti
Copy link
Member Author

ineiti commented Dec 3, 2020

Any idea why?

did you make docker in the git-root?

@cgrigis
Copy link
Collaborator

cgrigis commented Dec 3, 2020

did you make docker in the git-root?

Nope, missed that one, thank you. :) Must have been using an old incompatible docker then.

All good!

Copy link
Collaborator

@cgrigis cgrigis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cgrigis cgrigis merged commit c9184a5 into master Dec 3, 2020
Cothority automation moved this from Ready4Merge to Closed Dec 3, 2020
@ineiti ineiti deleted the use_default_db branch September 9, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Cothority
  
Closed
Development

Successfully merging this pull request may close these issues.

ByzCoinRPC should use default DB
2 participants