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

New options for api nodes - 2.0 #8702

Merged
merged 12 commits into from
Mar 3, 2020
Merged

New options for api nodes - 2.0 #8702

merged 12 commits into from
Mar 3, 2020

Conversation

heifner
Copy link
Contributor

@heifner heifner commented Feb 26, 2020

Change Description

  • --p2p-accept-transactions arg (=1) Allow transactions received over p2p
    network to be evaluated and relayed if valid.
  • --api-accept-transactions arg (=1) Allow API transactions to be evaluated
    and relayed if valid.
  • read-mode = irreversible now asserts unless:

    • p2p-accept-transactions = false
    • api-accept-transactions = false
  • Resolves Introduce new read-mode to nodeos: api-read-only #8685 by user specifying:

    • read-mode = head
    • p2p-accept-transactions = false
    • api-accept-transactions = true

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

Updated Descriptions:

--read-mode arg (=speculative)

  • Database read mode ("speculative", "head", "read-only", "irreversible").
    In "speculative" mode: database
    contains state changes by transactions
    in the blockchain up to the head block
    as well as some transactions not yet
    included in the blockchain.

  • In "head" mode: database contains state
    changes by only transactions in the
    blockchain up to the head block;
    transactions received by the node are
    relayed if valid.

  • In "read-only" mode: (DEPRECATED: see
    p2p-accept-transactions &
    api-accept-transactions) database
    contains state changes by only
    transactions in the blockchain up to
    the head block; transactions received
    via the P2P network are not relayed and
    transactions cannot be pushed via the
    chain API.

  • In "irreversible" mode: database
    contains state changes by only
    transactions in the blockchain up to
    the last irreversible block;
    transactions received via the P2P
    network are not relayed and
    transactions cannot be pushed via the chain API.

New Options:

--p2p-accept-transactions arg (=1) Allow transactions received over p2p
network to be evaluated and relayed if valid.
--api-accept-transactions arg (=1) Allow API transactions to be evaluated
and relayed if valid.

@swatanabe-b1
Copy link
Contributor

This could use a better name. I don't see how the api's are read-only in this mode.

@heifner
Copy link
Contributor Author

heifner commented Feb 26, 2020

@swatanabe-b1 point well taken, we decided on api

@heifner heifner changed the title New read-mode: api-read-only - 2.0 New read-mode: api - 2.0 Feb 27, 2020
@heifner
Copy link
Contributor Author

heifner commented Feb 27, 2020

We have discussed this some more and have decided that api and the existing read-only are not really database read-modes. Plan on adding p2p-accept-transactions and api-accept-transactions both defaulted to true. The existing read-only will be deprecated in favor of specifying: read-mode = head, p2p-accept-transactions = false, and api-accept-transactions = false. For the v2.0.x & v1.8.x versions of this PR read-mode = read-only will indicate a warning message of deprecation and will automatically set p2p-accept-transactions = false, api-accept-transactions = false, and read-mode = head. The develop version of this PR will remove read-only mode.

The new api mode will be provided by specifying read-mode = head, p2p-accept-transactions = false, and api-accept-transactions = true.

Copy link
Contributor

@arhag arhag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes just to prevent accidental merging. For details see: #8702 (comment)

…iptions of read-mode. Deprecated read-mode=read-only. Remove read-mode=api.
@heifner heifner changed the title New read-mode: api - 2.0 New options for api nodes - 2.0 Feb 28, 2020
@heifner heifner requested a review from arhag February 28, 2020 13:06
plugins/chain_plugin/chain_plugin.cpp Outdated Show resolved Hide resolved
plugins/chain_plugin/chain_plugin.cpp Outdated Show resolved Hide resolved
plugins/chain_plugin/chain_plugin.cpp Outdated Show resolved Hide resolved
@heifner heifner merged commit 726b1b7 into release/2.0.x Mar 3, 2020
@heifner heifner deleted the api-read-only-2.0 branch March 3, 2020 16:33
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.

3 participants