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

Deadline can't be set greater that 6 hours #715

Open
APshenkin opened this issue Nov 11, 2020 · 1 comment
Open

Deadline can't be set greater that 6 hours #715

APshenkin opened this issue Nov 11, 2020 · 1 comment
Labels
missing details Issue description is missing details. Work cannot be started. question Further information is requested

Comments

@APshenkin
Copy link

  1. Expected behavior and actual behavior.
    In documentation https://docs.symbolplatform.com/serialization/transaction.html#id2
    I can see
    deadline - Number of milliseconds elapsed since the creation of the nemesis block. If a transaction does not get included in a block before the deadline is reached, it is deleted. Deadlines are only allowed to lie up to 24 hours ahead. But if I set this value greater than 6 hours then transaction doesn't apply in blockchain.
    Also when publishing transaction with deadline greater than 6 hours I receive the same response as for successful broadcast
{
    "message": "packet 9 was pushed to the network via /transactions"
}

This response is not clear and doesn't provide information about bad transaction deadline.
2. Steps to reproduce the problem.

const rawAddress = 'TCFV4TKV6RMN7QPR3PTBXDWIJCLXDVKSIPEEUAQ';
const recipientAddress = Address.createFromRawAddress(rawAddress);
// replace with network type
const networkType = NetworkType.TEST_NET;
// replace with symbol.xym id
const networkCurrencyMosaicId = new MosaicId('5B66E76BECAD0860');

const transferTransaction = TransferTransaction.create(
  Deadline.create(7),
  recipientAddress,
  [new Mosaic (networkCurrencyMosaicId,
    UInt64.fromUint(1000000))],
  EmptyMessage,
  networkType,
  UInt64.fromUint(2000000));

// replace with sender private key
const privateKey = '1111111111111111111111111111111111111111111111111111111111111111';
const account = Account.createFromPrivateKey(privateKey, networkType);
// replace with meta.networkGenerationHash (nodeUrl + '/node/info')
const networkGenerationHash = '6C1B92391CCB41C96478471C2634C111D9E989DECD66130C0430B5B8D20117CD';
const signedTransaction = account.sign(transferTransaction, networkGenerationHash);
console.log('Payload:', signedTransaction.payload);
console.log('Transaction Hash:', signedTransaction.hash);

const nodeUrl = 'http://api-01.eu-central-1.0.10.0.x.symboldev.network:3000';
const repositoryFactory = new RepositoryFactoryHttp(nodeUrl);
const transactionHttp = repositoryFactory.createTransactionRepository();

transactionHttp
  .announce(signedTransaction)
  .subscribe((x) => {
    console.log(x)
  }, (err) => {
    console.error(err)
  });
  1. Specifications like the version of the project, operating system, or hardware.
    symbol-sdk version 0.21.0
@rg911 rg911 added missing details Issue description is missing details. Work cannot be started. question Further information is requested labels Feb 5, 2021
@rg911
Copy link
Contributor

rg911 commented Feb 5, 2021

Is this error still reproducible in the latest sdk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing details Issue description is missing details. Work cannot be started. question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants