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

Reproducing examples for the new history API returning unexpected results #11

Closed
wants to merge 2 commits into from

Conversation

k0k0ne
Copy link
Contributor

@k0k0ne k0k0ne commented Sep 23, 2024

Expectation and Result

Context Expect Result
Transaction from Alice to Bob Alice's issue record The record exists, but it disappears after sending once.
Bob's received record A sent record is generated upon receiving the funds, expected to be a received record
Alice's sent record The record exists, but the previous issued record disappears.

Output

---- check_fungible_history stdout ----
starting test services...
wallet dir: "tests/tmp/4da1300d"
 keychain 0 .......... keychain 1 .......... keychain 9 ..........wallet dir: "tests/tmp/ba78241e"
 keychain 0 .......... keychain 1 .......... keychain 9 ..........Wallets created: wlt_1 and wlt_2
Initial amount: 100000
 keychain 0 .......... keychain 1 .......... keychain 9 ...........Contract issued - ID: ContractId(Array<32>(efd18cb546a6f34a0e063efc435afdbed09b8ee4105f484894ca3c53c4002821)), Interface type: RGB20Fixed
 keychain 0 .......... keychain 1 .......... keychain 9 ........... keychain 0 .......... keychain 1 .......... keychain 9 ..........Initial height: 105
Contracts:
rgb:79GMtUam-80oOBj7-8Q1r9vt-CbjuQQX-0hIlMo8-U8QAKCE    bitcoin                 2024-09-23      rgb:sch:RDYhMTR!9gv8Y2GLv9UNBEK1hcrCmdLDFk9Qd5fnO8k#brave-dinner-banana         
  Developer: ssi:anonymous
History before transfer:
Operation       Value   State   Seal    Witness OpIds
issued  Mcdac   0x0FA0  bc:opret1st:fb64a3ee4c19ea191a055fe267a97daa0783ba92e9b4c21b539ab57bfb852ddb:0  ~efd18cb546a6f34a0e063efc435afdbed09b8ee4105f484894ca3c53c4002821
Transfer amount: 200
Invoice created: RgbInvoice { transports: [UnspecifiedMeans], contract: Some(ContractId(Array<32>(efd18cb546a6f34a0e063efc435afdbed09b8ee4105f484894ca3c53c4002821))), iface: Some(TypeName("RGB20Fixed")), operation: None, assignment: None, beneficiary: BitcoinRegtest(WitnessVout(Pay2Vout { method: OpretFirst, address: Wpkh(WPubkeyHash(Array<20>(b8eae5930360a73439fd746d6e9b40e8e2e1988f))) })), owned_state: Amount(Amount(200)), expiry: None, unknown_query: {} }
 keychain 0 .......... keychain 1 .......... keychain 9 ...........transfer txid: 6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e
Height: 105
 keychain 0 .......... keychain 1 .......... keychain 9 ........... keychain 0 .......... keychain 1 .......... keychain 9 ............ keychain 0 .......... keychain 1 .......... keychain 9 ...........Height: 106
History 1:
Operation       Value   State   Seal    Witness OpIds
sent    Sa      0x0FA0  bc:opret1st:6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e:0  bc:6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e (tentative)64ec5374362a4b4277e9d0c23a379b58e24c538979d5fe7e5b5853dd9c346650
Balance 1:
Global:
  spec := (ticker=("NIATCKR"), name=("NIA asset name"), details=~, precision=2)
  terms := (text=("NIA terms"), media=~)
  issuedSupply := (100000)

Owned:
  assetOwner:
    amount=99800, utxo=bc:opret1st:6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e:1, witness=Some(Bitcoin(Array<32>(6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e))) # owned by the wallet
    amount=200, utxo=bc:opret1st:6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e:0, witness=Some(Bitcoin(Array<32>(6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e))) # owner unknown
    amount=100000, utxo=bc:opret1st:fb64a3ee4c19ea191a055fe267a97daa0783ba92e9b4c21b539ab57bfb852ddb:0, witness=None # owner unknown

Height     Amount, ṩ    Outpoint                                                            
bcrt1qutunemzjgav9q6m0ls7gnsn8ddqd2yz7s3773a    &9/1
106         99996766    6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e:1


Wallet total balance: 99996766 ṩ
History 2:
Operation       Value   State   Seal    Witness OpIds
sent    VccFc   0x0FA0  bc:opret1st:6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e:1  bc:6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e (tentative)64ec5374362a4b4277e9d0c23a379b58e24c538979d5fe7e5b5853dd9c346650
Balance 2:
Global:
  spec := (ticker=("NIATCKR"), name=("NIA asset name"), details=~, precision=2)
  terms := (text=("NIA terms"), media=~)
  issuedSupply := (100000)

Owned:
  assetOwner:
    amount=200, utxo=bc:opret1st:6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e:0, witness=Some(Bitcoin(Array<32>(6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e))) # owned by the wallet
    amount=99800, utxo=bc:opret1st:6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e:1, witness=Some(Bitcoin(Array<32>(6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e))) # owner unknown
    amount=100000, utxo=bc:opret1st:fb64a3ee4c19ea191a055fe267a97daa0783ba92e9b4c21b539ab57bfb852ddb:0, witness=None # owner unknown

Height     Amount, ṩ    Outpoint                                                            
bcrt1qhr4wtycrvznngw0aw3kkax6qar3wrxy07eemrx    &9/0
106             2000    6252b625aca182f159e38c595e50f71100d3254f24f35e9a3db76867bb7e863e:0


Wallet total balance: 2000 ṩ

@dr-orlovsky
Copy link
Member

This still uses some outdated crates (I see that by the presence of "keychain 0 .......... keychain 1 .......... keychain 9 ........." in printouts which have been removed now). Please make sure you are using the most recent versions and you have updated your submodules accordingly.

This what you should have with git sumbodule command (I tested history with this versions and everything works in the right way)

 bb36a490d68ccf7d574b5926bfc7f8b9509776f2 amplify-derive (v4.0.1)
 b1bf3542060beabe3dcdf66517be6ee3eb2ac302 amplify-nonasync (v0.1.0~1)
 be035c1ed260313217bd799bd47cbc9bdfdf27ec amplify-num (v0.5.3-1-gbe035c1)
 3d8b4cb5a20c6ec5ec41fae4d88f3f0004917072 ascii-armor (v0.7.2)
 923f728cefd2682462387e7f16b2967e22860237 bp-core (v0.9.0-465-g923f728)
 5e35c13052e42757868963510730c96724347a17 bp-electrum-client (0.19.0-12-g5e35c13)
 d930558ab30ecc2cf6d76f268fbc94aea35c7a26 bp-esplora-client (v0.11.0-beta.8)
 6dd564c90452ad8b358a6f9f3262114227a88d58 bp-std (v0.11.0-beta.8)
+90dfd3fa23a7465160627068afe91b327aeeff38 bp-wallet (v0.11.0-beta.8-9-g90dfd3f)
 cc3780aa01873067ef2370f870ddd3f4a52fd82b client_side_validation (v0.11.0-beta.8)
+81993496615f05c97301d41cffc164bb05a647bc rgb (v0.11.0-beta.8-20-g8199349)
 8be49626a968a45fc868db1e1454095b75349c17 rgb-core (v0.9.0-826-g8be49626)
+df371d747f9eb7f8943c50845725fab9f710f16d rgb-interfaces (v0.11.0-beta.8-1-gdf371d7)
+dd007796699885ca6bae5b716c79b67e332f6fa8 rgb-schemata (v0.11.0-beta.8-3-gdd00779)
+77f6ab81aadf09c04869fab1fa33eaa8b3b9366e rgb-std (v0.11.0-beta.8-24-g77f6ab8)
 55d53be7badaecb3b258007c72d0afb533e66172 rust-aluvm (v0.11.0-beta.8)
 d01b9f52c23e839c6620f68d1bf9099152178f6d rust-amplify (v4.7.0)
 983854a1b9be7c2cd7d98b00ab4df3e633be393a rust-baid64 (v0.2.2)
 b11845c2d811d87c69a597b6602914141ca31227 strict-encoding (v02.7.0)
 f72bb5b91132ebd403051df5ae42820b2f6c43c1 strict-types (v2.7.0)
 6e1c889e9b951ac709d7db0e57d02dc427446527 vesper (v0.1.0)

@zoedberg
Copy link
Collaborator

@k0k0ne Please note that we'll merge this after the next release is out (we'll ask you to rebase this and revert changes to submodules when it's time). We prefer to avoid having tests using unreleased code

@k0k0ne
Copy link
Contributor Author

k0k0ne commented Sep 24, 2024

Sounds good. I'll test it once the master is updated with the latest submodules.

@k0k0ne k0k0ne closed this Sep 24, 2024
@dr-orlovsky
Copy link
Member

Not sure why you have closed the PR. Without it we can't merge changes into the master since we have nothing to test them with :)

@zoedberg meant that we can't merge this PR before the other PRs going to the masters, but we still need this PR opened, updated to those branches and passing CI before we merge them.

@zoedberg
Copy link
Collaborator

I'm also not sure. Anyway this PR seems to be a duplicate of #3, so I think this can stay closed and we'll ask to rebase that once it's time.

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