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

docs(dip27): dash core credit pool #152

Merged
merged 17 commits into from
Sep 24, 2024

Conversation

thephez
Copy link
Collaborator

@thephez thephez commented Jul 3, 2024

This DIP provides a mechanism for locking and unlocking Dash in a new store of value on the Core chain. The store of value, called the credit pool, mirrors the credit balance on Dash Platform. New special transactions enable locking Dash in the credit pool for use on Platform and unlocking it to withdraw back to Dash on the Core chain.

dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
@thephez thephez marked this pull request as ready for review July 17, 2024 14:20
@thephez thephez requested a review from shumkov July 17, 2024 14:20
Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
knst
knst previously approved these changes Aug 20, 2024
Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

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

ACK 442ee61

overall it seems fine, but check a correction about withdrawal limit

dip-0027.md Outdated Show resolved Hide resolved
Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
dip-0027.md Outdated Show resolved Hide resolved
@thephez thephez requested a review from knst August 20, 2024 18:28
knst
knst previously approved these changes Aug 20, 2024
Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

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

ACK 572b53c

@coolaj86
Copy link

coolaj86 commented Aug 23, 2024

Needs to mention that script refers to a typical TxOutput / pkhLockScript, otherwise it seems as though the "Asset Lock Script" would be a special kind of "Script".

Also, we need to know during the signing phase with the nulled-out Tx, does the SigHash signing byte go before or after the signing bytes?

Like this?

   if (extraPayload) {
      let nExtraPayload = Tx.utils.toVarInt(extraPayload.length / 2);
      tx.push(nExtraPayload);
      tx.push(extraPayload);
    }

    if (sigHashType) { // for null-inputs tx for signing
      let sigHashTypeHex = TxUtils._toUint32LE(sigHashType);
      let sigHashTypeHex = TxUtils.toUint32LE(sigHashType);
      tx.push(sigHashTypeHex);
    }

Or like this?

    if (sigHashType) { // for null-inputs tx for signing
      let sigHashTypeHex = TxUtils.toUint32LE(sigHashType);
      tx.push(sigHashTypeHex);
    }

    if (extraPayload) {
      let nExtraPayload = Tx.utils.toVarInt(extraPayload.length / 2);
      tx.push(nExtraPayload);
      tx.push(extraPayload);
    }

    let txHex = tx.join(_sep);

@coolaj86
Copy link

coolaj86 commented Aug 23, 2024

Re: We're adding Platform support to the modern Dash SDK:

https://github.com/dashhive/DashTx.js/pull/83/files

dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
@thephez
Copy link
Collaborator Author

thephez commented Sep 3, 2024

I don't fully understand the question here and a couple people I asked weren't sure either. We thought maybe this is not related specifically to the asset lock and applies generically to special txs?. Trying to figure out how to get an answer for the question and also where that answer fits best.

Also, we need to know during the signing phase with the nulled-out Tx, does the SigHash signing byte go before or after the signing bytes?

Like this?

   if (extraPayload) {
      let nExtraPayload = Tx.utils.toVarInt(extraPayload.length / 2);
      tx.push(nExtraPayload);
      tx.push(extraPayload);
    }

    if (sigHashType) { // for null-inputs tx for signing
      let sigHashTypeHex = TxUtils._toUint32LE(sigHashType);
      let sigHashTypeHex = TxUtils.toUint32LE(sigHashType);
      tx.push(sigHashTypeHex);
    }

Or like this?

    if (sigHashType) { // for null-inputs tx for signing
      let sigHashTypeHex = TxUtils.toUint32LE(sigHashType);
      tx.push(sigHashTypeHex);
    }

    if (extraPayload) {
      let nExtraPayload = Tx.utils.toVarInt(extraPayload.length / 2);
      tx.push(nExtraPayload);
      tx.push(extraPayload);
    }

    let txHex = tx.join(_sep);

dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
dip-0027.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

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

ACK 28f494b

@thephez thephez merged commit b0164fd into dashpay:master Sep 24, 2024
@thephez thephez deleted the dip27-core-credit-pool branch September 24, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants