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

Ws server refactor #13

Merged
merged 4 commits into from
Jun 23, 2020
Merged

Ws server refactor #13

merged 4 commits into from
Jun 23, 2020

Conversation

clangenb
Copy link
Member

  • Restructured ws_server to hanlde messages in worker main loop to prevent race conditions to chain_relay_db and enclave state access
  • [WorkerApi] get rid of string api and use proper ClientRequest enum

@brenzi
Copy link
Member

brenzi commented Jun 22, 2020

seems not to work. tried on devsgx03

nctr trusted balance //AliceIncognito --mrenclave 5cKVtgRUhroJ8GN9aozdjvJh2hm9PzRpXzkCr71fb5Y2 --shard 7eLSZLSMShw4ju9GvuMmoVgeZxZimtvsGTSvLEdvcRqQ
arg_who = "//AliceIncognito"
[2020-06-22T18:33:36Z ERROR ws::handler] WS Error <Protocol>: Handshake failed.
[2020-06-22T18:33:36Z ERROR ws::handler] WS Error <Protocol>: Encountered invalid opcode: 12
[2020-06-22T18:33:36Z ERROR ws::handler] WS Error <Protocol>: Encountered frame with reserved bits set.
[2020-06-22T18:33:36Z ERROR ws::handler] WS Error <Protocol>: Encountered frame with reserved bits set.
[2020-06-22T18:33:36Z ERROR ws::handler] WS Error <Protocol>: Encountered invalid opcode: 14
[2020-06-22T18:33:36Z ERROR substratee_worker_api] [-] [WorkerApi]: error while handling request, returning
thread 'main' panicked at 'getting value failed: ()', client/src/main.rs:536:15
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@clangenb
Copy link
Member Author

did you update the client as well?

@brenzi
Copy link
Member

brenzi commented Jun 23, 2020

must've been the old client. works now.

@brenzi brenzi merged commit 35ae50a into master Jun 23, 2020
brenzi pushed a commit that referenced this pull request Sep 8, 2020
* changed ws_server completely. Requests from client are now handled in the worker main event loop to prevent race conditions with on state/chain_relay access.
* [ws_server] remove unwrap and send instead "invalid_client_request" to client
brenzi pushed a commit that referenced this pull request Sep 8, 2020
* changed ws_server completely. Requests from client are now handled in the worker main event loop to prevent race conditions with on state/chain_relay access.
* [ws_server] remove unwrap and send instead "invalid_client_request" to client
brenzi added a commit that referenced this pull request Nov 3, 2020
* [enclave] ! fix: init-shard if it does not exist
* back up chain relay db before update in case of file corruption
* clean up chain relay sync logging
* Ws server refactor (#13)
* changed ws_server completely. Requests from client are now handled in the worker main event loop to prevent race conditions with on state/chain_relay access.
* [ws_server] remove unwrap and send instead "invalid_client_request" to client
* updating block number in stf state
* [enclave/chain_relay] store only hashes of the headers instead of the headers themselves
* enclave: patch log and env_logger to mesalock
* worker should panic if it can't write to shard
* add public getters for unpermissioned statistics (#16)
* don't request key provisioning form other worker. assume its there or generate new (dangerous!)
* bump version to 0.6.11 like encointer reference release

Co-authored-by: clangenb <37865735+clangenb@users.noreply.github.com>
Co-authored-by: Marcel Frei <marcel.frei@electronix.ch>
Co-authored-by: Christian Langenbacher <christian.langenbacher91@gmail.com>
brenzi added a commit that referenced this pull request Nov 3, 2020
* automatic-shard-joining-and-per-shard-updates-on-block (integritee-network#160)

* [enclave] update_map contains options. This is needed if a storage value needs to be deleted in the STF
[enclave, stf] perform state updates per shard, auto join new shards

* [worker] only feed 100 blocks at a time into the chain relay. Improved logging while syncing to keep track of sync status

* [WorkerApi] Remove default protocol ws.

* update ipfs version (integritee-network#165)

Co-authored-by: bwty <whalelephant@users.noreply.github.com>

* Implement Ipfs read and write with verification in enclave

this implements gitcoin bounty integritee-network#70 
Co-authored-by: bwty <whalelephant@users.noreply.github.com>

* Encointer contributions upstreaming (integritee-network#174)

* [enclave] ! fix: init-shard if it does not exist
* back up chain relay db before update in case of file corruption
* clean up chain relay sync logging
* Ws server refactor (#13)
* changed ws_server completely. Requests from client are now handled in the worker main event loop to prevent race conditions with on state/chain_relay access.
* [ws_server] remove unwrap and send instead "invalid_client_request" to client
* updating block number in stf state
* [enclave/chain_relay] store only hashes of the headers instead of the headers themselves
* enclave: patch log and env_logger to mesalock
* worker should panic if it can't write to shard
* add public getters for unpermissioned statistics (#16)
* don't request key provisioning form other worker. assume its there or generate new (dangerous!)
* bump version to 0.6.11 like encointer reference release

Co-authored-by: clangenb <37865735+clangenb@users.noreply.github.com>
Co-authored-by: Marcel Frei <marcel.frei@electronix.ch>
Co-authored-by: Christian Langenbacher <christian.langenbacher91@gmail.com>

* fix integritee-network#176 and update some dependiencies

* upgrade to upstream 2.0.0-rc5
fix .dispatch filtering introduced in paritytech/substrate#6318
depend on tag version for sgx-runtime

* Upgrade upstream 2.0.0 (integritee-network#182)

* enclave builds
* worker and client builds
* fix metadata module index
* successfully tested shielding-unshielding example

* fix merge. builds and demo works

Co-authored-by: clangenb <37865735+clangenb@users.noreply.github.com>
Co-authored-by: bwty <18553484+whalelephant@users.noreply.github.com>
Co-authored-by: bwty <whalelephant@users.noreply.github.com>
Co-authored-by: bwty <email-me@belsy.space>
Co-authored-by: Marcel Frei <marcel.frei@electronix.ch>
Co-authored-by: Christian Langenbacher <christian.langenbacher91@gmail.com>
@clangenb clangenb deleted the ws-server-refactor branch December 10, 2020 11:09
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.

None yet

2 participants