GithubHelp home page GithubHelp logo

oracle-operator's People

Contributors

hacheigriega avatar kevin-yuhh avatar yoongbok-lee avatar zheng-bin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

philipjonsen

oracle-operator's Issues

Unsafe defer of .Close method, Major security risk

DESCRIPTION
Calling Close() method may return an error, and ignoring the same might result in a data loss. This is similar to many more Close methods.

For example, on POSIX systems, os.Close uses the close system call underneath, which may return an EIO:

A previously-uncommitted write(2) encountered an input/output error.

This means that the data written by os.Write hasn't been written to the disk, which results in a data loss. It is recommended to handle the error returned by the os.Close call or call os.Sync if available to force the OS to write the data to the disk.

Deferring unsafe method "Close" on type "io.ReadCloser"
oracle-operator/blob/main/oracle/http.go#L95-L95 and oracle-operator/blob/main/oracle/http.go#L98-L98

CWE: https://cwe.mitre.org/data/definitions/703.html

Add default strategy config

Introduce default strategy section such as follows in configuration file so that oracle operators can provide response to protocols without specific configuration.

[strategy.default]
  # combination strategy
  type = "linear"
  [[strategy.default.primitive]]
  primitive_type = "static-analysis-primitive-v3"
  weight = 3
  [[strategy.default.primitive]]
  primitive_type = "onchain-monitoring-primitive-v3"
  weight = 5
  [[strategy.default.primitive]]
  primitive_type = "social-sentiment-primitive-v3"
  weight = 5
  [[strategy.default.primitive]]
  primitive_type = "governance-autonomy-primitive-v3"
  weight = 10
  [[strategy.default.primitive]]
  primitive_type = "market-volatility-primitive-v3"
  weight = 10
  [[strategy.default.primitive]]
  primitive_type = "safety-assessment-primitive-v3"
 weight = 10

error log on the operator process

E[2022-12-21|10:14:11.947] error unmarshalling result: unknown field "sender" in types.ResponseCheckTx module=oracle-operator protocol=certik submodule=pusher type=MsgTaskResponse

it seems like it can't properly decode types.ResponseCheckTx either during gas estimation or the tx submission result

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.