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

DNA dev mode #1302

@maackle

Description

@maackle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    adrArchitecture Decision RecordsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions