algorand / algorand/go-algorand

lastround in /v2/transactions/params can be invalid for encoding

オープン
#2,047 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
external contribution FDE
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。