Giter VIP home page Giter VIP logo

cardano-metadata-oracle's People

Contributors

mmahut avatar slowbackspace avatar vladimirvolek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

parietal

cardano-metadata-oracle's Issues

Full node support

We need to support for full node, for discovering UTXOs and submitting a signed transactions.

If possible, using the socket file.

Try to convert the object

For the following origin:

BTCDIFF:
  - name: blockBook
    source: https://btc1.trezor.io/api/v2
    path: '$.backend.difficulty'

We fail to convert the object AssertionError [ERR_ASSERTION]: obj needs to be an object. We should sanitize this:

$ curl -s https://btc1.trezor.io/api/v2 | jq .backend.difficulty
"20608845737768.16"
$ curl -s https://btc1.trezor.io/api/v2 | jq -r .backend.difficulty
20608845737768.16
$ 

Missing examples dir

README says "Have a look in the examples/ directory for inspiration.", but the directory does not exist.

Prometheus exporter support

We need to include support for Prometheus style metrics.

Upon specifiing the --prometheus-exporter-file, on each run, the following metrics are going to be included.

# Renaming balance on the posting address in Lvoelaces
cardano_metadata_oracle_balance 1526539000

# UNIX time of the latest run
cardano_metadata_oracle_last_run 1620047878

# Time to execute the oracle run in ms
cardano_metadata_oracle_exec_time 120000

Retry on fetching

Implement a re-try login in to the oracle, if the source is not set as abort_on_failure, we can retry few times before skipping it.

Tests

We need to implement a set of tests.

Support native tokens

If one of the inputs contains a native token, the resulting transaction is missing it.

{ 
  error: 'Bad Request',
  message: 'transaction submit error ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure (ValueNotConservedUTxO (Value 1444443 (fromList [(PolicyID {policyID = ScriptHash "b01fb3b8c3dd6b3705a5dc8bcd5a70759f70ad5d97a72005caeac3c6"},fromList [("Revuto52",1)])])) (Value 1444443 (fromList [])))))])',
  status_code: 400
}

Support return codes

Let's define return codes upon different errors. Right now, we get 0 even if we fail to submit the tx.

{
  error: 'Bad Request',
  message: 'transaction submit error ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure (BadInputsUTxO (fromList [TxInCompact (TxId {_unTxId = SafeHash "a3f0337e7b6aa7b04b1650fc46b494cffee00df6b33bbaaa7af2e86d75fac270"}) 0])))),LedgerFailure (UtxowFailure (UtxoFailure (ValueNotConservedUTxO (Value 0 (fromList [])) (Value 940669749 (fromList [])))))])',
  status_code: 400
}
Error: Failed to push a transaction a network.
0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.