Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

DNA dev mode #1302

Open
maackle opened this issue Apr 19, 2019 · 0 comments
Open

DNA dev mode #1302

maackle opened this issue Apr 19, 2019 · 0 comments
Labels
adr Architecture Decision Records enhancement New feature or request

Comments

@maackle
Copy link
Member

maackle commented Apr 19, 2019

Half-baked idea, please expand:

#1300 is probably a pre-requisite for this to work

DNA dev mode

Currently, DNA addresses are always specified by the hash of the DNA bundle. For development purposes this is problematic, because every code change results in a new DNA address, and total loss of data.

How about we have a dev-mode DNA config, where instead of pointing to a built DNA package, the config points to a source directory containing its code, and the user specifies a string to use as the DNA address, rather than the hash. Then a developer can keep hacking away at the code without losing the source chain in between changes.

[[dnas]]
id = "dna-id"
dev_source = "path/to/dna/project"
# omit `file` and `hash`

Caveats

This would make it vastly easier for people to join networks as bad actors, so maybe we would also disable or severely limit networking for DNAs in test mode, or simply prevent users from entering actual DNA hashes as dev-mode addresses.

Of course it would also open up the possibility of a user ruining the integrity of their source chain because of validation rules changing over the lifetime of their DNA, but they're in hack mode and it's up to them to manage. This is analogous to hot-reloading -- for some changes you can hot-reload, but sometimes you just have to restart fresh to clear out the inconsistent state.

@maackle maackle added enhancement New feature or request Discussion adr Architecture Decision Records labels Apr 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
adr Architecture Decision Records enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants