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

Configurable server #3

Open
Tibo-lg opened this issue Apr 8, 2020 · 0 comments
Open

Configurable server #3

Tibo-lg opened this issue Apr 8, 2020 · 0 comments

Comments

@Tibo-lg
Copy link
Contributor

Tibo-lg commented Apr 8, 2020

Overview

The oracle server should be configurable to allow serving different type of assets with different timeframes.

The configuration should look something like:

btcusd:
  frequency: 1h
  range: 2months
btcjpy:
  frequency: 2h
  range: 2months

URL pattern should be something like:
/{assetname}/{time}/rvalue
/{assetname}/{time}/signature

Time should be using ISO-8601, this article gives some good practices.

R values and signatures should be generated lazily, meaning that when they are requested for the first time, they are generated and stored in the database (it is important to consider concurrency issues here).

The k values should be generated using a CPRG and also stored in the database (this should be revised in the future to store them in a secure module).

Objectives

  • Have the server automatically generate the handlers based on the configuration file.
  • Return properly generated R values and store them in DB
  • Return dummy signatures
  • Have unit and integration tests

Technical consideration

Might be useful to reuse some of the configuration structures and functions from p2pderivatives-server, maybe extracting them in a separate repo.

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

No branches or pull requests

1 participant