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

Updated proto files and changed LibraTransactionEvent class to match … #44

Closed

Conversation

glachac
Copy link

@glachac glachac commented Sep 6, 2019

…the protobuf definition change since address and path are no longer parameters

This fixes the issue reported in #41

…the protobuf definition change since address and path are no longer parameters
@ghost
Copy link

ghost commented Sep 7, 2019

@perfectmak

@olibaron
Copy link

olibaron commented Sep 9, 2019

transferCoins is broken again. The result shows the following error:

LibraTransactionResponse {
  signedTransaction: LibraSignedTransaction {
    transaction: LibraTransaction {
      program: [Object],
      gasContraint: [Object],
      expirationTime: [BigNumber],
      sendersAddress: [AccountAddress],
      sequenceNumber: [BigNumber]
    },
    publicKey: Uint8Array [
      126, 142, 165,  73, 194, 136, 153,  77,
      213,  61, 211, 220,   2, 180, 195,  48,
      128, 186, 113, 104, 203,  53,  60, 113,
      224,  54,  74, 205, 207, 172,  13,  60
    ],
    signature: Uint8Array [
       52, 197, 179, 236, 142,   5,  10,  23, 179, 135,  58,
      132,  85, 225, 203, 155, 158, 211,  37, 180,  36, 148,
      176,  27,  29,  35,  74,  68, 239,  57,  78,  51,  94,
      211,  86, 119, 146,  62, 195,  39, 168, 161,  46,  83,
      205, 146,  67,  37,   9,  97, 243, 229,  13,  49,  27,
       81,   8, 251, 190,  24,  60, 213, 197,  14
    ]
  },
  validatorId: Uint8Array [],
  acStatus: -1,
  mempoolStatus: -1,
  vmStatus: LibraVMStatusError {
    errorType: 1,
    validationStatusError: { code: 11, message: 'none' },
    verificationStatusErrors: undefined,
    invariantViolationError: undefined,
    deserializationError: undefined,
    executionError: undefined
  }
}

@glachac
Copy link
Author

glachac commented Sep 9, 2019

transferCoins is broken again. The result shows the following error:

Yes. That's a different problem than the one this PR fixes.

@olibaron
Copy link

olibaron commented Sep 9, 2019

transferCoins is broken again. The result shows the following error:

Yes. That's a different problem than the one this PR fixes.

Are you sure. If I follow the example of transferring coins:

async function main() {
  const client = new LibraClient({ network: LibraNetwork.Testnet });
  const wallet = new LibraWallet({
    mnemonic:
     'lend arm arm addict trust release grid unlock exhibit surround deliver front link bean night dry tuna pledge expect net ankle process mammal great',

  });
  const account = wallet.newAccount();
  const account2Address = '854563c50d20788fb6c11fac1010b553d722edb0c02f87c2edbdd3923726d13f';
  const response = await client.transferCoins(account, account2Address, 1e6);

  // wait for transaction confirmation
  await response.awaitConfirmation(client);
}

await main();

I still get the same error:

LibraTransactionResponse {
  signedTransaction: LibraSignedTransaction {
    transaction: LibraTransaction {
      program: [Object],
      gasContraint: [Object],
      expirationTime: [BigNumber],
      sendersAddress: [AccountAddress],
      sequenceNumber: [BigNumber]
    },
    publicKey: Uint8Array [
       47, 155,  39, 237, 105, 229, 232,  59,
      212,  95, 232, 170, 218, 168, 201, 155,
        3, 136, 206, 105, 210,   2,  62,  97,
      145, 158, 172,  92, 188, 114,  18, 215
    ],
    signature: Uint8Array [
      149, 121, 124,  84, 180,  14, 217, 148,  75, 129, 216,
      144,   4, 192, 233,  44, 242, 248, 128, 114, 223,  62,
      248, 126, 254, 183, 103, 211, 161, 223, 222, 191, 232,
      150, 253, 232,  86, 216, 236,  88,  93, 108, 146, 220,
      139,  47,   2, 232, 231,  37,  87,  20,  43, 212, 224,
      205, 223, 153, 240,  89, 150, 148,  13,  10
    ]
  },
  validatorId: Uint8Array [],
  acStatus: -1,
  mempoolStatus: -1,
  vmStatus: LibraVMStatusError {
    errorType: 1,
    validationStatusError: { code: 11, message: 'none' },
    verificationStatusErrors: undefined,
    invariantViolationError: undefined,
    deserializationError: undefined,
    executionError: undefined
  }
}

It also seems that no libra-core based wallet is functioning right now for transferring coins. Including kulap-libra poc

@glachac
Copy link
Author

glachac commented Sep 9, 2019

Yes, I'm sure, since this PR is limited in scope.

This PR only fixes the getAccountTransaction() issue, not the transferCoins(). The testnet update broke three things in this library, getAccountState(), getAccountTransaction(), and transferCoins(). I have submitted PR's to fix the first two, but not transferCoins().

They are all related to each other in the sense that the testnet change caused all three issues, but the fixes are in separate places. I'm not sure how to fix the transferCoins() issue.

Copy link
Contributor

@suraneti suraneti left a comment

Choose a reason for hiding this comment

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

@glachac Nice!, hope this merge soon.

The update from testnet also makes other lib broke.

@glachac
Copy link
Author

glachac commented Sep 9, 2019

Closing this PR. See PR #46 which combines all the fixes into one PR including transfer coin

@glachac glachac closed this Sep 9, 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