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

[bug] when mint amount is 1 eth, server panics #22

Open
0xbok opened this issue Aug 15, 2023 · 0 comments
Open

[bug] when mint amount is 1 eth, server panics #22

0xbok opened this issue Aug 15, 2023 · 0 comments
Labels
before testnet bug Something isn't working

Comments

@0xbok
Copy link
Member

0xbok commented Aug 15, 2023

[src/mint.rs:27] &f = MintFilter {
    receiver: 0x8ca4cc18dc867ae7d87473f8460120168a895e7a,
    low_coin: 10,
    high_coin: 1000000000000000010,
    timestamp: 1692103007,
}
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E22003), message: "numeric field overflow", detail: Some("A field with precision 13, scale 0 must round to an absolute value less than 10^13."), hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("numeric.c"), line: Some(7512), routine: Some("apply_typmod") }) }', src/merkle.rs:258:22
stack backtrace:
   0: rust_begin_unwind
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
   2: core::result::unwrap_failed
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/result.rs:1785:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/result.rs:1107:23
   4: <merklers::merkle::PostgresDBConfig as pmtree::database::Database>::put_with_pre_image::{{closure}}
             at ./src/merkle.rs:255:37
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/mod.rs:91:19
   6: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/future.rs:124:9
   7: pmtree::tree::MerkleTree<D,H>::set::{{closure}}
             at /Users/dev/.cargo/git/checkouts/pmtree-beb92b2868cce219/577f222/src/tree.rs:149:13
   8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/mod.rs:91:19
   9: pmtree::tree::MerkleTree<D,H>::update_next::{{closure}}
             at /Users/dev/.cargo/git/checkouts/pmtree-beb92b2868cce219/577f222/src/tree.rs:221:51
  10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/mod.rs:91:19
  11: merklers::model::mint_in_merkle::{{closure}}
             at ./src/model.rs:128:37
  12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/mod.rs:91:19
  13: merklers::mint::mint::{{closure}}
             at ./src/mint.rs:36:46
  14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/mod.rs:91:19
  15: merklers::main::{{closure}}::{{closure}}
             at ./src/main.rs:219:65
  16: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/mod.rs:91:19
  17: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/future/future.rs:124:9
  18: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/core.rs:311:17
  19: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/loom/std/unsafe_cell.rs:14:9
  20: tokio::runtime::task::core::Core<T,S>::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/core.rs:300:13
  21: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/harness.rs:476:19
  22: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panic/unwind_safe.rs:271:9
  23: std::panicking::try::do_call
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  24: ___rust_try
  25: std::panicking::try
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  26: std::panic::catch_unwind
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  27: tokio::runtime::task::harness::poll_future
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/harness.rs:464:18
  28: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/harness.rs:198:27
  29: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/harness.rs:152:15
  30: tokio::runtime::task::raw::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/raw.rs:276:5
  31: tokio::runtime::task::raw::RawTask::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/raw.rs:200:18
  32: tokio::runtime::task::LocalNotified<S>::run
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/mod.rs:400:9
  33: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/scheduler/multi_thread/worker.rs:639:17
  34: tokio::runtime::coop::with_budget
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/coop.rs:107:5
  35: tokio::runtime::coop::budget
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/coop.rs:73:5
  36: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/scheduler/multi_thread/worker.rs:575:9
  37: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/scheduler/multi_thread/worker.rs:526:24
  38: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/scheduler/multi_thread/worker.rs:491:21
  39: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/context/scoped.rs:40:9
  40: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/context.rs:176:26
  41: std::thread::local::LocalKey<T>::try_with
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/thread/local.rs:445:16
  42: std::thread::local::LocalKey<T>::with
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/thread/local.rs:421:9
  43: tokio::runtime::context::set_scheduler
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/context.rs:176:9
  44: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/scheduler/multi_thread/worker.rs:486:9
  45: tokio::runtime::context::runtime::enter_runtime
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/context/runtime.rs:65:16
  46: tokio::runtime::scheduler::multi_thread::worker::run
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/scheduler/multi_thread/worker.rs:478:5
  47: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/scheduler/multi_thread/worker.rs:447:45
  48: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/blocking/task.rs:42:21
  49: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/core.rs:311:17
  50: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/loom/std/unsafe_cell.rs:14:9
  51: tokio::runtime::task::core::Core<T,S>::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/core.rs:300:13
  52: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/harness.rs:476:19
  53: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panic/unwind_safe.rs:271:9
  54: std::panicking::try::do_call
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  55: ___rust_try
  56: std::panicking::try
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  57: std::panic::catch_unwind
             at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  58: tokio::runtime::task::harness::poll_future
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/harness.rs:464:18
  59: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/harness.rs:198:27
  60: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/harness.rs:152:15
  61: tokio::runtime::task::raw::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/raw.rs:276:5
  62: tokio::runtime::task::raw::RawTask::poll
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/raw.rs:200:18
  63: tokio::runtime::task::UnownedTask<S>::run
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/task/mod.rs:437:9
  64: tokio::runtime::blocking::pool::Task::run
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/blocking/pool.rs:159:9
  65: tokio::runtime::blocking::pool::Inner::run
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/blocking/pool.rs:513:17
  66: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /Users/dev/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.29.1/src/runtime/blocking/pool.rs:471:13
@0xbok 0xbok added the bug Something isn't working label Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
before testnet bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant