Skip to content

Commit 9e53e19

Browse files
committed
Merge branch 'main' of github.com:flare-foundation/flare-p-chain-indexer
2 parents eae53c8 + 7c3c4de commit 9e53e19

File tree

21 files changed

+177
-118
lines changed

21 files changed

+177
-118
lines changed

.github/workflows/go.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- name: Set up Go
17-
uses: actions/setup-go@v3
17+
uses: actions/setup-go@v5
1818
with:
19-
go-version: "1.18"
19+
go-version: "1.21"
2020

2121
- name: Download modules
2222
run: go mod download
2323

2424
- name: gofmt check
2525
run: ./gofmt-check.sh
2626

27-
- name: golangci-lint
28-
uses: golangci/golangci-lint-action@v2
29-
with:
30-
version: latest
31-
args: --timeout 5m0s
27+
# - name: golangci-lint
28+
# uses: golangci/golangci-lint-action@v7
29+
# with:
30+
# version: latest
31+
# args: --timeout 15m0s
3232

3333
- name: Build executables
3434
run: go build ./...

.vscode/launch.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
7+
{
8+
"name": "Launch Indexer (coston)",
9+
"type": "go",
10+
"request": "launch",
11+
"mode": "auto",
12+
"program": "${workspaceFolder}/indexer/main/indexer.go",
13+
"args": ["--config", "${workspaceFolder}/config.coston.toml"],
14+
"cwd": "${workspaceFolder}"
15+
},
816
{
917
"name": "Launch Indexer (costwo)",
1018
"type": "go",

database/pchain_entities.go

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,27 @@ import (
77
// Table with indexed data for a P-chain transaction
88
type PChainTx struct {
99
BaseEntity
10-
Type PChainTxType `gorm:"type:varchar(20);index"` // Transaction type
11-
TxID *string `gorm:"type:varchar(50);unique"` // Transaction ID
12-
BlockID string `gorm:"type:varchar(50);not null"` // Block ID
13-
BlockType PChainBlockType `gorm:"type:varchar(20)"` // Block type (proposal, accepted, rejected, etc.)
14-
RewardTxID string `gorm:"type:varchar(50)"` // Referred transaction id in case of reward validator tx
15-
BlockHeight uint64 `gorm:"index"` // Block height
16-
Timestamp time.Time // Time when indexed
17-
ChainID string `gorm:"type:varchar(50)"` // Filled in case of export or import transaction
18-
NodeID string `gorm:"type:varchar(50)"` // Filled in case of add delegator or validator transaction
19-
StartTime *time.Time `gorm:"index"` // Start time of validator or delegator (when NodeID is not null)
20-
EndTime *time.Time `gorm:"index"` // End time of validator or delegator (when NodeID is not null)
21-
Time *time.Time // Chain time (in case of advance time transaction)
22-
Weight uint64 // Weight (stake amount) (when NodeID is not null)
23-
RewardsOwner string `gorm:"type:varchar(60)"` // Rewards owner address (in case of add delegator or validator transaction)
24-
Memo string `gorm:"type:varchar(256)"`
25-
Bytes []byte `gorm:"type:mediumblob"`
26-
FeePercentage uint32 // Fee percentage (in case of add validator transaction)
27-
BlockTime *time.Time `gorm:"index"` // Block time, non-null from Banff block activation on (Avalanche 1.9.0)
10+
Type PChainTxType `gorm:"type:varchar(40);index"` // Transaction type
11+
TxID *string `gorm:"type:varchar(50);unique"` // Transaction ID
12+
BlockID string `gorm:"type:varchar(50);not null"` // Block ID
13+
BlockType PChainBlockType `gorm:"type:varchar(20)"` // Block type (proposal, accepted, rejected, etc.)
14+
RewardTxID string `gorm:"type:varchar(50)"` // Referred transaction id in case of reward validator tx
15+
BlockHeight uint64 `gorm:"index"` // Block height
16+
Timestamp time.Time // Time when indexed
17+
ChainID string `gorm:"type:varchar(50)"` // Filled in case of export or import transaction
18+
NodeID string `gorm:"type:varchar(50)"` // Filled in case of add delegator or validator transaction
19+
StartTime *time.Time `gorm:"index"` // Start time of validator or delegator (when NodeID is not null)
20+
EndTime *time.Time `gorm:"index"` // End time of validator or delegator (when NodeID is not null)
21+
Time *time.Time // Chain time (in case of advance time transaction)
22+
Weight uint64 // Weight (stake amount) (when NodeID is not null)
23+
RewardsOwner string `gorm:"type:varchar(60)"` // Rewards owner address (in case of add delegator or validator transaction)
24+
DelegationRewardsOwner string `gorm:"type:varchar(60)"` // Delegation rewards owner address (in case of add validator transaction)
25+
SubnetID string `gorm:"type:varchar(50)"` // Subnet ID (from Cortina update on, will be empty for pre-Cortina)
26+
SignerPublicKey *string `gorm:"type:varchar(256)"` // Signer public key (for PermissionlessStaker transactions)
27+
Memo string `gorm:"type:varchar(256)"`
28+
Bytes []byte `gorm:"type:mediumblob"`
29+
FeePercentage uint32 // Fee percentage (in case of add validator transaction)
30+
BlockTime *time.Time `gorm:"index"` // Block time, non-null from Banff block activation on (Avalanche 1.9.0)
2831
}
2932

3033
type PChainTxInput struct {

database/pchain_queries.go

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"time"
77

8+
"golang.org/x/exp/slices"
89
"gorm.io/gorm"
910
)
1011

@@ -43,7 +44,7 @@ func CreatePChainEntities(db *gorm.DB, txs []*PChainTx, ins []*PChainTxInput, ou
4344
// - if nodeID is not empty, only returns transactions where the given node ID is the validator node ID
4445
func FetchPChainStakingTransactions(
4546
db *gorm.DB,
46-
txType PChainTxType,
47+
txTypes []PChainTxType,
4748
nodeID string,
4849
address string,
4950
time time.Time,
@@ -52,8 +53,10 @@ func FetchPChainStakingTransactions(
5253
) ([]string, error) {
5354
var validatorTxs []PChainTx
5455

55-
if txType != PChainAddValidatorTx && txType != PChainAddDelegatorTx {
56-
return nil, errInvalidTransactionType
56+
for _, txType := range txTypes {
57+
if !slices.Contains(PChainStakingTransactions[:], txType) {
58+
return nil, errInvalidTransactionType
59+
}
5760
}
5861
if limit <= 0 {
5962
limit = 100
@@ -62,7 +65,7 @@ func FetchPChainStakingTransactions(
6265
offset = 0
6366
}
6467

65-
query := db.Where(&PChainTx{Type: txType})
68+
query := db.Where("type IN ?", txTypes)
6669
if len(nodeID) > 0 {
6770
query = query.Where("node_id = ?", nodeID)
6871
}
@@ -87,7 +90,7 @@ func FetchPChainStakingTransactions(
8790
func FetchPChainStakingData(
8891
db *gorm.DB,
8992
time time.Time,
90-
txType PChainTxType,
93+
txTypes []PChainTxType,
9194
offset int,
9295
limit int,
9396
) ([]PChainTxData, error) {
@@ -104,7 +107,7 @@ func FetchPChainStakingData(
104107
Table("p_chain_txes").
105108
Joins("left join p_chain_tx_inputs as inputs on inputs.tx_id = p_chain_txes.tx_id").
106109
Where("start_time <= ?", time).Where("? <= end_time", time).
107-
Where("type = ?", txType).
110+
Where("type IN ?", txTypes).
108111
Group("p_chain_txes.id").
109112
Order("p_chain_txes.id").Offset(offset).Limit(limit).
110113
Select("p_chain_txes.*, group_concat(distinct(inputs.address)) as input_address").
@@ -238,7 +241,7 @@ func FetchPChainVotingData(db *gorm.DB, from time.Time, to time.Time) ([]PChainT
238241
query := db.
239242
Table("p_chain_txes").
240243
Joins("left join p_chain_tx_inputs as inputs on inputs.tx_id = p_chain_txes.tx_id").
241-
Where("type = ? OR type = ?", PChainAddValidatorTx, PChainAddDelegatorTx).
244+
Where("type IN ?", PChainStakingTransactions).
242245
Where("start_time >= ?", from).Where("start_time < ?", to).
243246
Select("p_chain_txes.*, inputs.address as input_address, inputs.in_idx as input_index").
244247
Scan(&data)
@@ -258,10 +261,7 @@ func GetPChainTxsForEpoch(in *GetPChainTxsForEpochInput) ([]PChainTxData, error)
258261
Joins("left join p_chain_tx_inputs as inputs on inputs.tx_id = p_chain_txes.tx_id").
259262
Where("p_chain_txes.start_time >= ?", in.StartTimestamp).
260263
Where("p_chain_txes.start_time < ?", in.EndTimestamp).
261-
Where(
262-
in.DB.Where("p_chain_txes.type = ?", PChainAddDelegatorTx).
263-
Or("p_chain_txes.type = ?", PChainAddValidatorTx),
264-
).
264+
Where("p_chain_txes.type IN ?", PChainStakingTransactions).
265265
Select("p_chain_txes.*, inputs.address as input_address, inputs.in_idx as input_index").
266266
Find(&txs).
267267
Error
@@ -273,13 +273,15 @@ func GetPChainTxsForEpoch(in *GetPChainTxsForEpochInput) ([]PChainTxData, error)
273273
}
274274

275275
// Fetches all P-chain staking transactions of type txType intersecting the given time interval
276-
func FetchNodeStakingIntervals(db *gorm.DB, txType PChainTxType, startTime time.Time, endTime time.Time) ([]PChainTx, error) {
277-
if txType != PChainAddValidatorTx && txType != PChainAddDelegatorTx {
278-
return nil, errInvalidTransactionType
276+
func FetchNodeStakingIntervals(db *gorm.DB, txTypes []PChainTxType, startTime time.Time, endTime time.Time) ([]PChainTx, error) {
277+
for _, txType := range txTypes {
278+
if !slices.Contains(PChainStakingTransactions[:], txType) {
279+
return nil, errInvalidTransactionType
280+
}
279281
}
280282

281283
var txs []PChainTx
282-
err := db.Where(&PChainTx{Type: txType}).
284+
err := db.Where("type IN ?", txTypes).
283285
Where("start_time <= ?", endTime).
284286
Where("end_time >= ?", startTime).
285287
Find(&txs).Error

database/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const (
3030
PChainUnknownTx PChainTxType = "UNKNOWN_TX"
3131
)
3232

33+
var PChainStakingTransactions = [...]PChainTxType{PChainAddValidatorTx, PChainAddDelegatorTx, PChainAddPermissionlessValidatorTx, PChainAddPermissionlessDelegatorTx}
34+
3335
type PChainBlockType string
3436

3537
const (

dockerfile.indexer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# build executable
2-
FROM golang:1.18 AS builder
2+
FROM golang:1.21 AS builder
33

44
WORKDIR /build
55

dockerfile.services

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# build executable
2-
FROM golang:1.18 AS builder
2+
FROM golang:1.21 AS builder
33

44
WORKDIR /build
55

go.mod

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ go 1.21
44

55
require (
66
github.com/BurntSushi/toml v1.2.1
7-
github.com/ava-labs/avalanchego v1.9.7
8-
github.com/ava-labs/coreth v0.11.6-rc.0
7+
github.com/ava-labs/avalanchego v1.10.0
8+
github.com/ava-labs/coreth v0.12.0-rc.2
99
github.com/bradleyjkemp/cupaloy v2.3.0+incompatible
1010
github.com/davidebianchi/gswagger v0.9.0
1111
github.com/deckarep/golang-set/v2 v2.1.0
@@ -30,6 +30,7 @@ require (
3030
)
3131

3232
require (
33+
github.com/DataDog/zstd v1.5.2 // indirect
3334
github.com/NYTimes/gziphandler v1.1.1 // indirect
3435
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
3536
github.com/beorn7/perks v1.0.1 // indirect
@@ -39,8 +40,7 @@ require (
3940
github.com/cespare/xxhash/v2 v2.2.0 // indirect
4041
github.com/davecgh/go-spew v1.1.1 // indirect
4142
github.com/deckarep/golang-set v1.8.0 // indirect
42-
github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 // indirect
43-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
43+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
4444
github.com/ghodss/yaml v1.0.0 // indirect
4545
github.com/go-logr/logr v1.2.3 // indirect
4646
github.com/go-logr/stdr v1.2.2 // indirect
@@ -72,11 +72,12 @@ require (
7272
github.com/mr-tron/base58 v1.2.0 // indirect
7373
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
7474
github.com/perimeterx/marshmallow v1.1.4 // indirect
75+
github.com/pires/go-proxyproto v0.6.2 // indirect
7576
github.com/pmezard/go-difflib v1.0.0 // indirect
7677
github.com/prometheus/client_model v0.3.0 // indirect
7778
github.com/prometheus/common v0.39.0 // indirect
7879
github.com/prometheus/procfs v0.9.0 // indirect
79-
github.com/rjeczalik/notify v0.9.2 // indirect
80+
github.com/rjeczalik/notify v0.9.3 // indirect
8081
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
8182
github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 // indirect
8283
github.com/spaolacci/murmur3 v1.1.0 // indirect

go.sum

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
3535
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
3636
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
3737
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
38+
github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
39+
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
3840
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
3941
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
4042
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
@@ -44,10 +46,10 @@ github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBA
4446
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
4547
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
4648
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
47-
github.com/ava-labs/avalanchego v1.9.7 h1:f2vS8jUBZmrqPcfU5NEa7dSHXbKfTB0EyjcCyvqxqPw=
48-
github.com/ava-labs/avalanchego v1.9.7/go.mod h1:ckdSQHeoRN6PmQ3TLgWAe6Kh9tFpU4Lu6MgDW4GrU/Q=
49-
github.com/ava-labs/coreth v0.11.6-rc.0 h1:P8g/vqVx7nZBUHhM95oq9bcsY37P1Y7NNVb7RPe0mW8=
50-
github.com/ava-labs/coreth v0.11.6-rc.0/go.mod h1:xgjjJdl50zhHlWPP+3Ux5LxfvFcbSG60tGK6QUkFDhI=
49+
github.com/ava-labs/avalanchego v1.10.0 h1:Rn6Nyd62OkzQG5QpCgtCGVXtjuiaEzxV000kqG9aUIg=
50+
github.com/ava-labs/avalanchego v1.10.0/go.mod h1:hTaSLGN4y/EmhmYd+yjUj9Lsm00q70V78jOYDdnLrgQ=
51+
github.com/ava-labs/coreth v0.12.0-rc.2 h1:UNyGhuC2HxZ8eCLZiZON8xRiJkNHVZ75zknu/xqkKBA=
52+
github.com/ava-labs/coreth v0.12.0-rc.2/go.mod h1:ZGhoIZTWbIaTmzEbprXu0hLtLdoE2PSTEFnCTYr0BRk=
5153
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
5254
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
5355
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -114,14 +116,11 @@ github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsP
114116
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
115117
github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI=
116118
github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
117-
github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyLRN07EO0cNBV6DGU=
118-
github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
119119
github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
120120
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
121-
github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317hnwiq58Filgag2xw=
122-
github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
123-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=
124121
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
122+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4=
123+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc=
125124
github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
126125
github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=
127126
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
@@ -349,6 +348,8 @@ github.com/onsi/gomega v1.24.0 h1:+0glovB9Jd6z3VR+ScSwQqXVTIfJcGA9UBM8yzQxhqg=
349348
github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg=
350349
github.com/perimeterx/marshmallow v1.1.4 h1:pZLDH9RjlLGGorbXhcaQLhfuV0pFMNfPO55FuFkxqLw=
351350
github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw=
351+
github.com/pires/go-proxyproto v0.6.2 h1:KAZ7UteSOt6urjme6ZldyFm4wDe/z0ZUP0Yv0Dos0d8=
352+
github.com/pires/go-proxyproto v0.6.2/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY=
352353
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
353354
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
354355
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -366,8 +367,8 @@ github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38i
366367
github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4=
367368
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
368369
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
369-
github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8=
370-
github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM=
370+
github.com/rjeczalik/notify v0.9.3 h1:6rJAzHTGKXGj76sbRgDiDcYj/HniypXmSJo1SWakZeY=
371+
github.com/rjeczalik/notify v0.9.3/go.mod h1:gF3zSOrafR9DQEWSE8TjfI9NkooDxbyT4UgRGKZA0lc=
371372
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
372373
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
373374
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=

indexer/cronjob/mirror.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"strings"
1414
"time"
1515

16-
"github.com/ava-labs/avalanchego/utils/crypto"
16+
"github.com/ava-labs/avalanchego/utils/crypto/secp256k1"
1717
mapset "github.com/deckarep/golang-set/v2"
1818
"github.com/pkg/errors"
1919
)
@@ -43,7 +43,7 @@ type mirrorContracts interface {
4343
merkleProof [][32]byte,
4444
) error
4545
IsAddressRegistered(address string) (bool, error)
46-
RegisterPublicKey(publicKey crypto.PublicKey) error
46+
RegisterPublicKey(publicKey *secp256k1.PublicKey) error
4747
EpochConfig() (time.Time, time.Duration, error)
4848
}
4949

0 commit comments

Comments
 (0)