Commit Graph

7 Commits

Author SHA1 Message Date
Mohamed Sohail 9e1d62a014
feat: add transfer authorization (#100)
* wip: add transfer auithorization

* feat: update transferAuthPayload

* switch to MAX_INT for value and use revoke flag
* tranfer handler: fix nonce rollback on EOA account

* feat: switch to session based session transfer auth

* Demurrage contracts require setting the approval value to 0 before updating the value after the initial limit is set
* This implementation auto-revokes every 15 min after arequest is created. Subsequent requests will fail untill the value is set back to 0

* feat: settable approve session timeout
2023-07-10 14:32:05 +08:00
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 04e5d3c20f
major: breaking changes, fixes
* add global lock
* fix lock contention
* update redis client and server -> v7
* add network status API
* upgrade deps

Squashed commit of the following:

commit 9d95f2e8f8
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Thu Mar 16 11:12:06 2023 +0000

    feat: add updated_at postgres fn + trigger

    * closes #66

commit 144d5018ea
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Thu Mar 16 08:48:45 2023 +0000

    feat: add network account status (nonce, balance)

commit 5679a675f3
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Thu Mar 16 08:01:58 2023 +0000

    fix: system global lock

    * add middleware to entire API group
    * setNX system lock key

commit ee907dddbc
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Thu Mar 16 07:34:29 2023 +0000

    feat: add system global lock to be triggered manually

commit ad58d1da47
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Tue Mar 14 16:02:25 2023 +0000

    feat: add lock retry strategy

    * previouly we relied on the task being re-queued which generally reduces the throughput of tasks

commit f4e3aedf33
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Tue Mar 14 15:45:06 2023 +0000

    tasker: add support for reporting panics

commit b8ebf88f36
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Tue Mar 14 15:40:50 2023 +0000

    pkg: bump go-redis -> v9

commit 4a0bf88322
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Mar 14 18:15:05 2023 +0300

    build(deps): bump github.com/jackc/tern/v2 from 2.0.0 to 2.0.1 (#69)

    Bumps [github.com/jackc/tern/v2](https://github.com/jackc/tern) from 2.0.0 to 2.0.1.
    - [Release notes](https://github.com/jackc/tern/releases)
    - [Changelog](https://github.com/jackc/tern/blob/master/.goreleaser.yaml)
    - [Commits](https://github.com/jackc/tern/compare/v2.0.0...v2.0.1)

    ---
    updated-dependencies:
    - dependency-name: github.com/jackc/tern/v2
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 5328d271c1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Mar 14 18:14:45 2023 +0300

    build(deps): bump golang.org/x/crypto from 0.6.0 to 0.7.0 (#70)

    Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.6.0 to 0.7.0.
    - [Release notes](https://github.com/golang/crypto/releases)
    - [Commits](https://github.com/golang/crypto/compare/v0.6.0...v0.7.0)

    ---
    updated-dependencies:
    - dependency-name: golang.org/x/crypto
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 7ce80f9e6d
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Mar 14 18:13:59 2023 +0300

    build(deps): bump github.com/grassrootseconomics/celoutils (#71)

    Bumps [github.com/grassrootseconomics/celoutils](https://github.com/grassrootseconomics/celoutils) from 1.0.0 to 1.1.1.
    - [Release notes](https://github.com/grassrootseconomics/celoutils/releases)
    - [Commits](https://github.com/grassrootseconomics/celoutils/compare/v1.0.0...v1.1.1)

    ---
    updated-dependencies:
    - dependency-name: github.com/grassrootseconomics/celoutils
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 12:03:51 +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 4dfc1725cb
feat: add in-built db migrator
- fix docker builds
- fix binary builds
2023-03-01 11:19:57 +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 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