Coder Social home page Coder Social logo

fedimint-observer's People

Contributors

elsirion avatar justinmoon avatar kodylow avatar bradleystachurski avatar

Stargazers

Tony Giorgio avatar  avatar  avatar Henrique avatar Fernando Parisotto avatar 22388o⚡️  avatar douglaz avatar

Watchers

 avatar  avatar

fedimint-observer's Issues

Save config as JSON

Might be easier to query it (e.g. get federation name) if it was in JSON form. Postgres has good support for querying JSON.

If database is locked, syncing stops

If an error like this is encountered, it will stop syncing:

2024-04-18T19:42:18.641647Z ERROR task{name="Observer for <federation-id>"}: fedimint_observer::federation::observer: Observer errored: error returned from database: (code: 5) database is locked

Don't use txid as primary key part

We nearly never care about the txid, whereas the session index and item index in a session is a perfectly fine primary key for transactions too, is shorter and we even care about sesssion indices often (so it's practical if we don't have to join over transactions to find the session of a tx input/output).

FOREIGN KEY (federation_id, txid) REFERENCES transactions(federation_id, txid), -- This might be a bit too heavy of a foreign key? Maybe use rowid instead?

Build fails on latest master

just b fails on latest master (https://github.com/elsirion/fedimint-observer/tree/09f93e68534dcdc84fa69380a15ca5c994787b3d).

error[E0433]: failed to resolve: could not find `Builder` in `task`
   --> /home/nix/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fedimint-core-0.3.0-rc.3/src/task.rs:462:26
    |
462 |             tokio::task::Builder::new()
    |                          ^^^^^^^ could not find `Builder` in `task`

This failed locally when using nix develop from the root of this repo and also from a recent commit from fedimint/fedimint (https://github.com/fedimint/fedimint/tree/636282449edda8f5651e240a01326e28bb99ceae).

Parse session data for federation's UTXOs

The current schema supports tracking a federation's fedimint transactions, however we're not currently storing on-chain identifiers (on-chain txid, vout, etc). This is necessary to construct the current UTXOs held by the federation.

I have a rough approach that parses the SessionOutcomes for wallet module transactions already observed federations.

@elsirion Do you have a preference for introducing migrations vs modifying schema/v0.sql and re-syncing a new database? The project seems early enough that we can modify without introducing a migration framework.

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.