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

Add compatibility with Dash v0.13 #335

Open
wants to merge 6 commits into
base: next
Choose a base branch
from
Open

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jan 26, 2019

This adds compatibility with Dash v0.13, see more info about this release in Dash Core repo https://github.com/dashpay/dash/releases/tag/v0.13.0.0

DISCLAIMER: I'm not very familiar with the codebase and I have NOT tested this. I also wasn't able to compile the original code on my mac and thus this patch might have some stupid typos or smth like that and won't even compile. (EDIT: Travis seems to be able to compile it and all looks good) Pls try compiling and running this at least on testnet before merging.

@crackfoo
Copy link

Some info about the payload:

https://github.com/dashpay/dips/blob/master/dip-0002.md

A table w/special TX types here:
https://github.com/dashpay/dips/blob/master/dip-0002-special-transactions.md

@pinpins
Copy link

pinpins commented Feb 7, 2019

Will try to compile, and run on testnet tonight

@pinpins
Copy link

pinpins commented Apr 7, 2019

I think we are still missing this part on top of coinbase_payload

https://github.com/dashpay/dips/blob/master/dip-0004.md

Example

"extraPayloadSize": 38,
"extraPayload": "01003e041000ba1019b155a59a8d9f85df3c780415eaaa0f69d8df8ef77497f642dd60d7d2e9",
"cbTx": {
"version": 1,
"height": 1049662,
"merkleRootMNList": "e9d2d760dd42f69774f78edfd8690faaea1504783cdf859f8d9aa555b11910ba"
},

@UdjinM6
Copy link
Author

UdjinM6 commented Apr 7, 2019

@pinpins cbTx is just a JSON representation of coinbase_payload in RPC.

@crackfoo
Copy link

crackfoo commented Apr 8, 2019 via email

@pinpins
Copy link

pinpins commented Apr 8, 2019

@pinpins cbTx is just a JSON representation of coinbase_payload in RPC.

@UdjinM6
Yes, this is what I though it should be, but as blocks got rejected, thought, something more is missing. Thanks for confirmation on this part.

But then there is still something else wrong putting coinbase transaction altogether

@pinpins
Copy link

pinpins commented Apr 8, 2019

I think found issue with your last commit

		if(coinbase_payload && strlen(coinbase_payload) > 0) {
			char coinbase_payload_size[18];
			ser_compactsize((unsigned int)(strlen(coinbase_payload_size) >> 1), coinbase_payload_size);
			strcat(templ->coinb2, coinbase_payload_size);
			strcat(templ->coinb2, coinbase_payload);				strcat(templ->coinb2, coinbase_payload);
		}

Must be

		if(coinbase_payload && strlen(coinbase_payload) > 0) {
			char coinbase_payload_size[18];
			ser_compactsize((unsigned int)(strlen(coinbase_payload) >> 1), coinbase_payload_size);
			strcat(templ->coinb2, coinbase_payload_size);
			strcat(templ->coinb2, coinbase_payload);				strcat(templ->coinb2, coinbase_payload);
		}

@UdjinM6
Copy link
Author

UdjinM6 commented Apr 8, 2019

Thanks @pinpins ! 👍

@crackfoo
Copy link

crackfoo commented Apr 9, 2019

testnet works with that fix.

Thanks @pinpins

barrystyle pushed a commit to barrystyle/yiimp-hth that referenced this pull request Aug 24, 2019
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.

3 participants