Skip to content

Conversation

@Davidson-Souza
Copy link
Member

What is the purpose of this pull request?

  • Bug fix
  • Documentation update
  • New feature
  • Test
  • Other:

Which crates are being modified?

  • floresta-chain
  • floresta-cli
  • floresta-common
  • floresta-compact-filters
  • floresta-electrum
  • floresta-watch-only
  • floresta-wire
  • floresta
  • florestad
  • Other: .

Description

A output's script may be bigger than 10k bytes, it just can't be spent. We incorrectly check the script pubkey size when it gets created, causing floresta to break out of consensus if such an output is mined.

Fixes #393

Notes to the reviewers

Tests for this will be integrated on #387

Checklist

  • I've signed all my commits
  • I ran just lint
  • I ran cargo test
  • I've checked the integration tests
  • I've followed the contribution guidelines
  • I'm linking the issue being fixed by this PR (if any)

@Davidson-Souza Davidson-Souza mentioned this pull request Mar 5, 2025
21 tasks
Copy link
Contributor

@JoseSK999 JoseSK999 left a comment

Choose a reason for hiding this comment

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

ACK. So large outputs are simply not added to the acc, and the 10k limit is enforced for scriptsigs.

A output's script may be bigger than 10k bytes, it just can't be spent.
We incorrectly check the script pubkey size when it gets created,
causing floresta to break out of consensus if such an output is mined.

Fixes vinteumorg#393
@Davidson-Souza
Copy link
Member Author

So large outputs are simply not added to the acc, and the 10k limit is enforced for scriptsigs.

Yes! It could be created, but never spent.

@Davidson-Souza Davidson-Souza merged commit 4284d7d into vinteumorg:master Mar 6, 2025
8 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.

[Bug] Floresta gets error PeerMisbehaving when trying to sync node

2 participants