Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Allow missing accounts to create zero-cost transactions #685

Merged
merged 31 commits into from
Jan 29, 2019

Conversation

rain-on
Copy link
Contributor

@rain-on rain-on commented Jan 29, 2019

It was found that if a non-existent account sent a transaction via
JSON RPC - the transction would be rejected, even if the upfront cost
of the transaction was 0 (0 gasprice, and 0 value).

This was because the sender was deemed to not exist, therefore not
have the required funds.

If the tranasaction was received via block propogation, this problem
would not be hit (as the sender account would be created in the world
state prior to validating the transaction). Local/remote transactions
did not have access to the world state to do this.

MainnetTransactionValidator has been updated to allow a 'null' sender
to create a transaction if the price is zero (and the nonce is acceptable
from the standpoint of a default/initial account state).

tmohay and others added 26 commits January 25, 2019 08:18
Messages which originate with the current node are logged in the
gossiper such that if a remote peer sends a packet which originated
from the local back to the local node, it should not go back out
again.
* Refactoring for more readable IBFT IT

* Renaming Roles to peers

* Moving the assert behaviour into the RoundChangePeers

* Renmaing prefix of assert to verify, grammar

* Reducing usage of getAllPeers()

* Dropping the getter for the peer list

* Dropping peer from method names, as it's now in the class name

* Spotless
fixes NC-2026 adds a `--network` option instead of separated options

Networks are now defined using a `--network` option that takes the case insensitive
name of an enum values as input :   MAINNET, RINKEBY, ROPSTEN, GOERLI, DEV

These presets are a set of network-id, genesis file and boonodes list.

If the `--genesis-file` is provided with a valid JSON genesis file,
Pantheon uses it instead of the default network. An empty bootnodes list is then
the default value and network id is the chain id found in the genesis file.

`--network-id` and `--bootnodes` options can override these defaults.

You can of course also override the `--network-id` and `--bootnodes` for a
predefined known network (using `--network`).

User have no reason to set `--network` and `--genesis-file` options at the same
time that would lead to misunderstandings so we raise an error to prevent both
options to be defined at the same time on the command line.

Also fixes NC-2189 renaming --private-genesis-file to --genesis-file

Updates a lot of doc according to the options changes
fixes NC-2120 --discovery-enabled option refactoring

now able to have --discovery-enabled option with true as default
and --discovery-enabled=true or --discovery-enabled=false on CLI
and discovery-enabled=true or discovery-enabled=false in YAML config file.

updates doc
Separate the management of sync target and actual import from the rest of the Downloader logic in preparation for introducing a fast sync chain downloader.
It was found that if a non-existent account sent a transaction via
JSON RPC - the transction would be rejected, even if the upfront cost
of the transaction was 0 (0 gasprice, and 0 value).

This was because the sender was deemed to not exist, therefore not
have the required funds.

If the tranasaction was received via block propogation, this problem
would not be hit (as the sender account would be created in the world
state prior to validating the transaction). Local/remote transactions
did not have access to the world state to do this.

MainnetTransactionValidator has been updated to allow a 'null' sender
to create a transaction if the price is zero (and the nonce is acceptable
from the standpoint of a default/initial account state).
@rain-on rain-on requested review from ajsutton and CjHare January 29, 2019 03:08
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

@rain-on rain-on merged commit 6bc803d into PegaSysEng:master Jan 29, 2019
vinistevam pushed a commit to vinistevam/pantheon that referenced this pull request Jan 29, 2019
Messages which originate with the current node are logged in the
gossiper such that if a remote peer sends a packet which originated
from the local back to the local node, it should not go back out
again.

It was found that if a non-existent account sent a transaction via
JSON RPC - the transction would be rejected, even if the upfront cost
of the transaction was 0 (0 gasprice, and 0 value).

This was because the sender was deemed to not exist, therefore not
have the required funds.

If the tranasaction was received via block propogation, this problem
would not be hit (as the sender account would be created in the world
state prior to validating the transaction). Local/remote transactions
did not have access to the world state to do this.

MainnetTransactionValidator has been updated to allow a 'null' sender
to create a transaction if the price is zero (and the nonce is acceptable
from the standpoint of a default/initial account state).
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.

10 participants