Skip to content

Remove feature mockserver#1247

Merged
ziming-zung merged 31 commits intodevfrom
1205-remove-mockserver
Feb 2, 2023
Merged

Remove feature mockserver#1247
ziming-zung merged 31 commits intodevfrom
1205-remove-mockserver

Conversation

@ziming-zung
Copy link
Copy Markdown
Contributor

@ziming-zung ziming-zung commented Jan 31, 2023

This PR
resolves #1205
resolves #1073

zzz added 24 commits January 21, 2023 01:02
… 1205-remove-mockserver

# Conflicts:
#	tee-worker/Cargo.lock
#	tee-worker/litentry/core/mock-server/Cargo.toml
#	tee-worker/litentry/core/mock-server/src/lib.rs
#	tee-worker/litentry/core/mock-server/src/twitter_official.rs
#	tee-worker/service/Cargo.toml
#	tee-worker/service/src/main.rs
# Conflicts:
#	tee-worker/litentry/core/data-providers/src/discord_litentry.rs
#	tee-worker/litentry/core/data-providers/src/discord_official.rs
#	tee-worker/litentry/core/data-providers/src/graphql.rs
#	tee-worker/litentry/core/data-providers/src/twitter_litentry.rs
#	tee-worker/litentry/core/data-providers/src/twitter_official.rs
#	tee-worker/litentry/core/mock-server/Cargo.toml
#	tee-worker/litentry/core/mock-server/src/graphql.rs
#	tee-worker/litentry/core/mock-server/src/lib.rs
#	tee-worker/litentry/core/mock-server/src/twitter_official.rs
#	tee-worker/service/Cargo.toml
#	tee-worker/service/src/main.rs
@ziming-zung ziming-zung requested review from a team, BillyWooo and Kailai-Wang January 31, 2023 03:28
@ziming-zung ziming-zung requested a review from DogLi January 31, 2023 03:33
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 31, 2023

Codecov Report

Merging #1247 (9633f21) into dev (d791364) will increase coverage by 0.00%.
The diff coverage is 0.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##              dev    #1247   +/-   ##
=======================================
  Coverage   19.65%   19.66%           
=======================================
  Files         261      261           
  Lines       11883    11881    -2     
=======================================
  Hits         2336     2336           
+ Misses       9547     9545    -2     
Impacted Files Coverage Δ
tee-worker/app-libs/stf/src/helpers.rs 0.00% <ø> (ø)
tee-worker/enclave-runtime/src/lib.rs 0.00% <ø> (ø)
...tentry/core/data-providers/src/twitter_official.rs 0.00% <ø> (ø)
tee-worker/litentry/core/mock-server/src/lib.rs 0.00% <0.00%> (ø)
.../litentry/core/mock-server/src/twitter_official.rs 0.00% <0.00%> (ø)
tee-worker/service/src/main.rs 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Collaborator

@BillyWooo BillyWooo left a comment

Choose a reason for hiding this comment

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

Overall it looks good to me.
Please also update tee-worker/scripts/launch.sh accordingly.

Copy link
Copy Markdown
Collaborator

@Kailai-Wang Kailai-Wang left a comment

Choose a reason for hiding this comment

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

Looks good, thanks.

Actually I'm thinking this way of retrieving challenge code (mock-server thread -> ffi -> enclave -> global cache) might be an overkill, as we do have the trusted/untrusted RPC query to retrieve the state of the sidechain storage. Maybe it's enough to simply add another RPC method.

@ziming-zung
Copy link
Copy Markdown
Contributor Author

Looks good, thanks.

Actually I'm thinking this way of retrieving challenge code (mock-server thread -> ffi -> enclave -> global cache) might be an overkill, as we do have the trusted/untrusted RPC query to retrieve the state of the sidechain storage. Maybe it's enough to simply add another RPC method.

I also want to implement in this way at first. There is a point to consider here, whether there are any potential risks in exposing storage value via RPC. see: #1010

@Kailai-Wang
Copy link
Copy Markdown
Collaborator

They will be used for development only, no RPC will be exposed in production - even if there're such requirements, we have to consider it prudently

@Kailai-Wang
Copy link
Copy Markdown
Collaborator

Another question:

Can we enable the mock server by default in launch.py? It's used in dev anyway

@ziming-zung
Copy link
Copy Markdown
Contributor Author

Another question:

Can we enable the mock server by default in launch.py? It's used in dev anyway

Done

@ziming-zung
Copy link
Copy Markdown
Contributor Author

They will be used for development only, no RPC will be exposed in production - even if there're such requirements, we have to consider it prudently

Let's implement it in the next PR

@Kailai-Wang
Copy link
Copy Markdown
Collaborator

All good, thanks. Feel free to merge it once CI passes.

@ziming-zung ziming-zung merged commit 514c254 into dev Feb 2, 2023
@ziming-zung ziming-zung deleted the 1205-remove-mockserver branch February 2, 2023 01:46
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.

Remove feature mockserver More flexible challenge code generation in tests

5 participants