bee icon indicating copy to clipboard operation
bee copied to clipboard

Diluting takes a minute to update the postage stamps

Open agazso opened this issue 3 years ago • 0 comments

The problem here is that diluting takes a long time (about a minute) until the postage stamp is updated. This creates bad user experience, where someone using this feature may think that the action failed for some reason end retry, even though it was successful, but the feedback about it only arrives a minute later.

One possible solution for this could be to add a flag to the dilute action (and also for other postage stamp related functionality) which would change the behavior of the action to not return until the update event arrives to Bee from the blockhain.

Here is the original reported issue:

I could successfully dilute my stamp on mainnet with Bee 1.7.0, but it takes about a minute for the API to report to new value. Please note the timestamps.

15:56:05 swarm-cli 0 s stamp dilute --stamp 05e69442c78bf6bb894b09decf148d9b14d82b4faf2e28d6e02b2afde884ef7c --depth 23   
Stamp ID: 05e69442c78bf6bb894b09decf148d9b14d82b4faf2e28d6e02b2afde884ef7c
Depth: 22
Amount: 28350016
16:03:56 swarm-cli 0 s stamp show -v 05e69442c78bf6bb894b09decf148d9b14d82b4faf2e28d6e02b2afde884ef7c                    
Looking up postage stamp 05e69442c78bf6bb894b09decf148d9b14d82b4faf2e28d6e02b2afde884ef7c...
Stamp ID: 05e69442c78bf6bb894b09decf148d9b14d82b4faf2e28d6e02b2afde884ef7c
Label: test
Usage: 0%
TTL: 249310 seconds
Depth: 22
Bucket Depth: 16
Amount: 28350016
Usable: true
Utilization: 0
Block Number: 23626932
Immutable Flag: false
16:04:25 swarm-cli 0 s stamp show -v 05e69442c78bf6bb894b09decf148d9b14d82b4faf2e28d6e02b2afde884ef7c
Looking up postage stamp 05e69442c78bf6bb894b09decf148d9b14d82b4faf2e28d6e02b2afde884ef7c...
Stamp ID: 05e69442c78bf6bb894b09decf148d9b14d82b4faf2e28d6e02b2afde884ef7c
Label: test
Usage: 0%
TTL: 124637 seconds
Depth: 23
Bucket Depth: 16
Amount: 28250298
Usable: true
Utilization: 0
Block Number: 23626932
Immutable Flag: false

Originally posted by @Cafe137 in https://github.com/ethersphere/bee/issues/3092#issuecomment-1210723319

agazso avatar Aug 15 '22 15:08 agazso