Commit Graph

328 Commits

Author SHA1 Message Date
Alex Sharov
6d9a4f4d94
rpcdaemon: must not create db - because doesn't know right parameters (#8445) 2023-10-12 14:11:46 +07:00
Somnath
66fe74dd12
Re-enable non-EIP155 unprotected txns (#8400)
Refer to linked issue https://github.com/ledgerwatch/erigon/issues/8381
2023-10-08 08:18:14 +07:00
Alex Sharov
f7adc2374d
don't try to create default datadir (#8398)
for https://github.com/ledgerwatch/erigon/issues/8396
2023-10-08 08:16:57 +07:00
Alex Sharov
7dd678896a
downloader: move from snapshots/db to snapshots/downloader (#8375) 2023-10-05 14:25:00 +07:00
Alex Sharov
fa3b8c23b2
Downloader: step towards more complex datadir (#8286)
migration included - no manual actions required
2023-10-04 11:01:02 +07:00
Mark Holt
9dfc8e0bde
Only reduce the consensus db size based on flags values (#8321)
This is to fix an issue with resource usage if the db.size.limit is
increased from its default setting of 2TB. This is applied to the chain
DB, but should not be used on the consensus DB which has smaller data
requirements. Expanding both DBs results in excessive RAM being reserved
by the underlying OS.
2023-09-28 19:25:12 +01:00
Alex Sharov
3cea1b9b9e
torrent: add --webseeds cli arg (#8176) 2023-09-12 12:18:47 +07:00
Mark Holt
529d359ca6
Bor span testing (#7897)
An update to the devnet to introduce a local heimdall to facilitate
multiple validators without the need for an external process, and hence
validator registration/staking etc.

In this initial release only span generation is supported.  

It has the following changes:

* Introduction of a local grpc heimdall interface
* Allocation of accounts via a devnet account generator ()
* Introduction on 'Services' for the network config

"--chain bor-devnet --bor.localheimdall" will run a 2 validator network
with a local service
"--chain bor-devnet --bor.withoutheimdall" will sun a single validator
with no heimdall service as before

---------

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-07-18 09:47:04 +01:00
ledgerwatch
a9c86ab887
[devnet] Always select first node, fix configuration mess up between nodes (#7863)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-07-10 11:37:55 +01:00
Mark Holt
5935b11b24
Devnet macos startup and windows committed memory startup fixes (#7832)
The fixes here fix a couple of issues related to devnet start-up

1. macos threading and syscall error return where causing multi node
start to both not wait and fail
2. On windows creating DB's with the default 2 TB mapsize causes the os
to reserve about 4GB of committed memory per DB. This may not be used -
but is reserved by the OS - so a default bor node reserves around 10GB
of storage. Starting many nodes causes the OS page file to become
exhausted.

To fix this the consensus DB's now use the node's OpenDatabase function
rather than their own, which means that the consensus DB's take notice
of the config.MdbxDBSizeLimit.

This fix leaves one 4GB committed memory allocation in the TX pool which
needs its own MapSize setting.

---------

Co-authored-by: Alex Sharp <akhounov@gmail.com>
2023-07-02 22:37:23 +01:00
Mark Holt
bcc2a4a2f8
Cleaned up error handling in network and node start-up (#7811)
The check in catches errors in the node start-up code and makes sure
that the network is stopped if any node fails to start cleanly, and
that5 it returns an error - so that any calling code can take
appropriate action.
2023-06-28 18:21:15 +01:00
Mark Holt
62b2375de9
7667 cli params vhost (#7669)
This change adds 'any' as an alternate wildcard to '*'.

I have updated all doc references in the main erigon repo - let me know
if there is anywhere else that needs changing.
2023-06-09 14:12:11 +01:00
Alex Sharov
31687be599
blockReaders in tests, step4 (#7570) 2023-05-24 15:52:51 +07:00
ledgerwatch
067f695fff
[devnet tool] Separate logging (#7553)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-20 14:48:16 +01:00
ledgerwatch
05597cb195
[devnet tool] separare logging (#7531)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-17 17:36:15 +01:00
ledgerwatch
90cb6be425
[devnet tool] fixing port conflicts (#7520)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-05-15 20:31:35 +01:00
ledgerwatch
6ef3fc3a3c
[devnet tool] Side-quest logging, step 5 (#7484)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-10 19:36:27 +01:00
Alex Sharov
b84561c163
erigon init: created db with wrong pageSize (#7482) 2023-05-10 12:08:39 +07:00
Andrew Ashikhmin
cc11462860
Prioritize eth/68 by default (#7463)
Set `DefaultConfig.ProtocolVersion` to [68, 67, 66] instead of [67, 68].
See https://github.com/ethereum/hive/pull/776
2023-05-08 16:03:59 +02:00
ledgerwatch
fdd385cef1
[Devnet tool] Side-quest to improve logging - part 1 (#7445)
This is the beginning of the series of changes to make it possible to
run multiple instances of erigon inside a single process (as devnet tool
does), with the logging from these processes going to respective log
files correctly.
This is the first part where the initial infrastructure is being
established

---------

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-07 07:28:15 +01:00
Alex Sharov
69a3396433
add flag --db.size.limit (#7325) 2023-04-17 12:48:57 +00:00
ledgerwatch
9690228ede
[Diagnostics] Simplify logging settings, introduce correct log rotation with lumberjack (#7273)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-04-07 21:08:44 +00:00
Jochen Müller
a0ffa454ec
Remove unused code from Node struct (#6978)
The server attribute was only still used in a broken, skipped unit test
which we may rewrite later
2023-03-01 08:04:27 +00:00
Stéphane Loeuillet
195a72bf74
Initial GraphQL interface implementation (#6821)
That's an initial PR mostly for code review, not ready for production
use

Got basic GraphQL working when querying a single block

---------

Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
2023-02-20 11:23:06 +00:00
ledgerwatch
ee83447fa1
CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829)
… startup

---------

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-02-11 20:44:51 +00:00
ledgerwatch
bf24018205
Add support for eth/68 (#6764)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: Alex Sharp <alexsharp@surfer-172-29-1-65-hotspot.internet-for-guests.com>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-02-01 22:21:31 +00:00
Alex Sharov
7c2ed8e01f
mdbx: v0.12.3 (#6521) 2023-01-10 09:15:18 +07:00
Alex Sharov
ade933be6b
kv_remote: server to support thread-safe multi-streams per 1 tx (#6402) 2022-12-24 13:11:15 +07:00
a
007234b489
allow rpcdaemon to bind to tcp (#6184)
this pr adds CLI flag to allow the rpcdaemon to bind to a TCP port.

this is very useful if one wants to maintain a remote connection with
the rpcdaemon without using websocket. This is useful because a lot of
issues come with the websocket protocol (compression, max size, etc).
TCP socket gets around these things (it is just raw json over tcp
stream)

the rpc package already supports this, it was just a matter of adding
the bind.

try `echo
'{"jsonrpc":"2.0","method":"eth_blockNumber","id":"1","params":[""]}' |
nc localhost 8548` as a basic test

to test. Subscriptions are also working (idk how to send keepalives with
netcat)

the default rpc.(*Client).Dial method does not support TCP. I have not
included that in this PR. The code for such is as follow

```
// DialTCP create a new TCP client that connects to the given endpoint.
//
// The context is used for the initial connection establishment. It does not
// affect subsequent interactions with the client.
func DialTCP(ctx context.Context, endpoint string) (*Client, error) {
	parsed, err := url.Parse(endpoint)
	if err != nil {
		return nil, err
	}
	ans := make(chan *Client)
	errc := make(chan error)
	go func() {
		client, err := newClient(ctx, func(ctx context.Context) (ServerCodec, error) {
			conn, err := net.Dial("tcp", parsed.Host)
			if err != nil {
				return nil, err
			}
			return NewCodec(conn), nil
		})
		if err != nil {
			errc <- err
			return
		}
		ans <- client
	}()
	select {
	case err := <-errc:
		return nil, err
	case a := <-ans:
		return a, nil
	case <-ctx.Done():
		return nil, ctx.Err()
	}
}

// DialContext creates a new RPC client, just like Dial.
//
// The context is used to cancel or time out the initial connection establishment. It does
// not affect subsequent interactions with the client.
func DialContext(ctx context.Context, rawurl string) (*Client, error) {
	u, err := url.Parse(rawurl)
	if err != nil {
		return nil, err
	}
	switch u.Scheme {
	case "http", "https":
		return DialHTTP(rawurl)
	case "ws", "wss":
		return DialWebsocket(ctx, rawurl, "")
	case "tcp":
		return DialTCP(ctx, rawurl)
	case "stdio":
		return DialStdIO(ctx)
	case "":
		return DialIPC(ctx, rawurl)
	default:
		return nil, fmt.Errorf("no known transport for URL scheme %q", u.Scheme)
	}
}


```

let me know if you would like me to add this to the PR as well. the TCP
connection can then be established with `rpc.Dial("tcp://host:port")`
2022-12-03 14:22:47 +07:00
Alex Sharov
ded79088e9
remove code of exeriments (#6187) 2022-12-03 13:04:09 +07:00
Alex Sharov
9b65c533c9
e3: optimize incremental hashstate (#6179) 2022-12-03 12:23:01 +07:00
Alex Sharov
76bd23d46d
mdbx: print some logs about settings (#6181) 2022-12-02 20:57:31 +07:00
Alex Sharov
8afeee56c8
Downloader extract, step2 (#6076) 2022-11-20 10:41:30 +07:00
alex.sharov
bfda9bc731 save 2022-11-16 09:43:56 +03:00
Andrew Ashikhmin
14c0643476
Enable both eth/66 and eth/67 by default (#6048) 2022-11-15 10:41:56 +01:00
Alex Sharov
8d1ed547b0
E3: parallel exec, apply on roTx (#5879) 2022-10-28 08:47:45 +07:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live (#5857) 2022-10-25 09:58:25 +07:00
Alex Sharov
993fde4d92
E3: par logs (#5839) 2022-10-23 18:51:14 +07:00
Alex Sharov
63a6fb29ba
e3: cleanup (#5729) 2022-10-13 12:09:14 +07:00
Andrew Ashikhmin
7286a0fef7
Create in-memory MDBX inside dirs.Tmp (#5702)
Previously "in-memory" MDBX instances for fork validation and mining
were created inside `os.TempDir()`. We should create them inside
Erigon's datadir so that the file permissions and the disk are the same
as for the main database.

Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/676.
2022-10-11 16:49:38 +01:00
Alex Sharov
a2e51a2469
e3: prune limited amount before commit #675 (#5693) 2022-10-11 11:25:13 +07:00
Alex Sharov
ca9aa4723c
Compress params change (#5631)
as of https://github.com/ledgerwatch/erigon-lib/pull/651
2022-10-05 17:54:54 +07:00
Alex Sharov
3c5625c72a
Revert "Revert "apply --db.read.concurrency flag value when open embedded db "" (#5559) 2022-09-28 13:48:43 +07:00
ledgerwatch
325bff181e
Revert "apply --db.read.concurrency flag value when open embedded db" (#5550)
This reverts commit f654ee0dc2.
2022-09-27 15:24:22 +01:00
Alex Sharov
f654ee0dc2
apply --db.read.concurrency flag value when open embedded db 2022-09-27 12:08:24 +07:00
Alex Sharov
9fb8a190bc
erigon22: folder snapshots/history (#5351) 2022-09-18 17:41:01 +07:00
Håvard Anda Estensen
65a0caeb94
Use strings.EqualFold for string comparison (#5227) 2022-08-30 14:37:14 +07:00
Håvard Anda Estensen
beeccc0f5f
Remove capitalization and trailing newlines from err strings (#5186) 2022-08-26 13:20:19 +07:00
Håvard Anda Estensen
7c15ed59e4
Enable prealloc linter (#5177)
* Enable prealloc linter

* Set inital slice len to 0
2022-08-26 10:04:36 +07:00
Alex Sharov
fc8f3fabc3
mdbx: expose_growth_step (#5030)
* save

* save

* save

* save

* save
2022-08-12 23:04:47 +07:00