Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Read only mode #5198

Merged
merged 7 commits into from
Aug 14, 2018
Merged

Read only mode #5198

merged 7 commits into from
Aug 14, 2018

Conversation

heifner
Copy link
Contributor

@heifner heifner commented Aug 13, 2018

  • Create a new read-only db mode where incoming blocks are processed but with no speculative processing of blocks. This is similar to head mode except for no speculative execution or relaying of transactions are performed.
  • In read-only mode no incoming p2p connections are allowed since transactions are not speculatively executed or relayed.
  • This mode is useful for plugins such as the mongo_db_plugin where consistent state is the most important characteristic.
  • Note that non-irreversible blocks are still processed so forks are recorded when they happen.

@heifner heifner merged commit 03ee499 into develop Aug 14, 2018
@heifner heifner deleted the read-only branch August 14, 2018 00:36
@abourget
Copy link
Contributor

In read-only mode no p2p connections are allowed since transactions are not speculatively executed or relayed.

Curious.. how can incoming blocks be applied if no p2p connections are allowed?

@abourget
Copy link
Contributor

Do you mean we refuse incoming connections, but outgoing are okay?

@heifner
Copy link
Contributor Author

heifner commented Aug 15, 2018

@abourget Correct incoming connections are not allowed since transactions would be dropped on the floor and not speculatively executed. Updated description.

@ScottSallinen
Copy link
Contributor

This is /almost/ perfect for a use case I have in mind: block-only relays, to speed up block propagation. I imagine them being run alongside other seed nodes, so producers have routes for TX's, but also a fast route for blocks.

With this in mind, would it be possible to optionally enable accepting incoming connections? This way, a block relay could be made public for other producer's own block relays to connect to.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants