gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
841 stars 342 forks source link

Add/append balances and txs when genesis exists #2391

Open mazzy89 opened 1 week ago

mazzy89 commented 1 week ago

Description

When gnoland starts with lazy flag, the genesis is crafted adding balances and txs. when gnoland start without the lazy flag, if the genesis already exists then balances and txs are not added to the genesis then flags such as -genesis-balances-file aren't used.

From my standpoint, it would make sense to honor those flags in any case even when the genesis exists and add/append their content into the crafted genesis.

grepsuzette commented 3 days ago

From my standpoint, it would make sense to honor those flags in any case even when the genesis exists and add/append their content into the crafted genesis.

I think it should not be possible to modify balances out of thin air after a chain is created. You would instead use something like gnofaucet?

zivkovicmilos commented 3 days ago

@mazzy89 you're if the genesis.json exists already at the path, the lazy init (which utilizes these flags / files) is skipped

We're actually looking to completely drop those files from the gnoland start command, because they have no place there, since gnoland genesis covers all of their functionality

mazzy89 commented 3 days ago

Thanks @zivkovicmilos

@grepsuzette I was referring to the case when the user could pass in a genesis.json not fully filled of txs and balances (and the network has not started yet so height is 0). My initial assumption was those flags would be honored anyways but seems that indeed as Milos explanation, those are honored only in the presence of lazy init.

Thanks for making it clearer with the documentation