This repository has been archived by the owner. It is now read-only.

StorageSpending in /renter/contracts is not strictly increasing #2768

Open
mtlynch opened this Issue Feb 16, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@mtlynch
Contributor

mtlynch commented Feb 16, 2018

BUG REPORT

How to reproduce it (as minimally and precisely as possible)

  1. Deposit 500 SC into Sia wallet
  2. Set allowance of 500 SC for 12w
  3. Wait for 50 contracts to form
  4. Upload 300 GiB of data to Sia, 5 files at a time

Instructions for repro with the tools I used are as follows:

DATA_DIR=~/repro-data

# Generate data to upload
BYTES_PER_FILE=10737418240 # 10 GiB
TOTAL_SIZE=322122547200 # 300 GiB

git clone https://github.com/mtlynch/dummy_file_generator.git
pushd dummy_file_generator
python dummy_file_generator/main.py \
  --size_per_file $BYTES_PER_FILE \
  --total_size $TOTAL_SIZE \
  --output_prefix "${DATA_DIR}/dummy-file-
popd

# Upload to Sia
OUTPUT_DIR=/tmp/sia-test-output

git clone https://github.com/mtlynch/sia_load_tester.git
pushd sia_load_tester
pip install -r requirements.txt
python sia_load_tester\main.py \
  --dataset_root $DATA_DIR \
  --output_dir OUTPUT_DIR

Expected Behavior

storagespending attribute of /renter/contracts strictly increases as data is uploaded.

Actual Behavior

storagespending attribute of /renter/contracts increases and decreases.

image

More data: https://docs.google.com/spreadsheets/d/1g6bMB7CrH_Nn7orUfguD7RDd_9rmHKlXLJrrqv06sd4/edit#gid=1191012075

This seems to be a bug in the accounting or spending because once funds are allocated to storage spending, they shouldn't ever go down.

Logs

https://gist.github.com/mtlynch/ccc29acfbd7cf4c9716180eac2af39a5

Environment

  • Sia version: 1.3.1
  • OS: Windows 10 x64

@tbenz9 tbenz9 added the Bug label Feb 16, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.