Skip to content

Commit

Permalink
Merge branch 'rc/v1.7.next1' into fix-transcation-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 authored Aug 12, 2024
2 parents 0d35385 + a9f6e32 commit 2e0e5bb
Show file tree
Hide file tree
Showing 29 changed files with 62 additions and 775 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ Please note that `altered-accounts` endpoints will only work if the backing obse

- `/v1.0/blocks/by-round/:round` (GET) --> returns all blocks by round

### block-atlas

- `/v1.0/block-atlas/:shard/:nonce` (GET) --> returns a block by nonce, as required by Block Atlas


### hyperblock

- `/v1.0/hyperblock/by-nonce/:nonce` (GET) --> returns a hyperblock by nonce, with transactions included
Expand Down
6 changes: 0 additions & 6 deletions api/apiHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ func initBaseGroupsWithFacade(facade data.FacadeHandler) (map[string]data.GroupH
return nil, err
}

blockAtlasGroup, err := groups.NewBlockAtlasGroup(facade)
if err != nil {
return nil, err
}

hyperBlocksGroup, err := groups.NewHyperBlockGroup(facade)
if err != nil {
return nil, err
Expand Down Expand Up @@ -110,7 +105,6 @@ func initBaseGroupsWithFacade(facade data.FacadeHandler) (map[string]data.GroupH
"/block": blockGroup,
"/blocks": blocksGroup,
"/internal": internalGroup,
"/block-atlas": blockAtlasGroup,
"/hyperblock": hyperBlocksGroup,
"/network": networkGroup,
"/node": nodeGroup,
Expand Down
58 changes: 0 additions & 58 deletions api/groups/baseBlockAtlasGroup.go

This file was deleted.

132 changes: 0 additions & 132 deletions api/groups/baseBlockAtlasGroup_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions api/groups/baseBlockGroup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestGetBlockByNonce_ReturnsSuccessfully(t *testing.T) {
resp := httptest.NewRecorder()
ws.ServeHTTP(resp, req)

apiResp := blockResponse{}
apiResp := data.BlockApiResponse{}
loadResponse(resp.Body, &apiResp)

assert.Equal(t, http.StatusOK, resp.Code)
Expand Down Expand Up @@ -258,7 +258,7 @@ func TestGetBlockByHash_ReturnsSuccessfully(t *testing.T) {
resp := httptest.NewRecorder()
ws.ServeHTTP(resp, req)

apiResp := blockResponse{}
apiResp := data.BlockApiResponse{}
loadResponse(resp.Body, &apiResp)

assert.Equal(t, http.StatusOK, resp.Code)
Expand Down
5 changes: 0 additions & 5 deletions api/groups/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ type InternalFacadeHandler interface {
GetInternalStartOfEpochValidatorsInfo(epoch uint32) (*data.ValidatorsInfoApiResponse, error)
}

// BlockAtlasFacadeHandler interface defines methods that can be used from facade context variable
type BlockAtlasFacadeHandler interface {
GetAtlasBlockByShardIDAndNonce(shardID uint32, nonce uint64) (data.AtlasBlock, error)
}

// HyperBlockFacadeHandler defines the actions needed for fetching the hyperblocks from the nodes
type HyperBlockFacadeHandler interface {
GetHyperBlockByNonce(nonce uint64, options common.HyperblockQueryOptions) (*data.HyperblockApiResponse, error)
Expand Down
6 changes: 0 additions & 6 deletions api/mock/facadeStub.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ type FacadeStub struct {
GetDirectStakedInfoCalled func() (*data.GenericAPIResponse, error)
GetDelegatedInfoCalled func() (*data.GenericAPIResponse, error)
GetRatingsConfigCalled func() (*data.GenericAPIResponse, error)
GetBlockByShardIDAndNonceHandler func(shardID uint32, nonce uint64) (data.AtlasBlock, error)
GetTransactionByHashAndSenderAddressHandler func(txHash string, sndAddr string, withResults bool) (*transaction.ApiTransactionResult, int, error)
GetBlockByHashCalled func(shardID uint32, hash string, options common.BlockQueryOptions) (*data.BlockApiResponse, error)
GetBlockByNonceCalled func(shardID uint32, nonce uint64, options common.BlockQueryOptions) (*data.BlockApiResponse, error)
Expand Down Expand Up @@ -443,11 +442,6 @@ func (f *FacadeStub) GetHeartbeatData() (*data.HeartbeatResponse, error) {
return f.GetHeartbeatDataHandler()
}

// GetAtlasBlockByShardIDAndNonce -
func (f *FacadeStub) GetAtlasBlockByShardIDAndNonce(shardID uint32, nonce uint64) (data.AtlasBlock, error) {
return f.GetBlockByShardIDAndNonceHandler(shardID, nonce)
}

// GetBlockByHash -
func (f *FacadeStub) GetBlockByHash(shardID uint32, hash string, options common.BlockQueryOptions) (*data.BlockApiResponse, error) {
return f.GetBlockByHashCalled(shardID, hash, options)
Expand Down
5 changes: 0 additions & 5 deletions cmd/proxy/config/apiConfig/v1_0.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ Routes = [
{ Name = "/by-round/:round", Secured = false, Open = true, RateLimit = 0 },
]

[APIPackages.block-atlas]
Routes = [
{ Name = "/:shard/:nonce", Secured = false, Open = true, RateLimit = 0 }
]

[APIPackages.proof]
Routes = [
{ Name = "/root-hash/:roothash/address/:address", Secured = false, Open = false, RateLimit = 0 },
Expand Down
5 changes: 0 additions & 5 deletions cmd/proxy/config/apiConfig/v_next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ Routes = [
{ Name = "/by-round/:round", Secured = false, Open = true, RateLimit = 0 },
]

[APIPackages.block-atlas]
Routes = [
{ Name = "/:shard/:nonce", Secured = false, Open = true, RateLimit = 0 }
]

[APIPackages.proof]
Routes = [
{ Name = "/root-hash/:roothash/address/:address", Secured = false, Open = false, RateLimit = 0 },
Expand Down
4 changes: 0 additions & 4 deletions cmd/proxy/config/external.toml

This file was deleted.

Loading

0 comments on commit 2e0e5bb

Please sign in to comment.