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

Several changes from PKT Cash project #1204

Merged
merged 10 commits into from
May 20, 2024
Merged

Conversation

UCIS
Copy link
Contributor

@UCIS UCIS commented Mar 13, 2024

This pull request contains several changes which were needed to use NBitcoin with PKT Cash. The actual network details are currently implemented in a private repository as this is still incomplete. This PR is primarily for comparison and to suggest some improvements, it does not need to be accepted as-is.

  1. The filter data of a cfilter payload is a var_str or CompactSize followed by a variable number of bytes, not a zero-size buffer: https://en.bitcoin.it/wiki/BIP_0157#cfilter
  2. The unknown payload data was not correctly deserialized because it would read a zero-size buffer
  3. The witness marker is specified as two bytes (0001), using an empty TxInList seems excessive and hides the actual purpose
  4. Some coins need different transaction validation rules, in our case the maximum supply (hardcoded in MAX_MONEY) is different

@NicolasDorier NicolasDorier merged commit 98e4876 into MetacoSA:master May 20, 2024
@NicolasDorier
Copy link
Collaborator

Reverting dummy change, it matches what bitcoin core does so if there is one day a change of logic there, we won't crash. It's not big deal.

@NicolasDorier
Copy link
Collaborator

Mmmh actually not reverting, this is only for writing.

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.

2 participants