Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
fix: fix invalid gas limit conversion (#30)
Browse files Browse the repository at this point in the history
* Cleanup go.mod

* Move signature to separate package

* Add signature tests
  • Loading branch information
mpetrun5 authored Feb 13, 2023
1 parent 64b30d8 commit e6ed782
Show file tree
Hide file tree
Showing 11 changed files with 258 additions and 158 deletions.
19 changes: 10 additions & 9 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ import (
"net/http"
"time"

"github.com/ChainSafe/sygma-fee-oracle/util"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/ChainSafe/sygma-fee-oracle/config"
oracleErrors "github.com/ChainSafe/sygma-fee-oracle/errors"

"github.com/ChainSafe/sygma-fee-oracle/consensus"
oracleErrors "github.com/ChainSafe/sygma-fee-oracle/errors"
"github.com/ChainSafe/sygma-fee-oracle/identity"
"github.com/ChainSafe/sygma-fee-oracle/signature"
"github.com/ChainSafe/sygma-fee-oracle/store"
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"github.com/ChainSafe/sygma-fee-oracle/types"
"github.com/ChainSafe/sygma-fee-oracle/util"
)

type Handler struct {
Expand Down Expand Up @@ -94,7 +95,7 @@ func (h *Handler) getRate(c *gin.Context) {

dataTime := ter.Time
signedTime := time.Now().Unix()
endpointRespData := &FetchRateResp{
rate := &types.Rate{
BaseRate: fmt.Sprintf("%f", ber.Rate),
TokenRate: fmt.Sprintf("%f", ter.Rate),
DestinationChainGasPrice: gp.SafeGasPrice,
Expand All @@ -105,12 +106,12 @@ func (h *Handler) getRate(c *gin.Context) {
SignatureTimestamp: signedTime,
ExpirationTimestamp: h.dataExpirationManager(dataTime),
}
endpointRespData.Signature, err = h.rateSignature(endpointRespData, fromDomain.ID, resource.ID)
rate.Signature, err = signature.RateSignature(h.conf, rate, h.identity, fromDomain.ID, resource.ID)
if err != nil {
ginErrorReturn(c, http.StatusInternalServerError, newReturnErrorResp(&oracleErrors.InternalServerError, err))
return
}

endpointRespData.ResourceID = resource.ID
ginSuccessReturn(c, http.StatusOK, endpointRespData)
rate.ResourceID = resource.ID
ginSuccessReturn(c, http.StatusOK, rate)
}
13 changes: 8 additions & 5 deletions api/debugModeApi.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ import (
"strconv"
"time"

oracleErrors "github.com/ChainSafe/sygma-fee-oracle/errors"
"github.com/ChainSafe/sygma-fee-oracle/util"
"github.com/gin-gonic/gin"
"github.com/pkg/errors"

oracleErrors "github.com/ChainSafe/sygma-fee-oracle/errors"
"github.com/ChainSafe/sygma-fee-oracle/signature"
"github.com/ChainSafe/sygma-fee-oracle/types"
"github.com/ChainSafe/sygma-fee-oracle/util"
)

func (h *Handler) debugGetRate(c *gin.Context) {
Expand All @@ -34,7 +37,7 @@ func (h *Handler) debugGetRate(c *gin.Context) {
return
}

endpointRespData := &FetchRateResp{
rate := &types.Rate{
BaseRate: "0.000445",
TokenRate: "15.948864",
DestinationChainGasPrice: "2000000000",
Expand All @@ -48,11 +51,11 @@ func (h *Handler) debugGetRate(c *gin.Context) {
MsgGasLimit: msgGasLimitParam,
}

endpointRespData.Signature, err = h.rateSignature(endpointRespData, fromDomainID, resourceID)
rate.Signature, err = signature.RateSignature(h.conf, rate, h.identity, fromDomainID, resourceID)
if err != nil {
ginErrorReturn(c, http.StatusInternalServerError, newReturnErrorResp(&oracleErrors.InternalServerError, err))
return
}

ginSuccessReturn(c, http.StatusOK, endpointRespData)
ginSuccessReturn(c, http.StatusOK, rate)
}
78 changes: 0 additions & 78 deletions api/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,91 +4,13 @@
package api

import (
"bytes"
"encoding/hex"
"fmt"
"strconv"

"github.com/ChainSafe/sygma-fee-oracle/config"
"github.com/ChainSafe/sygma-fee-oracle/types"
"github.com/ChainSafe/sygma-fee-oracle/util"
"github.com/pkg/errors"
)

func (h *Handler) rateSignature(result *FetchRateResp, fromDomainID int, resourceID string) (string, error) {
fromDomainBaseCurrencyResourceId := config.ResourceIDBuilder(config.NativeCurrencyAddr, fromDomainID)
fromDomainBaseCurrencyDomainInfo, err := h.conf.ResourceDomainInfo(fromDomainBaseCurrencyResourceId, fromDomainID)
if err != nil {
return "", err
}
baseRate, err := util.Large2SmallUnitConverter(result.BaseRate, uint(fromDomainBaseCurrencyDomainInfo.Decimals))
if err != nil {
return "", errors.Wrap(err, "failed to convert BaseRate")
}
finalBaseEffectiveRate := util.PaddingZero(baseRate.Bytes(), 32)

tokenRateCurrencyDomainInfo, err := h.conf.ResourceDomainInfo(resourceID, fromDomainID)
if err != nil {
return "", err
}
tokenRate, err := util.Large2SmallUnitConverter(result.TokenRate, uint(tokenRateCurrencyDomainInfo.Decimals))
if err != nil {
return "", errors.Wrap(err, "failed to convert TokenRate")
}
finalTokenEffectiveRate := util.PaddingZero(tokenRate.Bytes(), 32)

gasPrice, err := util.Str2BigInt(result.DestinationChainGasPrice)
if err != nil {
return "", errors.Wrap(err, "failed to convert DestinationChainGasPrice")
}
finalGasPrice := util.PaddingZero(gasPrice.Bytes(), 32)

finalTimestamp := fmt.Sprintf("%064x", result.ExpirationTimestamp)
finalTimestampBytes, err := hex.DecodeString(finalTimestamp)
if err != nil {
return "", errors.Wrap(err, "failed to decode timestamp")
}

finalFromDomainId := util.PaddingZero([]byte{uint8(result.FromDomainID)}, 32)
finalToDomainId := util.PaddingZero([]byte{uint8(result.ToDomainID)}, 32)

finalResourceId, err := hex.DecodeString(resourceID[2:])
if err != nil {
return "", errors.Wrap(err, "failed to decode resourceID")
}

finalMsgGasLimit := fmt.Sprintf("%064x", result.MsgGasLimit)
finalMsgGasLimitBytes, err := hex.DecodeString(finalMsgGasLimit)
if err != nil {
return "", errors.Wrap(err, "failed to decode MsgGasLimit")
}

feeDataMessageByte := bytes.Buffer{}
feeDataMessageByte.Write(finalBaseEffectiveRate)
feeDataMessageByte.Write(finalTokenEffectiveRate)
feeDataMessageByte.Write(finalGasPrice)
feeDataMessageByte.Write(finalTimestampBytes)
feeDataMessageByte.Write(finalFromDomainId)
feeDataMessageByte.Write(finalToDomainId)
feeDataMessageByte.Write(finalResourceId)
feeDataMessageByte.Write(finalMsgGasLimitBytes)
feeDataRaw := feeDataMessageByte.Bytes()

signature, err := h.identity.Sign(feeDataRaw)
if err != nil {
return "", errors.Wrap(err, "failed to sign")
}

// modify v
// openzepplin is verifying if v is 27/28, need to manually add 27 to v
sigb := bytes.Buffer{}
sigb.Write(signature[:64])
sigb.WriteByte(byte(int8(signature[64]) + 27))
signature = sigb.Bytes()

return hex.EncodeToString(signature), nil
}

func (h *Handler) dataExpirationManager(baseTimestamp int64) int64 {
return baseTimestamp + h.conf.DataValidInterval
}
Expand Down
19 changes: 0 additions & 19 deletions api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,3 @@ func ginSuccessReturn(c *gin.Context, httpCode int, resp ReturnSuccessResponse)
"response": resp,
})
}

type FetchRateResp struct {
BaseRate string `json:"baseEffectiveRate"`
TokenRate string `json:"tokenEffectiveRate"`
DestinationChainGasPrice string `json:"dstGasPrice"`
Signature string `json:"signature"`
FromDomainID int `json:"fromDomainID"`
ToDomainID int `json:"toDomainID"`
ResourceID string `json:"resourceID"`
MsgGasLimit string `json:"msgGasLimit"`
// DataTimestamp represents the timestamp that the data is fetched from external services
DataTimestamp int64 `json:"dataTimestamp"`
// SignatureTimestamp represents the timestamp that the endpoint responses with the signature
SignatureTimestamp int64 `json:"signatureTimestamp"`
// ExpirationTimestamp represents the timestamp that the response data expires on the fee handler contract
ExpirationTimestamp int64 `json:"expirationTimestamp"`
// Indicator if the app is running in debug mode
Debug bool `json:"debug"`
}
8 changes: 5 additions & 3 deletions e2e/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import (
"io/ioutil"
"math/big"
"net/http"
"strconv"
"testing"

"github.com/ChainSafe/sygma-fee-oracle/identity/secp256k1"
"github.com/ChainSafe/sygma-fee-oracle/types"
"github.com/ethereum/go-ethereum/crypto"

"github.com/ChainSafe/sygma-fee-oracle/api"
"github.com/ChainSafe/sygma-fee-oracle/e2e/setup"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/stretchr/testify/suite"
Expand All @@ -25,7 +26,7 @@ import (
)

type apiRespGeneral struct {
Response api.FetchRateResp `json:"response"`
Response types.Rate `json:"response"`
}

type SignatureVerificationTestSuite struct {
Expand Down Expand Up @@ -87,7 +88,8 @@ func (s *SignatureVerificationTestSuite) TestSignatureVerification_CalculateFee(
finalResourceId, err := hex.DecodeString(response.Response.ResourceID[2:])
s.Nil(err)

finalMsgGasLimit := fmt.Sprintf("%064x", response.Response.MsgGasLimit)
gasLimit, _ := strconv.ParseUint(response.Response.MsgGasLimit, 10, 64)
finalMsgGasLimit := fmt.Sprintf("%064x", gasLimit)
finalMsgGasLimitBytes, err := hex.DecodeString(finalMsgGasLimit)
s.Nil(err)

Expand Down
14 changes: 1 addition & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ module github.com/ChainSafe/sygma-fee-oracle
go 1.17

require (
github.com/aws/aws-sdk-go-v2 v1.16.5
github.com/aws/aws-sdk-go-v2/config v1.15.10
github.com/aws/aws-sdk-go-v2/service/ssm v1.27.2
github.com/ethereum/go-ethereum v1.10.17
github.com/gin-gonic/gin v1.7.7
github.com/golang/mock v1.6.0
Expand All @@ -21,15 +18,6 @@ require (

require (
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.12.5 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.8 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.16.7 // indirect
github.com/aws/smithy-go v1.11.3 // indirect
github.com/btcsuite/btcd v0.20.1-beta // indirect
github.com/btcsuite/btcd/btcec/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -44,11 +32,11 @@ require (
github.com/go-stack/stack v1.8.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
Expand Down
26 changes: 0 additions & 26 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,14 @@ github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo=
github.com/aws/aws-sdk-go-v2 v1.16.5 h1:Ah9h1TZD9E2S1LzHpViBO3Jz9FPL5+rmflmb8hXirtI=
github.com/aws/aws-sdk-go-v2 v1.16.5/go.mod h1:Wh7MEsmEApyL5hrWzpDkba4gwAPc5/piwLVLFnCxp48=
github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y=
github.com/aws/aws-sdk-go-v2/config v1.15.10 h1:0HSMRNGlR0/WlGbeKC9DbBphBwRIK5H4cKUbgqNTKcA=
github.com/aws/aws-sdk-go-v2/config v1.15.10/go.mod h1:XL4DzwzWdwXBzKdwMdpLkMIaGEQCYRQyzA4UnJaUnNk=
github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo=
github.com/aws/aws-sdk-go-v2/credentials v1.12.5 h1:WNNCUTWA0vyMy5t8LfS4iB7QshsW0DsHS/VdhyCGZWM=
github.com/aws/aws-sdk-go-v2/credentials v1.12.5/go.mod h1:DOcdLlkqUiNGyXnjWgspC3eIAdXhj8q0pO1LiSvrTI4=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.6 h1:+NZzDh/RpcQTpo9xMFUgkseIam6PC+YJbdhbQp1NOXI=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.6/go.mod h1:ClLMcuQA/wcHPmOIfNzNI4Y1Q0oDbmEkbYhMFOzHDh8=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12 h1:Zt7DDk5V7SyQULUUwIKzsROtVzp/kVvcz15uQx/Tkow=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.12/go.mod h1:Afj/U8svX6sJ77Q+FPWMzabJ9QjbwP32YlopgKALUpg=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6 h1:eeXdGVtXEe+2Jc49+/vAzna3FAQnUD4AagAw8tzbmfc=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.6/go.mod h1:FwpAKI+FBPIELJIdmQzlLtRe8LQSOreMcM2wBsPMvvc=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.13 h1:L/l0WbIpIadRO7i44jZh1/XeXpNDX0sokFppb4ZnXUI=
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.13/go.mod h1:hiM/y1XPp3DoEPhoVEYc/CZcS58dP6RKJRDFp99wdX0=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6 h1:0ZxYAZ1cn7Swi/US55VKciCE6RhRHIwCKIWaMLdT6pg=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.6/go.mod h1:DxAPjquoEHf3rUHh1b9+47RAaXB8/7cB6jkzCt/GOEI=
github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4=
github.com/aws/aws-sdk-go-v2/service/ssm v1.27.2 h1:IwMA8ofrPLcXwDDx3tL2tbq/lknkfIvkzV385YZ4s/Q=
github.com/aws/aws-sdk-go-v2/service/ssm v1.27.2/go.mod h1:ylAyW8sgRF0k5BpxDhH9aAQej3yXBs6NYgn4HqENS4Y=
github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.8 h1:GNIdO14AHW5CgnzMml3Tg5Fy/+NqPQvnh1HsC1zpcPo=
github.com/aws/aws-sdk-go-v2/service/sso v1.11.8/go.mod h1:UqRD9bBt15P0ofRyDZX6CfsIqPpzeHOhZKWzgSuAzpo=
github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM=
github.com/aws/aws-sdk-go-v2/service/sts v1.16.7 h1:HLzjwQM9975FQWSF3uENDGHT1gFQm/q3QXu2BYIcI08=
github.com/aws/aws-sdk-go-v2/service/sts v1.16.7/go.mod h1:lVxTdiiSHY3jb1aeg+BBFtDzZGSUCv6qaNOyEGCJ1AY=
github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=
github.com/aws/smithy-go v1.11.3 h1:DQixirEFM9IaKxX1olZ3ke3nvxRS2xMDteKIDWxozW8=
github.com/aws/smithy-go v1.11.3/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
Expand Down Expand Up @@ -407,9 +383,7 @@ github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7Bd
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
Expand Down
6 changes: 1 addition & 5 deletions identity/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ func (o *OracleIdentityOperator) Sign(data []byte) ([]byte, error) {
return o.identity.Sign(data)
}

func (o *OracleIdentityOperator) GetOracleIdentityAlgoName() string {
return o.identity.Type()
}

func (o *OracleIdentityOperator) GetOracleIdentityAddress() string {
func (o *OracleIdentityOperator) IdentityAddress() string {
return o.identity.Address()
}
Loading

0 comments on commit e6ed782

Please sign in to comment.