prysm-pulse/validator/rpc/apimiddleware/structs.go
Han Shen 3a4c599a96
Implement delete gaslimit (#11290)
* Implement delete gaslimit.

* Minor comment change.

* Reset gaslimit to DefaultConfig's gaslimt instead of 0.

* After gaslimit deletion, use global gaslimit default value instead of values provided in ProposalConfig.

* After deletion, use config default, if that is not available, use global default gaslimit value.

* Use grpc's codes.NotFound instead of http code "404".

* Updated bazel deps (new imports "google.golang.org/grpc/codes" was added for tests).

* Fix "TestServer_RecoverWallet_Derived" test failure.

Previously "params.BeaconConfig()" (thus the default global value
"BLSSecretKeyLength") was overriden by standard_api_test:TestServer_DeleteGasLimit.
Fixed the problem by retoring the origin global default after the test is done.

* Do not change BeaconConfig object, instead change BeaconConfig.DefaultBuilderGasLimit.

Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
2022-08-25 14:43:21 +00:00

99 lines
2.3 KiB
Go

package apimiddleware
type listKeystoresResponseJson struct {
Keystores []*keystoreJson `json:"data"`
}
type keystoreJson struct {
ValidatingPubkey string `json:"validating_pubkey" hex:"true"`
DerivationPath string `json:"derivation_path"`
}
type importKeystoresRequestJson struct {
Keystores []string `json:"keystores"`
Passwords []string `json:"passwords"`
SlashingProtection string `json:"slashing_protection"`
}
type importKeystoresResponseJson struct {
Statuses []*statusJson `json:"data"`
}
type deleteKeystoresRequestJson struct {
PublicKeys []string `json:"pubkeys" hex:"true"`
}
type statusJson struct {
Status string `json:"status" enum:"true"`
Message string `json:"message"`
}
type deleteKeystoresResponseJson struct {
Statuses []*statusJson `json:"data"`
SlashingProtection string `json:"slashing_protection"`
}
//remote keymanager api
type listRemoteKeysResponseJson struct {
Keystores []*remoteKeysListJson `json:"data"`
}
type remoteKeysListJson struct {
Pubkey string `json:"pubkey" hex:"true"`
Url string `json:"url"`
Readonly bool `json:"readonly"`
}
type remoteKeysJson struct {
Pubkey string `json:"pubkey" hex:"true"`
Url string `json:"url"`
Readonly bool `json:"readonly"`
}
type importRemoteKeysRequestJson struct {
Keystores []*remoteKeysJson `json:"remote_keys"`
}
type importRemoteKeysResponseJson struct {
Statuses []*statusJson `json:"data"`
}
type deleteRemoteKeysRequestJson struct {
PublicKeys []string `json:"pubkeys" hex:"true"`
}
type deleteRemoteKeysResponseJson struct {
Statuses []*statusJson `json:"data"`
}
type feeRecipientJson struct {
Pubkey string `json:"pubkey" hex:"true"`
Ethaddress string `json:"ethaddress" address:"true"`
}
type gasLimitJson struct {
Pubkey string `json:"pubkey" hex:"true"`
GasLimit string `json:"gas_limit"`
}
type getFeeRecipientByPubkeyResponseJson struct {
Data *feeRecipientJson `json:"data"`
}
type setFeeRecipientByPubkeyRequestJson struct {
Ethaddress string `json:"ethaddress" hex:"true"`
}
type getGasLimitResponseJson struct {
Data *gasLimitJson `json:"data"`
}
type setGasLimitRequestJson struct {
GasLimit string `json:"gas_limit"`
}
type deleteGasLimitRequestJson struct {
Pubkey string `json:"pubkey" hex:"true"`
}