Skip to content

Iterate generic attack model#51

Merged
pkel merged 107 commits intomasterfrom
incentive-compatibility
Jan 31, 2025
Merged

Iterate generic attack model#51
pkel merged 107 commits intomasterfrom
incentive-compatibility

Conversation

@pkel
Copy link
Owner

@pkel pkel commented Nov 7, 2024

This already covers GhostDAG, Ethereum and Parallel Proof-of-Work. Tree-style (Tailstorm) and DAG-style (#47) voting will be easy to add.

pkel added 30 commits August 30, 2024 12:38
I was observing expected progress != horizon. That violates the design
goals of PTO. Fixed now. Validated only on Bitcoin/honest.
1. make room for a new generic attack model / implicit mdp
2. move old scripts, notebooks, and thoughts into sprint-* dirs

I've checked that the .py scripts work and the tests pass. I did not
bother with the notebooks, sorry.
It works, but state size explodes massively.

The old generic_v0 model has two tweaks that probably help: merging
isomorphic states and forcing the attacker to consider its own blocks.

One of the next steps should be to evaluate how generic_v0 behaves with
these mechanisms turned off. Then adapt the effective mechanisms for
generic_v1.

Note. I think I've observed that the v1 model explores much faster than
the v0 model. This can be due to the pickling or the merging of
isomorphic states in v0. Investigate!
pkel added 10 commits December 23, 2024 20:49
The problem here was: the heuristic allowed for partially removing
parents of blocks. This breaks the semantics of the BlockDAG and
is not safe.

The new version should avoid this case; we now check that none of the
removed blocks has children among the future of the new genesis block.
@pkel pkel force-pushed the incentive-compatibility branch from 546b9d0 to 0b6683b Compare January 2, 2025 19:18
@pkel pkel force-pushed the incentive-compatibility branch from e0a461c to 974c785 Compare January 4, 2025 07:52
@pkel pkel force-pushed the incentive-compatibility branch from 775feec to 3443634 Compare January 6, 2025 11:14
pkel added 8 commits January 6, 2025 12:18
Fun fact: progress(b) == 1 and Python disambiguates comparison of lists by
length. So the old code was obscure but correct.
The current stale block removal mechanism does not remove invisible or
ignored blocks. Withheld or ignored stale block blow up the state space
considerably.

I've here drafted a more aggressive approach, that only keeps such
blocks that stay relevant in the future. On a first glance, the results
look promising: For Bitcoin we meet the state sizes of the fc16 model at
9 blocks. However, I worry a bit that this restricts the policy too
much. Are we maybe forcing honest behavior?

... running some value iterations ...

It's even worse; this gives advantage to the attacker. There is a policy
reaping _all_ rewards.

A completely separate problem is: as this enables quite big BlockDAGs
(good), the exploration takes much longer (bad). I guess there is some
quadratic (or more) factor w.r.t. BlockDAG size.

One quadratic factor was in the exploration logic, where I step up the
DAG size limit by one while starting exploration from scratch each time.
Works okay if the state size grows fast; less so if the growth is close
to linear. Circumvented this with binary search for the upper limit.
Even better would be to reuse the already explored MDP for the next DAG
size limit, similar to the depth limit in the policy guided explorer.

I suspect there is another quadratic factor in the model logic itself.
Maybe it's only the asserts?!
@pkel
Copy link
Owner Author

pkel commented Jan 31, 2025

Described in the following preprint. Going to merge this now.

https://arxiv.org/abs/2501.10888

@pkel pkel merged commit 804265c into master Jan 31, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant