Commit Graph

12 Commits

Author SHA1 Message Date
Mohamed Sohail b9d3c219c8
fix (braking change): gas refill params (#89)
NOTE: This needs the db to be nuked if you are running a test cluster

* updated gas refilling logic to reflect EthFaucet contract
* fully dependant on on-chain contract to refill and unlock gas
* minor fixes to nonce bootstrapper

Ideal Values:

INITIAL GIFT = 0.015
THRESHOLD    = 0.01
TIME = 12 * 60 * 60

# Sample for 30 txs
EXTREME LOW = 0.00675
LOW GAS USAGE = 0.00694605
RISING = 0.0135
HIGH = 0.027
2023-05-16 15:20:01 +03:00
Mohamed Sohail 8ef2311d8e
fix: export TxStatus struct 2023-04-14 08:05:05 +00:00
Mohamed Sohail 0e5db7f06f
feat: add nonce bootstrapper
Useful for rebuilding the nonce cache automatically.

* uses otx_sign as the first source
* can fallback to chain nonce value of the 1st source is corrupted
2023-04-13 10:38:23 +00:00
Mohamed Sohail eba329eefa
refactor (store): consolidate all pg store related actions
* All postgres related functions now live in internal/store.
* Updated queries.sql file to match struct order (readibility)
* Moved keystore -> store
* Moved queries -> store
* Removed pkg/postgres
2023-04-11 10:14:49 +00:00
Mohamed Sohail 82294b96f8
refactor: pgx supports big.Int type conversion internally 2023-04-06 06:31:07 +00:00
Mohamed Sohail 341a760f02
feat: (wip) add account activation and gas quota lock
* This is a crude lock that restricts each account to the set gas quota.
2023-03-08 06:49:09 +00:00
Mohamed Sohail a47e44f262
refactor: use sigChan for shutdown, ctx fixes
* refactor main entry point for starting services
* minor fixes around ctx propagation
* improve otx marker js subscriber
2023-03-02 15:46:02 +00:00
Mohamed Sohail a1b6cb08d8
add: wip jetstream durable consumer 2023-03-02 09:12:39 +00:00
Mohamed Sohail 1ddff06502
feat (wip): add in-built chain subscription
* BREAKING: remove events interface -> use jetstream struct
* in-built chain subscription to update otx status
* potential fix for tasks: defer rollback nonce error detection
2023-03-01 17:13:23 +00:00
Mohamed Sohail 40cb86f522
feat: add otx tracking API, add enums, minor fixes
* otx can nw be tracked at /api/track/:trackingId
* moved queries to queries folder
* fixed validation error check in ErrorHandler
* added enum package with enum types
* updated migrations: added enum tables
2023-02-21 17:35:41 +00:00
Mohamed Sohail cf1f9f34c3
refactor: task handlers, emitter, tx signer, et.c.
* fallback to custom ethereum checksum validator -> https://github.com/go-playground/validator/issues/1073
* decouple jetsream emitter to separate package
* refactor task handlers into individual files
* add error handler for echo to capture unexpected errors and log them
* move handler dependencies into single struct container -> custodialContainer
* replace signer to use EIP 1559 signer -> celoutils v1
* Add 1 minutes timeout to all custodial tasks
2023-02-20 09:56:30 +00:00
Mohamed Sohail 4d13a14dc2
refactor: breaking API changes
Squashed commit of the following:

commit 05e1396121
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Wed Feb 15 10:03:44 2023 +0300

    feat: add status types to dispatcher

commit 397cd78ca9
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Wed Feb 15 09:39:31 2023 +0300

    deps: bump -> cic-celo-sdk

commit f2ba079232
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Sun Feb 12 16:53:53 2023 +0300

    snapshot: 12-ebening

commit 4f7909e4ee
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Sun Feb 12 12:50:43 2023 +0300

    xnapshot: 12-02

commit 773474cad9
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Thu Feb 9 14:23:37 2023 +0300

    update: deps initializers

commit 8a0880fcfc
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Thu Feb 9 10:42:15 2023 +0300

    wip: refactor taskers

commit 8676450122
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Fri Feb 3 12:29:27 2023 +0300

    refactor: decouple sql queries, remove transfer

    * add inline docs
    * removed transfer taks in prep for re-write

commit b4c09cd11a
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Thu Feb 2 12:29:43 2023 +0000

    refactor: cmd/service/* and api
2023-02-15 10:05:43 +03:00