Skip to content

ECBP-1100: MESS implementation#181

Merged
meowsbits merged 64 commits into
masterfrom
feat/mess
Sep 25, 2020
Merged

ECBP-1100: MESS implementation#181
meowsbits merged 64 commits into
masterfrom
feat/mess

Conversation

@meowsbits
Copy link
Copy Markdown
Contributor

@meowsbits meowsbits commented Sep 12, 2020

Implements ECBP-1100 (MESS) specified at ethereumclassic/ECIPs#373.

Define a function arbitrating chain acceptance using relative total difficulty and common ancestor time to raise finality confidence.

Extracts the reorganization data-aggregation
logic from its execution logic.

This will allow observation and arbitration
using the proposed reorganization data without
necessarily acting on it.

Signed-off-by: meows <b5c6@protonmail.com>
This is only really an optimization,
paving the way for installing additional
reorg arbitration.

Signed-off-by: meows <b5c6@protonmail.com>
Implements spec documented here:
https://github.com/etclabscore/artificial-finality/blob/master/MESS.md

MESS is an artificial finality mechanism endowing
the blockchain's current segment with so-called 'gravity'
by requiring a competing chain to satisfy an exponentially
increasing relative total difficulty.

Note that is change causes several tests with reorgs
to fail. This will be addressed by implementing
the feature as a chain configuration option.

Signed-off-by: meows <b5c6@protonmail.com>
…1355 configuration interface implementation

Implement ECBP11355 interface methods for supporting
chain configuration types.

Signed-off-by: meows <b5c6@protonmail.com>
This meter was added to ethereum/go-ethereum after my
original refactor was done, so my update missed it,
and it was caught by the deadcode linter.

Add it, fix it.

Signed-off-by: meows <b5c6@protonmail.com>
- local head staleness
- min peers

These are mechanisms designed to provide sane safeguard
heuristics for nodes to enable/disable artificial
finality features within reason.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
This is intended to keep upstream merges streamlined
by moving 'custom' logic to a non-colliding space.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Should help with debugging if it comes to that.
4 decimals chosen because that matches the current
base value precision: 1.0001

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Forgot to actually plug this in.

Signed-off-by: meows <b5c6@protonmail.com>
One order of magnitude greater than the exponent's
base of 1.0001.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
The sinusoidal function seems the most desirable.

This changeset also includes a shallow threshold
of 3 blocks, returning positive acceptance with
difficulty is equivalent.
This is intended to sidestep negative impacts on uncle
rates.

Signed-off-by: meows <b5c6@protonmail.com>
…ame shallow

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
This commit created by checkouting core/
package at development commit 0b162cd.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Also improves a graph generated by a test.

This commit was created by gitcheckouting
development commit 01406c7.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
This is just for documentation and reference, doing the sam
e math but with different var types.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
…for curve domain

This drastically changes the canonical allowance,
truncating it to a hard about 30 blocks.

Signed-off-by: meows <b5c6@protonmail.com>
This would present an exploit where the adversary
would simply use the etherbase(s) of powerful
honest miners to get them to permit the reorg.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Comment thread core/blockchain.go
Comment thread core/blockchain_af.go Outdated
This just keeps things lean and mean.

The int64 was a precursor to the function which is
now using big.Ints

Signed-off-by: meows <b5c6@protonmail.com>
This just rearranges to put importanter stuff
on top, and to move the development tests
and plotters toward the bottom.

Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Signed-off-by: meows <b5c6@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants