Coder Social home page Coder Social logo

Comments (3)

PatriQ94 avatar PatriQ94 commented on June 5, 2024 1

given that the amount of seeds which need to be transitioned is really low

How do we know this? Perhaps this is the truth cause we're still in early stages, so not many people are familiar with the AM since AM is one of the newest additions on the IOTA stack. I guess we'll see with time.

there's no 100% deterministic way to do build up an account just from a seed.

Yes, completely agree with this, no way to do it with just a seed. There would definitely have to be some restrictions and conditions upon which a transition would be doable, like the ones you've mentioned.

I will leave this issue open but I won't invest time in implementing it in the foreseeable future.

Understandable. We'll see with time if question/demand regarding this increases. This is also the reason why I wrote this here instead of Discord, so it's more visible and easier to find in case a question on this pops up again.

from iota.go.

luca-moser avatar luca-moser commented on June 5, 2024

Hey PatriQ

it is crucial to cover both freshly created seeds and already used seeds.

I fail to understand why it is important to have a transition functionality in the library, given that the amount of seeds which need to be transitioned is really low and there's no 100% deterministic way to do build up an account just from a seed. (which is one of the reasons why a new seed is required).

Given a person which has an old seed with 1Mi on it, scattered over 100 addresses: It is much easier if that person simply creates a new seed, initializes an account, creates a new CDA and then deposits all funds from his/her previous seed onto the account.

If an automatic transition function should do the job, it has no knowledge over the addresses which were generated with that seed. The addresses containing the funds could be scattered in any random spacing.

This could also allow the same Account to be on multiple devices as long as they never run simultaneously, but take turns running and sync their state beforehand.

Synchronizing the account state over multiple devices using the same seed must be done by a higher-level coordination and is not recommended exactly because one must get the synchronization part right.

Overall, I currently do not see a good enough reason for adding such functionality as there is only a low amount of seeds which would need to be transitioned anyway.

I will leave this issue open but I won't invest time in implementing it in the foreseeable future.


Lets say we want to add such functionality, what kind of requirements must be met in order to be able to transition correctly?:

  • There must not be any ongoing deposits/withdrawals from any address generated from the seed
  • The user must know the last key index used for generating addresses

Given this two requirements, we can do following for transitioning:

  1. Generate all addresses up to the last used key index
  2. Gather all addresses with funds
  3. Allocate a new CDA with last used key index + 1 with the expected amount equal to the funds
  4. Issue a deposit from all gathered addresses to the newly allocated CDA
  5. Block the Transition() function as long as the deposit isn't confirmed.

This procedure ensures, that all addresses not allocated by the account module will not be further used/make part of the account's state.

from iota.go.

luca-moser avatar luca-moser commented on June 5, 2024

Bigger changes will probably be part of the Rust core lib. Closing this issue since this won't be implemented probably in this lib.

from iota.go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.