Skip to content

all: remove version field #25096 #970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion XDCx/XDCx.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ func (XDCx *XDCX) APIs() []rpc.API {
return []rpc.API{
{
Namespace: ProtocolName,
Version: ProtocolVersionStr,
Service: NewPublicXDCXAPI(XDCx),
Public: true,
},
Expand Down
1 change: 0 additions & 1 deletion XDCxlending/XDCxlending.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func (l *Lending) APIs() []rpc.API {
return []rpc.API{
{
Namespace: ProtocolName,
Version: ProtocolVersionStr,
Service: NewPublicXDCXLendingAPI(l),
Public: true,
},
Expand Down
1 change: 0 additions & 1 deletion consensus/XDPoS/XDPoS.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ func (x *XDPoS) Initial(chain consensus.ChainReader, header *types.Header) error
func (x *XDPoS) APIs(chain consensus.ChainReader) []rpc.API {
return []rpc.API{{
Namespace: "XDPoS",
Version: "1.0",
Service: &API{chain: chain, XDPoS: x},
Public: true,
}}
Expand Down
1 change: 0 additions & 1 deletion consensus/clique/clique.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ func CalcDifficulty(snap *Snapshot, signer common.Address) *big.Int {
func (c *Clique) APIs(chain consensus.ChainReader) []rpc.API {
return []rpc.API{{
Namespace: "clique",
Version: "1.0",
Service: &API{chain: chain, clique: c},
Public: false,
}}
Expand Down
9 changes: 0 additions & 9 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,45 +400,36 @@ func (e *Ethereum) APIs() []rpc.API {
return append(apis, []rpc.API{
{
Namespace: "eth",
Version: "1.0",
Service: NewPublicEthereumAPI(e),
Public: true,
}, {
Namespace: "eth",
Version: "1.0",
Service: NewPublicMinerAPI(e),
Public: true,
}, {
Namespace: "eth",
Version: "1.0",
Service: downloader.NewPublicDownloaderAPI(e.protocolManager.downloader, e.eventMux),
Public: true,
}, {
Namespace: "miner",
Version: "1.0",
Service: NewPrivateMinerAPI(e),
Public: false,
}, {
Namespace: "eth",
Version: "1.0",
Service: filters.NewFilterAPI(filters.NewFilterSystem(e.ApiBackend, filters.Config{LogCacheSize: e.config.FilterLogCacheSize}), false),
Public: true,
}, {
Namespace: "admin",
Version: "1.0",
Service: NewPrivateAdminAPI(e),
}, {
Namespace: "debug",
Version: "1.0",
Service: NewPublicDebugAPI(e),
Public: true,
}, {
Namespace: "debug",
Version: "1.0",
Service: NewPrivateDebugAPI(e.chainConfig, e),
}, {
Namespace: "net",
Version: "1.0",
Service: e.netRPCService,
Public: true,
},
Expand Down
9 changes: 0 additions & 9 deletions internal/ethapi/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,46 +124,37 @@ func GetAPIs(apiBackend Backend, chainReader consensus.ChainReader) []rpc.API {
return []rpc.API{
{
Namespace: "eth",
Version: "1.0",
Service: NewPublicEthereumAPI(apiBackend),
Public: true,
}, {
Namespace: "eth",
Version: "1.0",
Service: NewPublicBlockChainAPI(apiBackend, chainReader),
Public: true,
}, {
Namespace: "eth",
Version: "1.0",
Service: NewPublicTransactionPoolAPI(apiBackend, nonceLock),
Public: true,
}, {
Namespace: "XDCx",
Version: "1.0",
Service: NewPublicXDCXTransactionPoolAPI(apiBackend, nonceLock),
Public: true,
}, {
Namespace: "txpool",
Version: "1.0",
Service: NewPublicTxPoolAPI(apiBackend),
Public: true,
}, {
Namespace: "debug",
Version: "1.0",
Service: NewPublicDebugAPI(apiBackend),
Public: true,
}, {
Namespace: "debug",
Version: "1.0",
Service: NewPrivateDebugAPI(apiBackend),
}, {
Namespace: "eth",
Version: "1.0",
Service: NewPublicAccountAPI(apiBackend.AccountManager()),
Public: true,
}, {
Namespace: "personal",
Version: "1.0",
Service: NewPrivateAccountAPI(apiBackend, nonceLock),
Public: false,
},
Expand Down
4 changes: 0 additions & 4 deletions node/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,16 @@ func (n *Node) apis() []rpc.API {
return []rpc.API{
{
Namespace: "admin",
Version: "1.0",
Service: &privateAdminAPI{n},
}, {
Namespace: "admin",
Version: "1.0",
Service: &publicAdminAPI{n},
Public: true,
}, {
Namespace: "debug",
Version: "1.0",
Service: debug.Handler,
}, {
Namespace: "web3",
Version: "1.0",
Service: &publicWeb3API{n},
Public: true,
},
Expand Down
1 change: 0 additions & 1 deletion p2p/simulations/adapters/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ func execP2PNode() {
// Add the snapshot API.
stack.RegisterAPIs([]rpc.API{{
Namespace: "simulation",
Version: "1.0",
Service: SnapshotAPI{services},
}})

Expand Down
2 changes: 1 addition & 1 deletion rpc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
// API describes the set of methods offered over the RPC interface
type API struct {
Namespace string // namespace under which the rpc methods of Service are exposed
Version string // api version for DApp's
Version string // deprecated - this field is no longer used, but retained for compatibility
Service interface{} // receiver instance which holds the methods
Public bool // indication if the methods must be considered safe for public use
}
Expand Down