Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype of best-chain abstractions #12

Merged
merged 7 commits into from
Oct 23, 2023

Conversation

daira
Copy link
Collaborator

@daira daira commented Oct 17, 2023

Definitions for transactions, TXOs, validation contexts, and blocks. Some basic consistency rules are implemented for transactions and blocks, assuming a Bitcoin-like UTXO protocol but with explicit fees. This should be sufficient to require us to take account of UTXO-related issues like missing inputs and double-spends. Both transparent and shielded abstractions are modelled.

Left for future work: it isn't clear whether this modelling of anchors is sufficient, and we might also need to model transaction expiry.

refs #7

@daira daira added the enhancement New feature or request label Oct 17, 2023
@daira daira requested a review from nathan-at-least October 17, 2023 21:03
@daira daira force-pushed the bc-abstractions branch 4 times, most recently from 6f87191 to f534e21 Compare October 17, 2023 22:03
@daira daira requested a review from ebfull October 18, 2023 08:53
simtfl/bc/demo.py Outdated Show resolved Hide resolved
Copy link
Contributor

@nathan-at-least nathan-at-least left a comment

Choose a reason for hiding this comment

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

There's at least one comment that is either a bug or naming/design-confusion. Most other comments are suggestions but not requirements for merge.

.flake8 Outdated Show resolved Hide resolved
.github/workflows/tests.yml Outdated Show resolved Hide resolved
simtfl/bc/__init__.py Outdated Show resolved Hide resolved
simtfl/bc/__init__.py Outdated Show resolved Hide resolved
simtfl/bc/__init__.py Outdated Show resolved Hide resolved
simtfl/bc/__init__.py Outdated Show resolved Hide resolved
simtfl/bc/__init__.py Outdated Show resolved Hide resolved
simtfl/bc/__init__.py Show resolved Hide resolved
simtfl/node.py Outdated Show resolved Hide resolved
simtfl/util.py Show resolved Hide resolved
@daira daira marked this pull request as draft October 19, 2023 18:22
simtfl/bc/__init__.py Outdated Show resolved Hide resolved
simtfl/bc/__init__.py Outdated Show resolved Hide resolved
@daira daira force-pushed the bc-abstractions branch 4 times, most recently from 3009fdc to 9e50b82 Compare October 19, 2023 21:15
@daira daira marked this pull request as ready for review October 19, 2023 21:16
@daira daira requested a review from nathan-at-least October 19, 2023 21:39
Copy link
Contributor

@nathan-at-least nathan-at-least left a comment

Choose a reason for hiding this comment

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

One request to delete a CI step based on the guess that it's unnecessary (because I'm allergic to unnecessary code). If it is necessary, I request we add a comment as to why (for collaborators like me where it's not obvious; it may be obvious for anyone with more github CI experience).

.github/workflows/tests.yml Outdated Show resolved Hide resolved
daira added 5 commits October 21, 2023 00:24
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
…ually_valid`.

Also assert that all transactions in a `BCBlock` are `BCTransaction`s.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
daira added 2 commits October 21, 2023 19:53
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
@daira daira dismissed nathan-at-least’s stale review October 23, 2023 12:55

Comment no longer applicable

@daira daira merged commit 54cc568 into Electric-Coin-Company:main Oct 23, 2023
2 checks passed
@daira daira deleted the bc-abstractions branch October 23, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants