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

Version Tracking: v3.2.4 #1750

Closed
19 tasks done
prasannavl opened this issue Jan 20, 2023 · 4 comments
Closed
19 tasks done

Version Tracking: v3.2.4 #1750

prasannavl opened this issue Jan 20, 2023 · 4 comments

Comments

@prasannavl
Copy link
Member

prasannavl commented Jan 20, 2023

@Bushstar
Copy link
Member

Bushstar commented Feb 1, 2023

ain#1700 changes to the CHistoryWriter adds AuctionBid entries to the account history entries that were not present before. These differences can be found on every range since loans were introduced and the first vaults went into liquidation during the range 1,450,000 to 1,500,000.

A sample of this is as follows.

< AccountChange: txid=0000000000000000000000000000000000000000000000000000000000000000 addr=df1qnzmk5a2jcacl8gpsvy5u5ax6mjd5l4v5uwpdmn change=2986.91017100@0
< AccountChange: txid=0000000000000000000000000000000000000000000000000000000000000000 addr=8defichainBurnAddressXXXXXXXdRQkSm change=149.77784424@0
< AccountChange: txid=0000000000000000000000000000000000000000000000000000000000000000 addr=08292842970f420926aefd58084321df9e03b20cde8c8ba37b17c9921b42179c change=0.00000000@26

On all lines the txid is set to zeros, this is due to these changes being outside of a transaction and are processed at the end of a block. PR 1700 updates the txid to hash and where an entry is outside of a transaction the block hash is then used. In addition to this the TX type has been added to AccountChange lines, so for the above would include type=AuctionBid, this is especially useful for non-transaction entries.

Breakdown of the above, first line is the additional of collateral to the auction winner.

view.AddBalance(bidOwner, {tokenId, tokenAmount});

Second line is the transfer of the penalty amount to the burn address.

SwapToDFIorDUSD(view, bidTokenAmount.nTokenId, amountToBurn, tmpAddress,
chainparams.GetConsensus().burnAddress, pindex->nHeight);

Third line show up from transferring the remaining collateral and penalty amounts using the vault ID as a temporary address. Note that the transfers to the vault ID show as zero as these amounts are later removed from that address.

view.AddBalance(tmpAddress, {bidTokenAmount.nTokenId, amountToBurn});

view.AddBalance(tmpAddress, {bidTokenAmount.nTokenId, amountToFill});

We also have diffs when comparing the output of getburninfo. This is due to the bug fixed in #1700, on start up VerifyDB called DisconnectBlock, changes in DisconnectBlock were supposed to be discarded which is true for CCustomCSView but not for the account, burn and vault databases resulting in records being deleted on start up. Every getburninfo diff now shows an increased amount compared to before.

<     "60290935.19556906@DFI",
<     "2026.29958043@DUSD",
---
>     "60290934.71593739@DFI",
>     "2026.29730296@DUSD",
1819386c1818540
<     "0.15417413@SPY",
---
>     "0.15417366@SPY",
1819412,1819413c1818566,1818567
<     "59.58126593@BTC",
<     "1541877.13814182@DUSD",
---
>     "59.58126588@BTC",
>     "1541873.73817024@DUSD",
1819416c1818570
<     "143.04933253@GME",
---
>     "143.02438253@GME",
1819428,1819429c1818582,1818583
<     "71.87978250@TLT",
<     "5.17667676@AMZN",
---
>     "71.87974551@TLT",
>     "5.17667602@AMZN",

@Bushstar
Copy link
Member

Bushstar commented Feb 6, 2023

Full sync diff of account change of master without PR 1700 and with PR 1700.

full_sync_diff.log

@Bushstar Bushstar changed the title Version Tracking: v3.2.3 Version Tracking: v3.2.4 Feb 8, 2023
@shohamc1
Copy link
Contributor

shohamc1 commented Feb 9, 2023

RPC Changes

getgovproposal

  • Fixed
    • Argument parsing error.
  • New output fields added
    • votesNo - number of no votes
    • votesNeutral - number of neutral votes
    • votesInvalid - number of invalid votes (votes by ineligible masternodes)
    • feeRedistributionPerVote - DFI redistributed per voter
    • feeRedistributionTotal - total DFI redistributed to voters
    • approvalThreshold - threshold for number of yes votes for proposal to pass

listgovproposalvotes

  • Fixed
    • cycle is set to 1 instead of the current cycle when argument is not set.
    • Argument parsing error.
  • New output field added
    • valid: Validity of vote.
    • Note: This is not finalised until the voting period is completed, results may change over time if active masternodes resign before the completion height.
  • New arguments
    • aggregate: Returns aggregate voting information about one or more proposals
      • $ ./defi-cli listgovproposalvotes 'b1d19f0a1326655148ebdc967dbf0ffcbbf0bb822069737475c7deac3efc9af1' 'all' 0 true
        [
          {
            "proposalId": "b1d19f0a1326655148ebdc967dbf0ffcbbf0bb822069737475c7deac3efc9af1",
            "total": 100,
            "yes": 50,
            "no": 30,
            "neutral": 20
          }
        ]
      • If no proposal ID is sent, voting information for all of the current proposals are returned
    • valid (default: true): filter results to include only valid or invalid votes

votegov

  • masternodeId argument now supports owner and operator address
    • The node will search for masternodes with the provided owner/operator address and use that to vote when an address is provided
    • If a masternode ID is provided, behaviour is unchanged.
    • $ defi-cli votegov b1d19f0a1326655148ebdc967dbf0ffcbbf0bb822069737475c7deac3efc9af1 7Kew9LSBY187dlqX4WVSQZ9SdwAVyKaZ2n "yes"

listvaulthistory

  • PaybackWithCollateral transactions are now listed.
    • $ defi-cli listvaulthistory {"txtype": "W"}
      befac9a70c9ea2356456da8c04ca18100c18233dcdbbd5965fba3a0c64e80d6a
      [{'address': 'vaultCollateral', 'blockHeight': 215, 'blockHash': '783748a6e68f05dae0f78dc063bec2a90bf7122dc3bee44b58175cd9ec17bc2f', 'blockTime': 1675931595, 'type': 'PaybackWithCollateral', 'txn': 1, 'txid': 'b80a593ed538142bc4c68e3acd729a839fb890b2c2e1bb6234e7b5db3bd8297f', 'amounts': ['-1.00001142@DUSD']}]

getcustomtx

  • Fixed crash when decoding unconfirmed CreateVoc transactions

@prasannavl prasannavl transferred this issue from another repository Feb 9, 2023
@prasannavl prasannavl transferred this issue from DeFiCh/mobil-ave Feb 9, 2023
@defichain-bot
Copy link
Member

@prasannavl: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository.

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

No branches or pull requests

4 participants