Skip to content

Commit

Permalink
Upstream erigon V3.0.0-alpha1 (#453)
Browse files Browse the repository at this point in the history
* diag: thread-safety step1 - json marshal under mutex (erigontech#11134)

* diag: thread-safety step2 - unlock mutex in defer (erigontech#11135)

* diag: thread-safety step4 - remove dedicated shutdown listener goroutine (erigontech#11137)

reason: 
- we already have 1 goroutine for saving data:
```
func (d *DiagnosticClient) runSaveProcess(rootCtx context.Context) {
	ticker := time.NewTicker(5 * time.Minute)
	go func() {
		for {
			select {
			case <-ticker.C:
				d.SaveData()
			case <-rootCtx.Done():
				ticker.Stop()
				return
			}
		}
	}()
}
```
no reason to save it from one more goroutine. just save it right here -
in `case <-rootCtx.Done()` section. less concurrency - better.

rootContext already subscribed to sigterm

* diag: thread-safety step3 - `PeerStatistics.Clone()` and `PeerStats.mutex` (erigontech#11136)

Co-authored-by: dvovk <[email protected]>

* dl: manifest-verify green CI (erigontech#11142)

- skip `erigon2-v2` buckets - until
erigontech#10967

* bor: fix race in `LockedMilestoneIDs` access (erigontech#11139)

for erigontech#11129

* Diagnostics: refactor bulk execution thread safety (erigontech#11143)

* Call UnwindTo with tx instead of nil in sync_test.go (erigontech#11133)

Co-authored-by: antonis19 <[email protected]>

* Caplin: Tweaked CGO_Flags (erigontech#11144)

* diag: thread-safety step5 - race in speedtest (erigontech#11138)

- attempt to upgrade speedtest - to fix race:
showwin/speedtest-go#109 (comment)

It didn't help. Created:
showwin/speedtest-go#223

I see: 
```
==================
WARNING: DATA RACE
Write at 0x00c2167c2088 by goroutine 70275:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func1.1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:203 +0x84
  sync.(*Once).doSlow()
      /usr/local/go/src/sync/once.go:74 +0xf0
  sync.(*Once).Do()
      /usr/local/go/src/sync/once.go:65 +0x44
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:200 +0xb1

Previous read at 0x00c2167c2088 by goroutine 69927:
  github.com/showwin/speedtest-go/speedtest.(*DataChunk).Read()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:452 +0x64
  io.(*nopCloser).Read()
      <autogenerated>:1 +0x6c
  io.(*LimitedReader).Read()
      /usr/local/go/src/io/io.go:479 +0xc5
  io.copyBuffer()
      /usr/local/go/src/io/io.go:429 +0x29a
  io.Copy()
      /usr/local/go/src/io/io.go:388 +0x6f
  net.genericReadFrom()
      /usr/local/go/src/net/net.go:689 +0x12
  net.(*TCPConn).readFrom()
      /usr/local/go/src/net/tcpsock_posix.go:54 +0xc9
  net.(*TCPConn).ReadFrom()
      /usr/local/go/src/net/tcpsock.go:130 +0x64
  io.copyBuffer()
      /usr/local/go/src/io/io.go:415 +0x22e
  io.Copy()
      /usr/local/go/src/io/io.go:388 +0x95
  net/http.persistConnWriter.ReadFrom()
      /usr/local/go/src/net/http/transport.go:1824 +0x12
  bufio.(*Writer).ReadFrom()
      /usr/local/go/src/bufio/bufio.go:794 +0x2b0
  io.copyBuffer()
      /usr/local/go/src/io/io.go:415 +0x22e
  io.CopyBuffer()
      /usr/local/go/src/io/io.go:402 +0x8f
  net/http.(*transferWriter).doBodyCopy()
      /usr/local/go/src/net/http/transfer.go:416 +0x144
  net/http.(*transferWriter).writeBody()
      /usr/local/go/src/net/http/transfer.go:371 +0x75c
  net/http.(*Request).write()
      /usr/local/go/src/net/http/request.go:755 +0x1413
  net/http.(*persistConn).writeLoop()
      /usr/local/go/src/net/http/transport.go:2447 +0x379
  net/http.(*Transport).dialConn.gowrap3()
      /usr/local/go/src/net/http/transport.go:1800 +0x33

Goroutine 70275 (running) created at:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).rateCapture.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:267 +0x3ef
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).rateCapture.gowrap1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:279 +0x41

Goroutine 69927 (running) created at:
  net/http.(*Transport).dialConn()
      /usr/local/go/src/net/http/transport.go:1800 +0x27fe
  net/http.(*Transport).dialConnFor()
      /usr/local/go/src/net/http/transport.go:1485 +0x124
  net/http.(*Transport).queueForDial.gowrap1()
      /usr/local/go/src/net/http/transport.go:1449 +0x44
==================

==================
WARNING: DATA RACE
Write at 0x00c2167c2088 by goroutine 63832:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func1.1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:203 +0x84
  sync.(*Once).doSlow()
      /usr/local/go/src/sync/once.go:74 +0xf0
  sync.(*Once).Do()
      /usr/local/go/src/sync/once.go:65 +0x44
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:200 +0xb1

Previous read at 0x00c2167c2088 by goroutine 57836:
  github.com/showwin/speedtest-go/speedtest.(*DataChunk).DownloadHandler()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:408 +0x3ee
  github.com/showwin/speedtest-go/speedtest.downloadRequest()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:183 +0x624
  github.com/showwin/speedtest-go/speedtest.(*Server).downloadTestContext.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:119 +0x85
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func2()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:218 +0xca

Goroutine 63832 (running) created at:
  time.goFunc()
      /usr/local/go/src/time/sleep.go:177 +0x44

Goroutine 57836 (running) created at:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:212 +0x70a
  github.com/showwin/speedtest-go/speedtest.(*Server).downloadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:122 +0x2e8
  github.com/showwin/speedtest-go/speedtest.(*Server).DownloadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:109 +0x1ee
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).runSpeedTest()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:66 +0x1d2
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).setupSpeedtestDiagnostics.func1()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:35 +0xf2
==================
==================
WARNING: DATA RACE
Write at 0x00c2167c2068 by goroutine 63836:
  github.com/showwin/speedtest-go/speedtest.(*DataChunk).UploadHandler()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:440 +0x247
  github.com/showwin/speedtest-go/speedtest.uploadRequest()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:188 +0x113
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:150 +0x85
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func2()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:218 +0xca

Previous read at 0x00c2167c2068 by goroutine 63840:
  github.com/showwin/speedtest-go/speedtest.(*DataChunk).UploadHandler()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:438 +0x179
  github.com/showwin/speedtest-go/speedtest.uploadRequest()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:188 +0x113
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:150 +0x85
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func2()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:218 +0xca

Goroutine 63836 (running) created at:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:212 +0x70a
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:153 +0x2e8
  github.com/showwin/speedtest-go/speedtest.(*Server).UploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:140 +0x25c
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).runSpeedTest()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:71 +0x240
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).setupSpeedtestDiagnostics.func1()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:35 +0xf2

Goroutine 63840 (running) created at:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:212 +0x70a
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:153 +0x2e8
  github.com/showwin/speedtest-go/speedtest.(*Server).UploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:140 +0x25c
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).runSpeedTest()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:71 +0x240
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).setupSpeedtestDiagnostics.func1()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:35 +0xf2
==================
==================
WARNING: DATA RACE
Write at 0x00c2167c2068 by goroutine 63840:
  github.com/showwin/speedtest-go/speedtest.(*DataChunk).UploadHandler()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:440 +0x247
  github.com/showwin/speedtest-go/speedtest.uploadRequest()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:188 +0x113
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:150 +0x85
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func2()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:218 +0xca

Previous write at 0x00c2167c2068 by goroutine 63835:
  github.com/showwin/speedtest-go/speedtest.(*DataChunk).UploadHandler()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:440 +0x247
  github.com/showwin/speedtest-go/speedtest.uploadRequest()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:188 +0x113
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:150 +0x85
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start.func2()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:218 +0xca

Goroutine 63840 (running) created at:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:212 +0x70a
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:153 +0x2e8
  github.com/showwin/speedtest-go/speedtest.(*Server).UploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:140 +0x25c
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).runSpeedTest()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:71 +0x240
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).setupSpeedtestDiagnostics.func1()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:35 +0xf2

Goroutine 63835 (running) created at:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:212 +0x70a
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:153 +0x2e8
  github.com/showwin/speedtest-go/speedtest.(*Server).UploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:140 +0x25c
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).runSpeedTest()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:71 +0x240
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).setupSpeedtestDiagnostics.func1()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:35 +0xf2
==================
==================
WARNING: DATA RACE
Read at 0x00c2167c2100 by goroutine 63833:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).rateCapture.func1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:258 +0x1c6
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).rateCapture.gowrap1()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:279 +0x41

Previous write at 0x00c2167c2100 by goroutine 63888:
  sync/atomic.AddInt64()
      /usr/local/go/src/runtime/race_amd64.s:289 +0xb
  sync/atomic.AddInt64()
      <autogenerated>:1 +0x15
  io.(*nopCloser).Read()
      <autogenerated>:1 +0x6c
  io.(*LimitedReader).Read()
      /usr/local/go/src/io/io.go:479 +0xc5
  io.copyBuffer()
      /usr/local/go/src/io/io.go:429 +0x29a
  io.Copy()
      /usr/local/go/src/io/io.go:388 +0x6f
  net.genericReadFrom()
      /usr/local/go/src/net/net.go:689 +0x12
  net.(*TCPConn).readFrom()
      /usr/local/go/src/net/tcpsock_posix.go:54 +0xc9
  net.(*TCPConn).ReadFrom()
      /usr/local/go/src/net/tcpsock.go:130 +0x64
  io.copyBuffer()
      /usr/local/go/src/io/io.go:415 +0x22e
  io.Copy()
      /usr/local/go/src/io/io.go:388 +0x95
  net/http.persistConnWriter.ReadFrom()
      /usr/local/go/src/net/http/transport.go:1824 +0x12
  bufio.(*Writer).ReadFrom()
      /usr/local/go/src/bufio/bufio.go:794 +0x2b0
  io.copyBuffer()
      /usr/local/go/src/io/io.go:415 +0x22e
  io.CopyBuffer()
      /usr/local/go/src/io/io.go:402 +0x8f
  net/http.(*transferWriter).doBodyCopy()
      /usr/local/go/src/net/http/transfer.go:416 +0x144
  net/http.(*transferWriter).writeBody()
      /usr/local/go/src/net/http/transfer.go:371 +0x75c
  net/http.(*Request).write()
      /usr/local/go/src/net/http/request.go:755 +0x1413
  net/http.(*persistConn).writeLoop()
      /usr/local/go/src/net/http/transport.go:2447 +0x379
  net/http.(*Transport).dialConn.gowrap3()
      /usr/local/go/src/net/http/transport.go:1800 +0x33

Goroutine 63833 (running) created at:
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).rateCapture()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:253 +0x464
  github.com/showwin/speedtest-go/speedtest.(*TestDirection).Start()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/data_manager.go:195 +0x4a4
  github.com/showwin/speedtest-go/speedtest.(*Server).uploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:153 +0x2e8
  github.com/showwin/speedtest-go/speedtest.(*Server).UploadTestContext()
      /home/ubuntu/go/pkg/mod/github.com/showwin/[email protected]/speedtest/request.go:140 +0x25c
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).runSpeedTest()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:71 +0x240
  github.com/ledgerwatch/erigon-lib/diagnostics.(*DiagnosticClient).setupSpeedtestDiagnostics.func1()
      /home/ubuntu/erigon/erigon-lib/diagnostics/speedtest.go:35 +0xf2

Goroutine 63888 (running) created at:
  net/http.(*Transport).dialConn()
      /usr/local/go/src/net/http/transport.go:1800 +0x27fe
  net/http.(*Transport).dialConnFor()
      /usr/local/go/src/net/http/transport.go:1485 +0x124
  net/http.(*Transport).queueForDial.gowrap1()
      /usr/local/go/src/net/http/transport.go:1449 +0x44
==================
```
- also i don't understand why do we need cached client object
erigontech#10259

* rlpgen: step 1 (erigontech#11112)

- no behavior changes
- move encbuffer and encreader to `encbuffer.go`
- copy-paste rlpgen package

* bor: finality race - step 2 (erigontech#11151)

```
==================
WARNING: DATA RACE
Write at 0x00c015bf2208 by goroutine 110:
  github.com/ledgerwatch/erigon/polygon/bor/finality/whitelist.(*milestone).RemoveMilestoneID()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist/milestone.go:190 +0x164
  github.com/ledgerwatch/erigon/polygon/bor/finality.handleNoAckMilestone()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:237 +0x12c
  github.com/ledgerwatch/erigon/polygon/bor/finality.retryHeimdallHandler()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:159 +0x5c4
  github.com/ledgerwatch/erigon/polygon/bor/finality.RetryHeimdallHandler()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:117 +0x57
  github.com/ledgerwatch/erigon/polygon/bor/finality.startNoAckMilestoneService()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:102 +0x2a
  github.com/ledgerwatch/erigon/polygon/bor/finality.Whitelist.gowrap3()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:65 +0x17

Previous read at 0x00c015bf2208 by goroutine 109:
  github.com/ledgerwatch/erigon/polygon/bor/finality/whitelist.(*milestone).ProcessFutureMilestone()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist/milestone.go:277 +0x166
  github.com/ledgerwatch/erigon/polygon/bor/finality.handleMilestone()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:208 +0x1e5
  github.com/ledgerwatch/erigon/polygon/bor/finality.retryHeimdallHandler()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:159 +0x5c4
  github.com/ledgerwatch/erigon/polygon/bor/finality.RetryHeimdallHandler()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:117 +0x5c
  github.com/ledgerwatch/erigon/polygon/bor/finality.startMilestoneWhitelistService()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:93 +0x2a
  github.com/ledgerwatch/erigon/polygon/bor/finality.Whitelist.gowrap2()
      /home/ubuntu/erigon/polygon/bor/finality/whitelist.go:64 +0x17
```

* integration: wait for caplin snap open finish (erigontech#11124)

* rpc bottleneck: block files mutex (e3) (erigontech#11156)

for: erigontech#11090

thank you [tholcman](https://github.com/tholcman) for finding

* dl: use native `filepath.IsLocal` and `filepath.Clean` funcs (erigontech#11141)

they was vendored because of go1.19 compatibility which we dropped

* chore: confusing log (erigontech#11043)

* execution spec tests update for devnet-1 (erigontech#11127)

updating to version
[[email protected]](https://github.com/ethereum/execution-spec-tests/releases/tag/devnet-1%40v1.3.0)

- update to 7702: some extra json fields displayed in fixtures (rather
than just rlps)
- some refactoring to fixture json ordering means that a huge number of
test files were changed
- [refactor
requested](erigontech#10812 (comment))
by Alex done in this pr
[here](https://github.com/ledgerwatch/erigon/pull/11127/files#diff-8c398ef0a79f97ba6d497a99247a815b3a51918de9e16954215b6073f907c92e).

* Delete as not needed cmd/release/. (erigontech#11161)

Discussed with @AskAlexSharov

* Fix downloader completion set and races (erigontech#11182)

fixes: erigontech#11060

Also fixes several races, which should include: 

erigontech#11123
erigontech#11102

* chore: fix some comments (erigontech#11170)

Signed-off-by: stellrust <[email protected]>

* tests: auto-close temporal db (erigontech#11160)

* discovery table: revalidate race fix (erigontech#11159)

for erigontech#11158

* Caplin: Added POST `Validators`  (erigontech#11152)

close erigontech#11150

* diagnostics: refactor network peers mutex (erigontech#11178)

Refactor to pattern which was suggested by @AskAlexSharov 

- move business-logic inside private methods
- move mutex locking inside public methods
- call private methods from public. don't call public methods from
private.

* move interfaces from ledgerwatch to erigontech (erigontech#11194)

* increase snapshot semaphore default limit (erigontech#11193)

* p2p receipts (erigontech#11010)

closes erigontech#10320 and closes erigontech#11014

---------

Co-authored-by: JkLondon <[email protected]>
Co-authored-by: alex.sharov <[email protected]>

* Caplin: Optimization and Parallelization of processes and reduction of Goroutines (erigontech#11058)

Optimizations:

1) Single goroutine for tracking expiry of gossip subscriptions
2) tweaking of parameters on operations retention in cache
3) moving the dumping of BeaconState after forkchoice, so that we do not
mess up block times with I/O

* Caplin: Look for peers if not avaiable within subnet (erigontech#11057)

Actually look for peers of needed subnet for better performance on
holesky and mainnet

---------

Co-authored-by: Kewei <[email protected]>

* Downloader: Bump up defaults (erigontech#11197)

* `erigon_getLatestLogs` add limit parameter (erigontech#11095)

If user provides logCount param the API should returns logCount records,
even if the block contains more logs that satisfy the filter.
The logCount param is already supported, this PR avoids to return the
log records in excess.
Moreover I have created 14 integration tests for this API (run with
success on erigon2).

* refine ProcessBlock and ProcessBlindedBlock (erigontech#10923)

- Apply generic interface `GenericBlock` for blinded block and normal
block.
- Refine function `ProcessBlock()` so as to remove duplicated code.

* less logs on CI (erigontech#11122)

* revert logging of binary data (erigontech#11199)

* pool: do fsync by non-empty update (e3) (erigontech#11198)

for erigontech#11163

* engineapi: Fix req list check (erigontech#11191)

* make `latest seen blocks` visible earlier (erigontech#11204)

* move secp256k1 to erigontech (erigontech#11209)

* move erigon-snapshot to erigontech (erigontech#11213)

* replaced speedtest lib with our fork (erigontech#11217)

Replaced speed test lib with our for which uses erigon cloudflare webbed
to test download speed. I decided to change speedtest servers to erigon
servers as users can complain why there is traffic servers which is not
related to erigon infrastructure.
Our for of speedtest https://github.com/erigontech/speedtest

* Caplin: Better old-state pruning (erigontech#11219)

* Caplin: Remove TmpDB from `BlockCollector` (erigontech#11215)

Co-authored-by: Alex Sharov <[email protected]>

* upstrem

* Attempt to use go21  (erigontech#11207)

* post validator balances (erigontech#11218)

impl: erigontech#11055

* eth/stagedsync: polygon sync stage to use new heimdall service (erigontech#11196)

part 1 of erigontech#11186

* polygon/heimdall: remove old duplicate heimdall component (erigontech#11214)

part 2 of erigontech#11186

* enable `madv_normal` for .kv files of > 0 lvl (erigontech#11223)

enable `KV_MADV_NORMAL_NO_LAST_LVL=accounts,storage,code,commitment` by
default

* Move from ledgerwatch to erigontech (erigontech#11224)

* add log

* add log

* erigon-lib: tidy up slices,generics,cmp commons (erigontech#11216)

* Update module path of erigonwatch to erigontech (erigontech#11226)

* Fix previous download completion processing (erigontech#11227)

This fixes downloads stalling if a locally produced file appears not
downloaded
It also will re-complete hashes without re-downloading if the download
db is removed
It should also complete locally produced files when they are verified,
if not it will self mend on restart

---------

Co-authored-by: Giulio <[email protected]>
Co-authored-by: alex.sharov <[email protected]>

* Bring back dirs to  BaseAPI (erigontech#11228)

This PR brings back `datadir.Dirs` to `BaseAPI`, and removes a redundant
`Aggregator` argument to `EngineServer.Start` .

---------

Co-authored-by: antonis19 <[email protected]>

* Logs checking (erigontech#11229)

changed erigon api logs to e3 closes erigontech#11117

---------

Co-authored-by: JkLondon <[email protected]>
Co-authored-by: alex.sharov <[email protected]>

* ots: nil-ptr in rpc (erigontech#11232)

* txpool changes for set_code_tx support (erigontech#11235)

* Erigon 3.0: Smarter full and minimal nodes (erigontech#11220)

* add log

* add log

* added var inside WriteMap for chain-like interface (erigontech#11241)

closes erigontech#11202

---------

Co-authored-by: JkLondon <[email protected]>

* tracer: add support bailout on evm.create() (erigontech#11237)

Add bailout mgt on evm.create() method (it is already mgt on evm.cal()).
When approved I will create PR on rel 2.60.x

* added rpc info feature (erigontech#11242)

closes erigontech#11157 but a bit of scared that we probably don't have some
MetadataFromContext method like in
ethereum/go-ethereum#24255

Co-authored-by: JkLondon <[email protected]>

* [test] remove unused variables (erigontech#10938)

remove unused variables

* force fsync after notifications sent (erigontech#11244)

* Fixed nil pointer exception (erigontech#11253)

* fix panic due to nil validator set (erigontech#11260)

fix erigontech#11027
root cause: specific slot state data not found leads to empty validator
set

* qa-tests: increase test time of sync-from-scratch for minimal node (erigontech#11256)

the last few runs of the test did not complete on time

* qa-tests: fix sync-from-scratch test result uploading (erigontech#11245)

The test results are uploaded to the github actions test run page at the
end of the test. As this test has 2 jobs, we need to give the uploaded
test results different names to avoid clashes.

* Caplin: Add support for beacon snapshots (also stops relying on Engine API) (erigontech#11250)

I had to:

* Add Caplin snapshot download
* Fix Snapshot Downloader on Holesky
* Fixed Holesky's chainspec

* add log

* fix chapel bt hash

* rm prints (erigontech#11261)

* fix chapel bt hash

* Enable `madv_normal` for level0 .kv (erigontech#11265)

* HexOrDecimal - to accept unquoted numbers - in json (e3) (erigontech#11262)

accept in `genesis.json`:` "nonce": 0,`
now see: 
```
Fatal: invalid genesis file: json: cannot unmarshal number into Go struct field Genesis.alloc of type *math.HexOrDecimal64
```

See also `https://github.com/ethereum/go-ethereum/pull/26758`

* e3: make getLatest layers visible in pprof  (erigontech#11266)

* hack to prevent early download finish (erigontech#11267)

* add log

* add log

* add log

* add log

* add log

* add log

* add log

* add log

* add log

* Wire OverridePragueTime into txpool (erigontech#11234)

also extract common logic from `(p *TxPool) isShanghai()`, `isCancun()`,
`isPrague()`.

* readme update (erigontech#11275)

* diag: race in updateIndexingStatus  (erigontech#11274)

for erigontech#11268

* Bump version to 3.0.0-alpha1 (erigontech#11276)

Co-authored-by: yperbasis <[email protected]>

* fix body data

* fix goreleaser after update (erigontech#11281)

Fixes
https://github.com/erigontech/erigon/actions/runs/10041015251/job/27748204997#step:9:72
(caused by PR erigontech#10726 apparently). See also
https://github.com/goreleaser/goreleaser-cross-example/blob/master/Makefile

* fix body data

* fix body data

* bor: loopbreaker - to stop check `LoopBlockLimit` and rely on stage_headers progress (erigontech#11286)

* Special logs for near-chain-tip execution (erigontech#11288)

* fix upstream

* e3 use same goreleaser-cross version as in e2 (erigontech#11285)

- switched to `v1.21.5` 
- added to UI checkbox "Publish Artifacts" - which is disabled by
default. if not set: `make release-dry-run`

* add bool variable to auto-release  (erigontech#11290)

* on chain-tip: if batch is full - stop execution stage - to allow commit and reduce db size (erigontech#11287)

* add log

* PIP-35: enforce 25gwei gas config for all polygon chains (erigontech#11294)

Remove the checks for amoy added previously to prepare for mainnet
release.

Sets `txpool.pricelimit`, `miner.gasprice` and `gpo.ignoreprice` to
25gwei for all polygon based networks.

* refactor: rename fields in hex patricia trie (erigontech#11296)

Small refactor to improve the readability of some fields in the
`hex_patricia_hashed.go` .

Co-authored-by: antonis19 <[email protected]>

* add log

* add log

* add log

* new dirWalk for test purposes (erigontech#11277)

closes erigontech#10086 but it uses old lib
(https://github.com/karrick/godirwalk). This branch could be used for
tests for someone who experiences troubles with RAM with RemoveContents
func. (For example for this guy
https://discord.com/channels/687972960811745322/1233600171821240380)


Maybe we should fork this lib :) thing for future milestone

---------

Co-authored-by: JkLondon <[email protected]>
Co-authored-by: alex.sharov <[email protected]>

* chore: fix some comments (erigontech#11273)

Signed-off-by: yingshanghuangqiao <[email protected]>

* remove useless logs

---------

Signed-off-by: stellrust <[email protected]>
Signed-off-by: yingshanghuangqiao <[email protected]>
Co-authored-by: Alex Sharov <[email protected]>
Co-authored-by: dvovk <[email protected]>
Co-authored-by: antonis19 <[email protected]>
Co-authored-by: antonis19 <[email protected]>
Co-authored-by: Giulio rebuffo <[email protected]>
Co-authored-by: chuwt <[email protected]>
Co-authored-by: sudeep <[email protected]>
Co-authored-by: lystopad <[email protected]>
Co-authored-by: Mark Holt <[email protected]>
Co-authored-by: stellrust <[email protected]>
Co-authored-by: Andrew Ashikhmin <[email protected]>
Co-authored-by: awskii <[email protected]>
Co-authored-by: Ilya Mikheev <[email protected]>
Co-authored-by: JkLondon <[email protected]>
Co-authored-by: Kewei <[email protected]>
Co-authored-by: lupin012 <[email protected]>
Co-authored-by: Somnath <[email protected]>
Co-authored-by: milen <[email protected]>
Co-authored-by: LEE <[email protected]>
Co-authored-by: Michelangelo Riccobene <[email protected]>
Co-authored-by: VBulikov <[email protected]>
Co-authored-by: yperbasis <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: yingshanghuangqiao <[email protected]>
  • Loading branch information
1 parent 5c6f029 commit 00f899f
Show file tree
Hide file tree
Showing 1,924 changed files with 695,779 additions and 214,346 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ steps:
- command: './nightly.sh'
label: 'build & run geth'
env:
BUILDKITE_GOLANG_IMPORT_PATH: "github.com/ledgerwatch/erigon"
BUILDKITE_GOLANG_IMPORT_PATH: "github.com/erigontech/erigon"
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ smallest of fixes!
If you'd like to contribute to Erigon, please fork, fix, commit and send a
pull request for the maintainers to review and merge into the main code base. If
you wish to submit more complex changes though, please check up with the core
devs first on [Discord server](https://github.com/ledgerwatch/erigon#erigon-discord-server) to
devs first on [Discord server](https://github.com/erigontech/erigon#erigon-discord-server) to
ensure those changes are in line with the general philosophy of the project
and/or get some early feedback which can make both your efforts much lighter as
well as our review and merge procedures quick and simple.
Expand All @@ -30,11 +30,11 @@ Please make sure your contributions adhere to our coding guidelines:
Before you submit a feature request, please check and make sure that it isn't
possible through some other means. The JavaScript-enabled console is a powerful
feature in the right hands. Please check our
[Wiki page](https://github.com/ledgerwatch/erigon/wiki) for more info
[Wiki page](https://github.com/erigontech/erigon/wiki) for more info
and help.

## Configuration, dependencies, and tests

Please see the [Readme](https://github.com/ledgerwatch/erigon#readme) file
Please see the [Readme](https://github.com/erigontech/erigon#readme) file
for more details on configuring your environment, managing project dependencies
and testing procedures.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ labels: 'type:docs'
assignees: ''
---

This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation. For general questions please use [Erigon's discord](https://github.com/ledgerwatch/erigon#erigon-discord-server).
This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation. For general questions please use [Erigon's discord](https://github.com/erigontech/erigon#erigon-discord-server).
2 changes: 1 addition & 1 deletion .github/workflows/docker-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
make release-dry-run
docker images
# docker image push --all-tags thorax/erigon
# docker image push --all-tags ghcr.io/ledgerwatch/erigon
# docker image push --all-tags ghcr.io/erigontech/erigon
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${GITHUB_REF#refs/tags/}
Expand Down
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
4 changes: 2 additions & 2 deletions .github/workflows/qa-sync-from-scratch-minimal-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
jobs:
minimal-node-sync-from-scratch-test:
runs-on: self-hosted
timeout-minutes: 800
timeout-minutes: 1500 # 25 hours
env:
ERIGON_DATA_DIR: ${{ github.workspace }}/erigon_data
ERIGON_QA_PATH: /home/qarunner/erigon-qa
TRACKING_TIME_SECONDS: 7200 # 2 hours
TOTAL_TIME_SECONDS: 43200 # 12 hours
TOTAL_TIME_SECONDS: 86400 # 24 hours
CHAIN: mainnet

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qa-sync-from-scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
if: steps.test_step.outputs.test_executed == 'true'
uses: actions/upload-artifact@v4
with:
name: test-results
name: test-results-${{ env.CHAIN }}
path: ${{ github.workspace }}/result-${{ env.CHAIN }}.json

- name: Action for Success
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v1
uses: AdityaGarg8/remove-unwanted-software@v4
with:
remove-dotnet: 'true'
remove-android: 'true'
Expand All @@ -32,7 +32,7 @@ jobs:
fetch-depth: 0

- name: ghcr-login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -45,11 +45,11 @@ jobs:
echo "tag_name=${TAG}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- run: echo ${{ steps.prepare.outputs.tag_name }}

- name: Run GoReleaser
- name: Release
run: |
make release
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integration-caplin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
tests:
strategy:
matrix:
# disable macos-11 until https://github.com/ledgerwatch/erigon/issues/8789
# disable macos-11 until https://github.com/erigontech/erigon/issues/8789
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ linters:
- unused
- performance
disable:
- gosec # enable it after 1-2 weeks. it failing CI withoutt enough info to fix: https://github.com/ledgerwatch/erigon/actions/runs/5928644129/job/16074701625
- gosec # enable it after 1-2 weeks. it failing CI withoutt enough info to fix: https://github.com/erigontech/erigon/actions/runs/5928644129/job/16074701625
- exhaustive
- musttag
- contextcheck
Expand Down
2 changes: 1 addition & 1 deletion DEV_CHAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Steps to setup and run Erigon dev chain. This tutorial is made for macOS.
Open terminal 1 and type the following command

```bash
git clone --recurse-submodules -j8 https://github.com/ledgerwatch/erigon.git
git clone --recurse-submodules -j8 https://github.com/erigontech/erigon.git
cd erigon
make erigon
```
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://torquem.ch" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/ledgerwatch/erigon.git" \
org.label-schema.vcs-url="https://github.com/erigontech/erigon.git" \
org.label-schema.vendor="Torquem" \
org.label-schema.version=$VERSION

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://torquem.ch" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/ledgerwatch/erigon.git" \
org.label-schema.vcs-url="https://github.com/erigontech/erigon.git" \
org.label-schema.vendor="Torquem" \
org.label-schema.version=$VERSION

Expand Down
22 changes: 16 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,21 @@ CGO_CFLAGS += -DMDBX_DISABLE_VALIDATION=0 # Can disable it on CI by separated PR
#CGO_CFLAGS += -DMDBX_ENABLE_PROFGC=0 # Disabled by default, but may be useful for performance debugging
#CGO_CFLAGS += -DMDBX_ENABLE_PGOP_STAT=0 # Disabled by default, but may be useful for performance debugging
CGO_CFLAGS += -DMDBX_ENV_CHECKPID=0 # Erigon doesn't do fork() syscall
CGO_CFLAGS += -D__BLST_PORTABLE__
CGO_CFLAGS += -Wno-unknown-warning-option -Wno-enum-int-mismatch -Wno-strict-prototypes -Wno-unused-but-set-variable

# If it is arm64 or aarch64, then we need to use portable version of blst. use or with stringw "arm64" and "aarch64" to support both
ifeq ($(shell uname -m), arm64)
CGO_CFLAGS += -D__BLST_PORTABLE__
endif
ifeq ($(shell uname -m), aarch64)
CGO_CFLAGS += -D__BLST_PORTABLE__
endif


CGO_CFLAGS += -Wno-unknown-warning-option -Wno-enum-int-mismatch -Wno-strict-prototypes -Wno-unused-but-set-variable -O3

CGO_LDFLAGS := $(shell $(GO) env CGO_LDFLAGS 2> /dev/null)
CGO_LDFLAGS += -O3 -g

ifeq ($(shell uname -s), Darwin)
ifeq ($(filter-out 13.%,$(shell sw_vers --productVersion)),)
CGO_LDFLAGS += -mmacosx-version-min=13.3
Expand All @@ -44,7 +55,7 @@ GOPRIVATE = github.com/erigontech/silkworm-go

PACKAGE = github.com/node-real/bsc-erigon

GO_FLAGS += -trimpath -tags $(BUILD_TAGS) -buildvcs=false
GO_FLAGS += -trimpath -tags $(BUILD_TAGS) -buildvcs=false
GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}"

GOBUILD = CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" GOPRIVATE="$(GOPRIVATE)" $(GO) build $(GO_FLAGS)
Expand Down Expand Up @@ -281,7 +292,7 @@ release-dry-run: git-submodules
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--clean --skip-validate --skip-publish
--clean --skip=validate --skip=publish

.PHONY: release
release: git-submodules
Expand All @@ -294,8 +305,7 @@ release: git-submodules
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--clean --skip-validate

--clean --skip=validate

# since DOCKER_UID, DOCKER_GID are default initialized to the current user uid/gid,
# we need separate envvars to facilitate creation of the erigon user on the host OS.
Expand Down
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ An accessible and complete version of the documentation is available at **[erigo
**.
<br>

![Build status](https://github.com/ledgerwatch/erigon/actions/workflows/ci.yml/badge.svg) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ledgerwatch_erigon&metric=coverage)](https://sonarcloud.io/summary/new_code?id=ledgerwatch_erigon)
![Build status](https://github.com/erigontech/erigon/actions/workflows/ci.yml/badge.svg) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=erigontech_erigon&metric=coverage)](https://sonarcloud.io/summary/new_code?id=erigontech_erigon)

<!--ts-->

Expand All @@ -19,7 +19,7 @@ An accessible and complete version of the documentation is available at **[erigo
+ [Testnets](#testnets)
+ [Block Production](#block-production-pow-miner-or-pos-validator)
+ [Windows](#windows)
+ [GoDoc](https://godoc.org/github.com/ledgerwatch/erigon)
+ [GoDoc](https://godoc.org/github.com/erigontech/erigon)
+ [Beacon Chain](#beacon-chain-consensus-layer)
+ [Dev Chain](#dev-chain)
+ [Caplin (Internal Consensus Layer)](#caplin)
Expand Down Expand Up @@ -86,18 +86,18 @@ Building erigon requires both a Go (version 1.21 or later) and a C compiler (GCC
For building the latest release (this will be suitable for most users just wanting to run a node):

```sh
git clone --branch release/<x.xx> --single-branch https://github.com/ledgerwatch/erigon.git
git clone --branch release/<x.xx> --single-branch https://github.com/erigontech/erigon.git
cd erigon
make erigon
./build/bin/erigon
```

You can check [the list of releases](https://github.com/ledgerwatch/erigon/releases) for release notes.
You can check [the list of releases](https://github.com/erigontech/erigon/releases) for release notes.

For building the bleeding edge development branch:

```sh
git clone --recurse-submodules https://github.com/ledgerwatch/erigon.git
git clone --recurse-submodules https://github.com/erigontech/erigon.git
cd erigon
git checkout main
make erigon
Expand Down Expand Up @@ -181,7 +181,7 @@ If you would like to give Erigon a try, but do not have spare 2TB on your drive,
of the public testnets, Sepolia. It syncs much quicker, and does not take so much disk space:

```sh
git clone --recurse-submodules -j8 https://github.com/ledgerwatch/erigon.git
git clone --recurse-submodules -j8 https://github.com/erigontech/erigon.git
cd erigon
make erigon
./build/bin/erigon --datadir=<your_datadir> --chain=sepolia
Expand Down Expand Up @@ -363,7 +363,7 @@ Key features
============

<code>🔬 See more
detailed [overview of functionality and current limitations](https://ledgerwatch.github.io/turbo_geth_release.html). It
detailed [overview of functionality and current limitations](https://erigontech.github.io/turbo_geth_release.html). It
is being updated on recurring basis.</code>

### More Efficient State Storage
Expand All @@ -375,7 +375,7 @@ is being updated on recurring basis.</code>
**Preprocessing**. For some operations, Erigon uses temporary files to preprocess data before inserting it into the main
DB. That reduces write amplification and DB inserts are orders of magnitude quicker.

<code> 🔬 See our detailed ETL explanation [here](https://github.com/ledgerwatch/erigon-lib/blob/main/etl/README.md).</code>
<code> 🔬 See our detailed ETL explanation [here](https://github.com/erigontech/erigon-lib/blob/main/etl/README.md).</code>

**Plain state**.

Expand Down Expand Up @@ -522,7 +522,7 @@ sudo -u ${ERIGON_USER} DOCKER_UID=$(id -u ${ERIGON_USER}) DOCKER_GID=$(id -g ${E

Makefile creates the initial directories for erigon, prometheus and grafana. The PID namespace is shared between erigon
and rpcdaemon which is required to open Erigon's DB from another process (RPCDaemon local-mode).
See: https://github.com/ledgerwatch/erigon/pull/2392/files
See: https://github.com/erigontech/erigon/pull/2392/files

If your docker installation requires the docker daemon to run as root (which is by default), you will need to prefix
the command above with `sudo`. However, it is sometimes recommended running docker (and therefore its containers) as a
Expand Down Expand Up @@ -689,7 +689,7 @@ https://github.com/mathMakesArt/Erigon-on-RPi-4

### How to change db pagesize

[post](https://github.com/ledgerwatch/erigon/blob/main/cmd/integration/Readme.md#copy-data-to-another-db)
[post](https://github.com/erigontech/erigon/blob/main/cmd/integration/Readme.md#copy-data-to-another-db)


Getting in touch
Expand Down Expand Up @@ -744,7 +744,7 @@ Next tools show correct memory usage of Erigon:

### Blocks Execution is slow on cloud-network-drives

Please read https://github.com/ledgerwatch/erigon/issues/1516#issuecomment-811958891
Please read https://github.com/erigontech/erigon/issues/1516#issuecomment-811958891
In short: network-disks are bad for blocks execution - because blocks execution reading data from db non-parallel
non-batched way.

Expand Down Expand Up @@ -786,18 +786,17 @@ Supported networks: all (except Mumbai).
- E3 can execute 1 historical transaction - without executing it's block - because history/indices have
transaction-granularity, instead of block-granularity.
- E3 doesn't store Logs (aka Receipts) - it always re-executing historical txn (but it's cheaper then in E2 - see point
above). Known perf issues: https://github.com/ledgerwatch/erigon/issues/10747
above). Known perf issues: https://github.com/erigontech/erigon/issues/10747
- `--sync.loop.block.limit` is enabled by default. (Default: `5_000`.
Set `--sync.loop.block.limit=10_000 --batchSize=1g` to increase sync speed on good hardware).
Set `--sync.loop.block.limit=10_000 --batchSize=2g` to increase sync speed on good hardware).
- datadir/chaindata is small now - to prevent it's grow: we recommend set `--batchSize <= 2G`. And it's fine
to `rm -rf chaindata`
- can symlink/mount latest state to fast drive and history to cheap drive
- ArchiveNode is default. FullNode same as in E2: --prune=hrtc
- Archive Node is default. Full Node: `--prune.mode=full`, Minimal Node (EIP-4444): `--prune.mode=minimal`

### Known Problems of E3:

- don't `rm -rf downloader` - it will cause re-downloading of files: https://github.com/ledgerwatch/erigon/issues/10976
- `eth_getLogs` fields `index` always 0: https://github.com/ledgerwatch/erigon/issues/10324
- don't `rm -rf downloader` - it will cause re-downloading of files: https://github.com/erigontech/erigon/issues/10976

### E3 datadir structure

Expand Down
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ ERROR[03-24|13:49:53.343] Ethereum peer removal failed peer=bfa4a38e
```

The second error happens during the unwinding the `TxPool` stage. It has been reported in this
issue: https://github.com/ledgerwatch/erigon/issues/848
issue: https://github.com/erigontech/erigon/issues/848

```
ERROR[08-01|14:30:38.297] Demoting invalidated transaction hash="6ee8a8…92bf22"
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
"fmt"
"io"

libcommon "github.com/ledgerwatch/erigon-lib/common"
libcommon "github.com/erigontech/erigon-lib/common"

"github.com/ledgerwatch/erigon/crypto"
"github.com/erigontech/erigon/crypto"
)

// The ABI holds information about a contract's context and available
Expand Down
8 changes: 4 additions & 4 deletions accounts/abi/abi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ import (
"strings"
"testing"

libcommon "github.com/ledgerwatch/erigon-lib/common"
libcommon "github.com/erigontech/erigon-lib/common"

"github.com/ledgerwatch/erigon/common"
"github.com/ledgerwatch/erigon/common/math"
"github.com/ledgerwatch/erigon/crypto"
"github.com/erigontech/erigon/common"
"github.com/erigontech/erigon/common/math"
"github.com/erigontech/erigon/crypto"
)

const jsondata = `
Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/bind/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"errors"
"math/big"

libcommon "github.com/ledgerwatch/erigon-lib/common"
libcommon "github.com/erigontech/erigon-lib/common"

"github.com/ledgerwatch/erigon/core/types"
"github.com/ledgerwatch/erigon/crypto"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/crypto"
)

// ErrNoChainID is returned whenever the user failed to specify a chain id.
Expand Down
6 changes: 3 additions & 3 deletions accounts/abi/bind/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"errors"
"math/big"

libcommon "github.com/ledgerwatch/erigon-lib/common"
libcommon "github.com/erigontech/erigon-lib/common"

ethereum "github.com/ledgerwatch/erigon"
"github.com/ledgerwatch/erigon/core/types"
ethereum "github.com/erigontech/erigon"
"github.com/erigontech/erigon/core/types"
)

var (
Expand Down
Loading

0 comments on commit 00f899f

Please sign in to comment.