Giter VIP home page Giter VIP logo

offchain-sdk's Issues

Transactor restart edge case

On restart, should check mempool to see if any tx is stuck as pending, in which case the next tx should be sent on the same nonce with a gas bump.

Add metrics to eth client RPC requests

In offchain-sdk add metrics to the extended eth client and record metrics based on request success/fail. Similarly to API request wrapping with metrics handlers

feat: Improve connection pool robustness

  • add how far behind (latest block height) syncing check amongst healthy clients
  • use priority queue to store most up-to-date client as the highest priority
  • also allow optionally choosing a sticky connection to a configured client

Document Functions Thoroughly:

Add detailed comments to each function describing its purpose, parameters, return values, and potential side effects. This enhances readability and helps other developers understand how to interact with the interface.

Transactor needs to better handle queued txs

Currently, in the case where a node’s mempool has queued txs for the account (on-startup) but no pending txs, the next tx is sent on top of the queued txs

Solution: Send the next tx with the pending nonce, rather than following the queued,

Gracefully handle shutdown in worker pool

When shutting down an application, may see a panic like below

panic: context canceled

goroutine 1 [running]:
github.com/berachain/offchain-sdk/baseapp.(*JobManager).RunProducers(0xc00050f0b0, {0x1609860, 0xc000338ac0})
    /go/pkg/mod/github.com/berachain/[email protected]/baseapp/job_manager.go:147 +0xb98
github.com/berachain/offchain-sdk/baseapp.(*BaseApp).Start(0xc00050f1a0, {0x1609860, 0xc000338ac0})
    /go/pkg/mod/github.com/berachain/[email protected]/baseapp/baseapp.go:65 +0x18c
github.com/berachain/offchain-sdk/cmd.StartCmdWithOptions[...].func1({0x12eac5e, 0x4?, 0x12eab66?})
    /go/pkg/mod/github.com/berachain/[email protected]/cmd/start.go:104 +0x504
github.com/spf13/cobra.(*Command).execute(0xc000328308, {0xc0003e4980, 0x2, 0x2})
    /go/pkg/mod/github.com/spf13/[email protected]/command.go:983 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc000328008)
    /go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(0x15f8190?)
    /go/pkg/mod/github.com/spf13/[email protected]/command.go:1039 +0x13
main.main()
    /runner/mod/distributor/cmd/main.go:14 +0x4a

For any routines that are still ongoing, gracefully wait for completion to prevent unwanted panics.

Setup e2e testing framework

  • Move all tests that require env vars to e2e testing
  • Create e2e testing folder
  • Use forge anvil for local testnet and deploy necessary contracts

artio.bex.berachain.

artio.bex.berachain. t
Снимок экрана от 2024-06-06 15-00-43
ransactions freeze during exchange from Rabbit wallet/

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.