neuron icon indicating copy to clipboard operation
neuron copied to clipboard

feat: Supports amend transactions

Open devchenyan opened this issue 1 year ago • 4 comments

issue: https://github.com/Magickbase/neuron-public-issues/issues/332

https://github.com/nervosnetwork/neuron/assets/11756869/649f35a7-1752-470b-ac47-1e571a3005da

devchenyan avatar Apr 19 '24 01:04 devchenyan

@devchenyan Please review the above comments.

Danie0918 avatar Apr 28 '24 06:04 Danie0918

@homura @yanguoyu Please have a review.

Danie0918 avatar Apr 30 '24 01:04 Danie0918

@Keith-CY @homura Please have a review.

Danie0918 avatar May 07 '24 01:05 Danie0918

/package

Packaging for test is done in 8994883540. @silySuper

silySuper avatar May 08 '24 01:05 silySuper

/package Packaging for test is done in 9072896666. @silySuper

silySuper avatar May 14 '24 02:05 silySuper

Please merge latest code to this branch to sync normally @Keith-CY @devchenyan

silySuper avatar May 14 '24 07:05 silySuper

Please merge latest code to this branch to sync normally @Keith-CY @devchenyan

Conflicted @devchenyan

Keith-CY avatar May 14 '24 07:05 Keith-CY

Please merge latest code to this branch to sync normally @Keith-CY @devchenyan

Merged

Keith-CY avatar May 14 '24 08:05 Keith-CY

neuron-ui: Module not found: Error: Can't resolve '@nervosnetwork/ckb-sdk-utils' in '/home/runner/work/neuron/neuron/packages/neuron-ui/src/components/AmendPendingTransactionDialog'

@nervosnetwork/ckb-sdk-utils was removed by PR https://github.com/nervosnetwork/neuron/pull/3149

Keith-CY avatar May 14 '24 08:05 Keith-CY

/package Packageing failed in 9076288137. @silySuper

silySuper avatar May 14 '24 08:05 silySuper

/package Packaging for test is done in 9076510260. @devchenyan

devchenyan avatar May 14 '24 08:05 devchenyan

send transaction shows error. 截屏2024-05-14 18 02 23

main.log

silySuper avatar May 14 '24 10:05 silySuper

send transaction shows error. 截屏2024-05-14 18 02 23

main.log

Is this an occasional or mandatory error, I didn't encounter this error when I downloaded the package and tested it.

devchenyan avatar May 14 '24 11:05 devchenyan

send transaction shows error. 截屏2024-05-14 18 02 23 main.log

Is this an occasional or mandatory error, I didn't encounter this error when I downloaded the package and tested it.

In my computer ,it is appear certainly,you can watch which informantion you need to check and I will offer you to solve it.

silySuper avatar May 15 '24 01:05 silySuper

send transaction shows error. 截屏2024-05-14 18 02 23

main.log

It will be better to describe how to reproduce this issue. And it looks like the replace_fee is less than required. We can export the replacement transaction and the original transaction.

yanguoyu avatar May 15 '24 02:05 yanguoyu

send transaction shows error. 截屏2024-05-14 18 02 23 main.log

It will be better to describe how to reproduce this issue. And it looks like the replace_fee is less than required. We can export the replacement transaction and the original transaction.

It was created during send transaction, I have send transaction successfully once ,then click refresh ,then send transaction again ,then show the error always,also deposit show this error too.It is not created by special operration,but by normal operation.I guess it may related to sync block.

silySuper avatar May 15 '24 02:05 silySuper

sync has problem(sync progress see this issue:https://github.com/nervosnetwork/ckb/issues/4462),so I watch some situations which does not need transaction confirmed. 截屏2024-05-15 14 54 37 截屏2024-05-15 14 57 39

silySuper avatar May 15 '24 07:05 silySuper

sync has problem(sync progress see this issue:nervosnetwork/ckb#4462 I watch some situations which does not need transaction confirmed. 截屏2024-05-15 14 54 37 截屏2024-05-15 14 57 39

1、amend transaction does not support selection of unit prices 2、“Unconfirmed Outputs are allowed in the transaction” is necessary 3、Too large a fee causes outputs to be larger than inputs, so cannot submit the transaction

devchenyan avatar May 15 '24 07:05 devchenyan

sync has problem(sync progress see this issue:nervosnetwork/ckb#4462 I watch some situations which does not need transaction confirmed. 截屏2024-05-15 14 54 37 截屏2024-05-15 14 57 39

1、amend transaction does not support selection of unit prices 2、“Unconfirmed Outputs are allowed in the transaction” is necessary 3、Too large a fee causes outputs to be larger than inputs, so cannot submit the transaction

1.Why is the 'Price' button not available here, and also, how is the 'Suggested price' calculated? 2,3 OK

Danie0918 avatar May 15 '24 09:05 Danie0918

sync has problem(sync progress see this issue:nervosnetwork/ckb#4462 I watch some situations which does not need transaction confirmed. 截屏2024-05-15 14 54 37 截屏2024-05-15 14 57 39

1、amend transaction does not support selection of unit prices 2、“Unconfirmed Outputs are allowed in the transaction” is necessary 3、Too large a fee causes outputs to be larger than inputs, so cannot submit the transaction

1.Why is the 'Price' button not available here, and also, how is the 'Suggested price' calculated? 2,3 OK

sync has problem(sync progress see this issue:nervosnetwork/ckb#4462 I watch some situations which does not need transaction confirmed. 截屏2024-05-15 14 54 37 截屏2024-05-15 14 57 39

1、amend transaction does not support selection of unit prices 2、“Unconfirmed Outputs are allowed in the transaction” is necessary 3、Too large a fee causes outputs to be larger than inputs, so cannot submit the transaction

1.Why is the 'Price' button not available here, and also, how is the 'Suggested price' calculated? 2,3 OK

Because it is recommended that the price options routinely suggested are likely to be lower than the price needed to amend the transaction.And the user does not need to amend the suggested price by himself.

Get min_replace_fee via api and calculate it with the size of the transaction to get the 'Suggested price'

devchenyan avatar May 15 '24 09:05 devchenyan

sync has problem(sync progress see this issue:nervosnetwork/ckb#4462 I watch some situations which does not need transaction confirmed. 截屏2024-05-15 14 54 37 截屏2024-05-15 14 57 39

1、amend transaction does not support selection of unit prices 2、“Unconfirmed Outputs are allowed in the transaction” is necessary 3、Too large a fee causes outputs to be larger than inputs, so cannot submit the transaction

1.Why is the 'Price' button not available here, and also, how is the 'Suggested price' calculated? 2,3 OK

sync has problem(sync progress see this issue:nervosnetwork/ckb#4462 I watch some situations which does not need transaction confirmed. 截屏2024-05-15 14 54 37 截屏2024-05-15 14 57 39

1、amend transaction does not support selection of unit prices 2、“Unconfirmed Outputs are allowed in the transaction” is necessary 3、Too large a fee causes outputs to be larger than inputs, so cannot submit the transaction

1.Why is the 'Price' button not available here, and also, how is the 'Suggested price' calculated? 2,3 OK

Because it is recommended that the price options routinely suggested are likely to be lower than the price needed to amend the transaction.And the user does not need to amend the suggested price by himself.

Get min_replace_fee via api and calculate it with the size of the transaction to get the 'Suggested price'

OK.

Danie0918 avatar May 15 '24 09:05 Danie0918

In cell management: 1.when click submit the transaction,transaction hash is null ,but can copy,copy result is undefined. 截屏2024-05-16 14 55 18

截屏2024-05-16 14 50 04

silySuper avatar May 16 '24 07:05 silySuper

In cell management: 1.when click submit the transaction,transaction hash is null ,but can copy,copy result is undefined. 截屏2024-05-16 14 55 18

截屏2024-05-16 14 50 04

fixed @silySuper

devchenyan avatar May 17 '24 00:05 devchenyan

/package Packaging for test is done in 9121303973. @devchenyan

devchenyan avatar May 17 '24 01:05 devchenyan

In Nervos Dao: withdraw/create account amend can only be operated once,when amend twice it shows 截屏2024-05-17 09 44 27

unlock does not see amend button.

截屏2024-05-17 09 45 09

silySuper avatar May 17 '24 02:05 silySuper

In Nervos Dao: withdraw/create account amend can only be operated once,when amend twice it shows 截屏2024-05-17 09 44 27

unlock does not see amend button.

截屏2024-05-17 09 45 09
  1. withdraw/create account amend can amend twice. Please make sure that the amend tx is new transaction, as the amended transaction will fail and be removed. image

https://github.com/nervosnetwork/neuron/assets/11756869/232692b4-e6e3-46e5-8248-cb5711a01c3e

  1. The type of Unlcok is 'receive'. The treatment condition inputs-fee=outputs is not satisfied image

devchenyan avatar May 17 '24 03:05 devchenyan

/package Packaging for test is done in 9152602959. @silySuper

silySuper avatar May 20 '24 02:05 silySuper

In Nervos Dao: withdraw/create account amend can only be operated once,when amend twice it shows 截屏2024-05-17 09 44 27 unlock does not see amend button. 截屏2024-05-17 09 45 09

  1. withdraw/create account amend can amend twice. Please make sure that the amend tx is new transaction, as the amended transaction will fail and be removed. image

Screen-2024-05-17-113455.mp4 2. The type of Unlcok is 'receive'. The treatment condition inputs-fee=outputs is not satisfied

image

For the first problem,your video is different from mine.My operation is clicking amend when status is pending on amend transaction(not the first transaction). I guess is the status is failed in db,but shows pending in page cause this problem,so you can click amend but cannot fill in amend data.This can be considered to optimize when you are convenient later.

silySuper avatar May 20 '24 06:05 silySuper