algorand / algorand/go-algorand
lastround in /v2/transactions/params can be invalid for encoding
- 主要言語
- Go
- スター
- 1.4k
- フォーク
- 537
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 18
説明
### Subject of the issue
The `last-round` returned from /v2/transactions/params is used in goal and the SDKs for `txn.first-valid`.
However, if used immediately after creating a new network, the last round seen will be 0, which isn't allowed in the transaction encoding.
### Your environment
version 2.4.1 stable on x86-64 linux, using the network template at https://developer.algorand.org/tutorials/create-private-network/
### Steps to reproduce
1. Create a new network
2. Immediately fetch transaction parameters from `/v2/transactions/params`
3. Construct a transaction using an SDK with those as the suggested params
4. Try to encode and send the transaction
### Expected behaviour
The transaction encodes and sends.
### Actual behaviour
Encoding the transaction fails, because `first-valid = 0`, and zero values aren't allowed in encodings (https://github.com/algorand/js-algorand-sdk/blob/dde1044c186f69bf9bf269b8a3970cdd37806e2b/src/encoding/encoding.ts#L45-L46).
コントリビューションガイド
評価
この issue はまだ評価されていません。