-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More useful ideas #464
Comments
Extension for built-in account abstract:
Here's a concrete implementation Sync account between frontend and backendsequenceDiagram
participant Frontend
participant Backend
Frontend ->> Backend: sync_account(10 addresses)
Backend ->> Backend: store 10 addresses to account_id
Backend ->> Frontend: account_id
Frontend ->> Backend: get_balance(account_id, latest_address_in_frontend)
Backend ->> Backend: compare_latest_addresses(latest_address_in_frontend, latest_address_in_backend)
alt is false
Backend ->> Frontend: account_info_out_of_date(latest_address_in_backend)
Frontend ->> Backend: sync_account(addresses_diff_between_frontend_and_backend)
Frontend ->> Backend: get_balance(account_id, latest_address_in_frontend)
end
Backend ->> Frontend: balance_of_address_from_address_0_to_latest_address
The |
There's another strategy to calibrate the address set without binding to an account. sequenceDiagram
participant Frontend
participant Backend
loop
Frontend ->> Frontend: H = Hash(Address set)
Frontend ->> Backend: get_balance(H)
Backend ->> Frontend: H is not found
Frontend ->> Backend: subscribe_address_set(address set)
Backend ->> Backend: H = Hash(Address set)
Frontend ->> Backend: get_balance(H)
Backend ->> Frontend: balance of address set H
Frontend ->> Frontend: address set grows to address set'
Frontend ->> Frontend: H' = Hash(Address set')
end
By this idea, account id can be avoided and epherel address set will be registered in backend with its hash |
Solution confirmed, technical details available at #554 |
I've got these thoughts during reading https://mirror.xyz/vanishk.eth/MTwltQDrHZenEPaFB9YsnScHVREmA3EWfLW-r9VguXs
It's just a TODOs now, and I will enrich each one ASAP.
What we have, but can be better
What we can add
account from dapp perspective
natively. The key point is how to map a bundle of addresses to an account in the backend natively.The text was updated successfully, but these errors were encountered: