issues
search
QuarkChain
/
go-ethereum
Official Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
5
stars
2
forks
source link
support sstoragePisa.RemoveKVData
#113
Open
cyl19970726
opened
1 year ago
cyl19970726
commented
1 year ago
The remove operation consists of two steps.
First, replace the data corresponding to removeKvIdx selected by the operator with data of lastKvIdx
Second, set the data space of the original lastKvIdx to 0
Test
Tests are written in the contracts_test.go file.
I prepare three shards to test.
Shard Info : MaxKvEntries = 10; KVSize = 4
1024; chunksPerKv = 1; ChunkSize = 4
1024
Test case cover:
put
put test: the operation of storing data will fill up all shards
update
update test : the operation of updating data will update all data stored in each shard
remove
remove test:
case 1: removeKvIdx is equal to lastKvIdx
case 2: removeKvIdx and lastKvIdx are in the same Shard
case 3: removeKvIdx and lastKvIdx are in the different Shard
The remove operation consists of two steps.
Test