Skip to content

Commit

Permalink
move erigon-snapshot to erigontech (#11213)
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis authored Jul 17, 2024
1 parent 1b10799 commit ff4f4df
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
# with:
# fetch-depth: 2 # Ensures we fetch enough history to compare
#
# - name: Is ledgerwatch/erigon-snapshot updated in go.mod # if not, pipeline should exit beacuse grep exit code >0 when no match
# - name: Is erigontech/erigon-snapshot updated in go.mod # if not, pipeline should exit because grep exit code >0 when no match
# run: |
# git diff HEAD~1 HEAD -- go.mod | grep 'github.com/ledgerwatch/erigon-snapshot'
# git diff HEAD~1 HEAD -- go.mod | grep 'github.com/erigontech/erigon-snapshot'

ManifestCheck:
# needs: check-snap-modifications
Expand Down
6 changes: 3 additions & 3 deletions cmd/downloader/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Use `--snap.keepblocks=true` to don't delete retired blocks from DB
Any network/chain can start with snapshot sync:

- node will download only snapshots registered in next
repo https://github.com/ledgerwatch/erigon-snapshot
repo https://github.com/erigontech/erigon-snapshot
- node will move old blocks from DB to snapshots of 1K blocks size, then merge
snapshots to bigger range, until
snapshots of 500K blocks, then automatically start seeding new snapshot
Expand All @@ -75,7 +75,7 @@ erigon snapshots retire --datadir=<your_datadir>
# Create .torrent files (you can think about them as "checksum")
downloader torrent_create --datadir=<your_datadir>

# output format is compatible with https://github.com/ledgerwatch/erigon-snapshot
# output format is compatible with https://github.com/erigontech/erigon-snapshot
downloader torrent_hashes --datadir=<your_datadir>

# Start downloader (read all .torrent files, and download/seed data)
Expand Down Expand Up @@ -111,7 +111,7 @@ can be created 4 ways:
Erigon does:

- connect to Downloader
- share list of hashes (see https://github.com/ledgerwatch/erigon-snapshot )
- share list of hashes (see https://github.com/erigontech/erigon-snapshot )
- wait for download of all snapshots
- when .seg available - automatically create .idx files - secondary indices, for
example to find block by hash
Expand Down
2 changes: 1 addition & 1 deletion cmd/downloader/torrent_hashes_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ fi
# /dev/null to avoid logging of insecure git output
#SSH_CMD='echo ${GH_TOKEN} | ssh -i /dev/stdin -o IdentitiesOnly=yes'
SSH_CMD="ssh -i ${GH_TOKEN_FILE} -o IdentitiesOnly=yes"
GIT_SSH_COMMAND=${SSH_CMD} git push git@github.com:ledgerwatch/erigon-snapshot.git auto >/dev/null 2>&1
GIT_SSH_COMMAND=${SSH_CMD} git push git@github.com:erigontech/erigon-snapshot.git auto >/dev/null 2>&1
echo "Done"
10 changes: 6 additions & 4 deletions erigon-lib/chain/snapcfg/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ import (
"strconv"
"strings"

"github.com/ledgerwatch/erigon-lib/chain/networkname"
"github.com/ledgerwatch/erigon-lib/downloader/snaptype"
snapshothashes "github.com/ledgerwatch/erigon-snapshot"
"github.com/ledgerwatch/erigon-snapshot/webseed"
"github.com/pelletier/go-toml/v2"
"github.com/tidwall/btree"

snapshothashes "github.com/erigontech/erigon-snapshot"
"github.com/erigontech/erigon-snapshot/webseed"

"github.com/ledgerwatch/erigon-lib/chain/networkname"
"github.com/ledgerwatch/erigon-lib/downloader/snaptype"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/downloader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The sections below describe the roles of the various control structures shown in

## chain.toml

This is an embedded file which gets its contents from the [erigon snapshots repository](https://github.com/ledgerwatch/erigon-snapshot) during the erigon build process. It contains
This is an embedded file which gets its contents from the [erigon snapshots repository](https://github.com/erigontech/erigon-snapshot) during the erigon build process. It contains
the `well know` hash for a particular segment file in the following format.

```toml
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ go 1.21.0
toolchain go1.22.4

require (
github.com/erigontech/erigon-snapshot v1.3.1-0.20240717150728-8e0fa991b894
github.com/erigontech/interfaces v0.0.0-20240716134413-fc4152088ee6
github.com/erigontech/mdbx-go v0.38.4
github.com/erigontech/secp256k1 v1.1.0
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240705135436-5d6d882b41f7
github.com/rs/dnscache v0.0.0-20211102005908-e0241e321417
)

Expand Down
12 changes: 6 additions & 6 deletions erigon-lib/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/erigontech/interfaces v0.0.0-20240716134413-fc4152088ee6 h1:R1AYJT2FeMEwvBcAuYw7QTezk8DpXTQjCN1y5o0YBvI=
github.com/erigontech/interfaces v0.0.0-20240716134413-fc4152088ee6/go.mod h1:N7OUkhkcagp9+7yb4ycHsG2VWCOmuJ1ONBecJshxtLE=
github.com/erigontech/mdbx-go v0.38.4 h1:S9T7mTe9KPcFe4dOoOtVdI6gPzht9y7wMnYfUBgrQLo=
github.com/erigontech/mdbx-go v0.38.4/go.mod h1:IcOLQDPw3VM/asP6T5JVPPN4FHHgJtY16XfYjzWKVNI=
github.com/erigontech/secp256k1 v1.1.0 h1:mO3YJMUSoASE15Ya//SoHiisptUhdXExuMUN1M0X9qY=
github.com/erigontech/secp256k1 v1.1.0/go.mod h1:GokhPepsMB+EYDs7I5JZCprxHW6+yfOcJKaKtoZ+Fls=
github.com/erigontech/torrent v1.54.2-alpha-30 h1:LUk4fTwx4FAmH3Jf5+hQ48CmAHVNKu5DXnGsMZsiIHw=
github.com/erigontech/torrent v1.54.2-alpha-30/go.mod h1:QtK2WLdEz1Iy1Dh/325UltdHU0nA1xujh2rN6aov6y0=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
Expand Down Expand Up @@ -280,12 +284,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240705135436-5d6d882b41f7 h1:N5yRJ5N5/LIVXFktADDEb6TvlwlIsZTZT0OSGb/rDg4=
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240705135436-5d6d882b41f7/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo=
github.com/erigontech/interfaces v0.0.0-20240716134413-fc4152088ee6 h1:R1AYJT2FeMEwvBcAuYw7QTezk8DpXTQjCN1y5o0YBvI=
github.com/erigontech/interfaces v0.0.0-20240716134413-fc4152088ee6/go.mod h1:N7OUkhkcagp9+7yb4ycHsG2VWCOmuJ1ONBecJshxtLE=
github.com/erigontech/secp256k1 v1.1.0 h1:mO3YJMUSoASE15Ya//SoHiisptUhdXExuMUN1M0X9qY=
github.com/erigontech/secp256k1 v1.1.0/go.mod h1:GokhPepsMB+EYDs7I5JZCprxHW6+yfOcJKaKtoZ+Fls=
github.com/erigontech/erigon-snapshot v1.3.1-0.20240717150728-8e0fa991b894 h1:7ykEB96Z1HUYBuvAiawJkdXSvsmp1uv0BrGDhTD5nOA=
github.com/erigontech/erigon-snapshot v1.3.1-0.20240717150728-8e0fa991b894/go.mod h1:ooHlCl+eEYzebiPu+FP6Q6SpPUeMADn8Jxabv3IKb9M=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
Expand Down
4 changes: 2 additions & 2 deletions erigon-lib/seg/compress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func TestCompressDict1(t *testing.T) {

if cs := checksum(d.filePath); cs != 3153486123 {
// it's ok if hash changed, but need re-generate all existing snapshot hashes
// in https://github.com/ledgerwatch/erigon-snapshot
// in https://github.com/erigontech/erigon-snapshot
t.Errorf("result file hash changed, %d", cs)
}
}
Expand Down Expand Up @@ -266,7 +266,7 @@ func TestCompressDictCmp(t *testing.T) {

if cs := checksum(d.filePath); cs != 3153486123 {
// it's ok if hash changed, but need re-generate all existing snapshot hashes
// in https://github.com/ledgerwatch/erigon-snapshot
// in https://github.com/erigontech/erigon-snapshot
t.Errorf("result file hash changed, %d", cs)
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ require (
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/erigontech/erigon-snapshot v1.3.1-0.20240717150728-8e0fa991b894 // indirect
github.com/flynn/noise v1.1.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
Expand All @@ -188,7 +189,6 @@ require (
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240705135436-5d6d882b41f7 // indirect
github.com/ledgerwatch/erigonwatch v0.1.0
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3P
github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240705135436-5d6d882b41f7 h1:N5yRJ5N5/LIVXFktADDEb6TvlwlIsZTZT0OSGb/rDg4=
github.com/ledgerwatch/erigon-snapshot v1.3.1-0.20240705135436-5d6d882b41f7/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo=
github.com/erigontech/erigon-snapshot v1.3.1-0.20240717150728-8e0fa991b894 h1:7ykEB96Z1HUYBuvAiawJkdXSvsmp1uv0BrGDhTD5nOA=
github.com/erigontech/erigon-snapshot v1.3.1-0.20240717150728-8e0fa991b894/go.mod h1:ooHlCl+eEYzebiPu+FP6Q6SpPUeMADn8Jxabv3IKb9M=
github.com/ledgerwatch/erigonwatch v0.1.0 h1:TrCjklOu9ZI9/uiMigo1Jnknnk1I/dXUxXymA3xHfzo=
github.com/ledgerwatch/erigonwatch v0.1.0/go.mod h1:uYq4hs3RL1OtIYRXAxYq02tpdGkx6rtXlpzdazDDbWI=
github.com/erigontech/secp256k1 v1.1.0 h1:mO3YJMUSoASE15Ya//SoHiisptUhdXExuMUN1M0X9qY=
Expand Down

0 comments on commit ff4f4df

Please sign in to comment.