-
Notifications
You must be signed in to change notification settings - Fork 973
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(state): Integrate new Signer for concurrent tx submission (#3298)
Closes: #3296 This adds the [`Signer`](https://github.com/celestiaorg/celestia-app/blob/bcab06582c9802f1d49a2bee86820792258bb587/pkg/user/signer.go#L31) struct from celestia-app's user package. Signer keeps track of both the network and local sequence number allowing for multiple messages to be signed within a single block. This also uses the `EstimateGas` function of the signer to estimate the gas, when the user provides 0 as the `gasLim` TODO: we should probably introduce some gas multiplier (default: 1.1) to the `EstimateGas` as it seems to underestimate the value (cc @vgonkivs) --------- Co-authored-by: rene <[email protected]>
- Loading branch information
Showing
13 changed files
with
209 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
package state | ||
|
||
import ( | ||
kr "github.com/cosmos/cosmos-sdk/crypto/keyring" | ||
"go.uber.org/fx" | ||
|
||
"github.com/celestiaorg/celestia-app/x/blob/types" | ||
"github.com/celestiaorg/celestia-node/libs/fxutil" | ||
) | ||
|
||
// WithKeyringSigner overrides the default keyring signer constructed | ||
// WithKeyring overrides the default keyring constructed | ||
// by the node. | ||
func WithKeyringSigner(signer *types.KeyringSigner) fx.Option { | ||
return fx.Replace(signer) | ||
func WithKeyring(keyring kr.Keyring) fx.Option { | ||
return fxutil.ReplaceAs(keyring, new(kr.Keyring)) | ||
} | ||
|
||
// WithKeyName configures the signer to use the given key. | ||
func WithKeyName(name AccountName) fx.Option { | ||
return fx.Replace(name) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.