berachain / offchain-sdk Goto Github PK
View Code? Open in Web Editor NEWA framework for building off-chain services for EVM chains
License: MIT License
A framework for building off-chain services for EVM chains
License: MIT License
Implement w3 for a BatchClient that supports easy batch calls. Will reduce network overhead for applications that make eth_calls, etc. often
add metrics to the extended eth client and record metrics based on request success/fail. Similarly to API request wrapping with metrics handlers
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.
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
so we can plug in data dog but don't kill prometheus
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.
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,
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.
If switching between, multiple RPC endpoints, will break invariants held by Transactor.
Retry/re-create the subscription in the job_manager for subscribing jobs to the after some time of a stale subscription. Useful when for ex: eth subscription to certain filtered logs, but no logs for a long time, "slow subscribers" will get dropped by the RPC node.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.