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

Commit

Permalink
limit batch record num while create catch up tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
kaifei committed Jan 20, 2020
1 parent 52aed2c commit c02f0be
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 22 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,4 @@ docker run --name rainbow-sync \&
```bash
db.sync_iris_task.insert({'start_height':NumberLong(17908),'end_height':NumberLong(0),'current_height':NumberLong(0),'status':'unhandled','last_update_time':NumberLong(1576208532)})
```
Then,start the rainbow-sync.
- synchronizes irishub data from 0 block height
Please pay attention to setting the appropriate value about BLOCK_NUM_PER_WORKER_HANDLE for mongodb batch limit(Maximum batch size is 1000.) when blockchain height reachs tens of millions.

Then,start the rainbow-sync.
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
module github.com/irisnet/rainbow-sync

go 1.13
go 1.13

require (
github.com/irisnet/irishub v0.16.0
github.com/jolestar/go-commons-pool v2.0.0+incompatible
github.com/tendermint/tendermint v0.32.8
go.uber.org/zap v1.13.0
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 // indirect
)
require (
github.com/irisnet/irishub v0.16.0
github.com/jolestar/go-commons-pool v2.0.0+incompatible
github.com/tendermint/tendermint v0.32.8
go.uber.org/zap v1.13.0
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 // indirect
)

replace (
github.com/tendermint/iavl => github.com/irisnet/iavl v0.12.3
github.com/tendermint/tendermint => github.com/irisnet/tendermint v0.32.1
golang.org/x/crypto => github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5
)
replace (
github.com/tendermint/iavl => github.com/irisnet/iavl v0.12.3
github.com/tendermint/tendermint => github.com/irisnet/tendermint v0.32.1
golang.org/x/crypto => github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5
)
Loading

0 comments on commit c02f0be

Please sign in to comment.