Files
nym/nym-api/src/main.rs
T
Jędrzej Stuczyński a348ff43b0 feature: rewarding for ticketbook issuance (#5112)
* fixed pagination for querying for validators

* wip: decoupling block signing from ticketbook issuance

* added ecash contract query for latest deposit

* parking the branch: wrappers for merkle tree for issued ticketbooks

* make nym-api store merkle trees of issued ticketbooks

* nym-api route for returning all deposits alongside merkle root

* return index alongside deposit id

* persisting merkle index alongside issued ticketbook details

* wip

* responses for issued deposit challenges

* nym-api cleanup

* verification of issued partial ticketbooks

* cleanup of rewarder code

* make the rest of codebase compile

* updated config file

* improved logging

* fixed division by zero if there were no ticketbooks issued in a day

* using correct budget when rewarding operators

* fixed routes for issued data

* fixed ecash test fixture

* fixed incorrect deserialisation of expiration_date param

* additional bugfixes for ticketbook issuance

* more fixes and updated tests

* fixed formatting after rebasing

* updated schema

* fixed edge case unit test
2024-11-14 16:55:02 +00:00

48 lines
1.3 KiB
Rust

// Copyright 2020-2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: GPL-3.0-only
#![warn(clippy::todo)]
#![warn(clippy::dbg_macro)]
use crate::epoch_operations::EpochAdvancer;
use crate::support::cli;
use crate::support::storage;
use ::nym_config::defaults::setup_env;
use clap::Parser;
use node_status_api::NodeStatusCache;
use nym_bin_common::logging::setup_tracing_logger;
use nym_contract_cache::cache::NymContractCache;
use support::nyxd;
use tracing::{info, trace};
mod circulating_supply_api;
mod ecash;
mod epoch_operations;
pub(crate) mod network;
mod network_monitor;
pub(crate) mod node_describe_cache;
pub(crate) mod node_status_api;
pub(crate) mod nym_contract_cache;
pub(crate) mod nym_nodes;
mod status;
pub(crate) mod support;
// TODO rocket: remove all such Todos once rocket is phased out completely
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
cfg_if::cfg_if! {if #[cfg(feature = "console-subscriber")] {
// instrument tokio console subscriber needs RUSTFLAGS="--cfg tokio_unstable" at build time
console_subscriber::init();
}}
setup_tracing_logger();
info!("Starting nym api...");
let args = cli::Cli::parse();
trace!("args: {:#?}", args);
setup_env(args.config_env_file.as_ref());
args.execute().await
}