go-spacemesh icon indicating copy to clipboard operation
go-spacemesh copied to clipboard

Support PoS data size more than 2-4kb

Open brusherru opened this issue 1 year ago • 1 comments

Description

Right now go-spacemesh supports only numUnits that are equal to 2KB, 3KB, and 4KB. We want to make it possible to set up a bigger PoS data size (up to a few GB?) and test it as well.

The node implements GRPC endpoint SmesherService.PostConfig, which returns minNumUnits and maxNumUnits. Besides this, the node does not start smeshing (but syncing well) if numunits property specified in the node config is out of the range, and logs an error:

{"L":"ERROR","T":"2022-08-03T15:41:35.299+0300","N":"00000.defaultLogger","M":"failed to start smeshing: failed to start post setup session: new initializer: invalid `opts.NumUnits`; expected: <= 4, given: 4000"}

I think this is OK, so we just need to tweak min/maxNumUnits values ;)

Steps to reproduce

  1. Open node-config.json
  2. Change numUnits to some value greater than 4
  3. Run the node

Environment

  • Node Version: 0.2.17-beta.0

brusherru avatar Aug 03 '22 18:08 brusherru

MinNumUnits and MaxNumUnits are network params. NumUnits, picked by the user, must be in the range. The values you mentioned look like test params. Where are they taken from?

moshababo avatar Aug 24 '22 07:08 moshababo

This obviously first need finished parametrization. Then we set whatever is a result of parametrization.

pigmej avatar Dec 20 '22 13:12 pigmej

The implementation is finished with the post-rs. Now awaiting parametrization.

pigmej avatar Mar 24 '23 14:03 pigmej