public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: Alviro Iskandar Setiawan <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: Re: [RFC] GNU/Weeb Financial Transaction Record Design
Date: Wed, 15 Jun 2022 16:42:53 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAOG64qNV-TnS6yA4fDRBypk1SxyibQT36OheCM83w2HW_NCX8w@mail.gmail.com>

On 6/15/22 4:21 PM, Alviro Iskandar Setiawan wrote:
> Hi,
> 
> In order to keep the transaction record consistent, we can use a
> chaining hash system that generates the transaction ID by using its
> parent ID and the current transaction details.
> 
> For example, to create a new transaction, we have several things to note, like:
> 
>    1. date
>    2. description
>    3. commiter
>    4. amount
> 
>    [ other metadata stuff may be included ]
> 
> We can then generate the transaction id by using a hash function,
> let's say SHA1:
> 
>   trx_info = date . description . commiter . amount . parent_trx_id
>   trx_id   = SHA1(info)
>   SAVE(trx_id, date, description, commiter, amount, parent_trx_id)
> 
> Note that since the current trx ID uses its parent trx ID to generate
> itself, it makes the situation impossible to rewrite the history
> without breaking the whole chain. That's the point of the consistency
> in this design. We can verify that the data is consistent by just
> re-hashing the transaction info together with its parent trx id.
> 
> Also note that, for the first transaction, it doesn't have a parent
> trx id. So only the first transaction doesn't use a parent trx id to
> generate itself. Let's call it the genesis transaction.
> 
> Please comment!

Hi Al,

I like the idea of chaining the transaction ID to make the history
consistent and immutable. Overall it looks good to me, let's discuss
this further.

Several questions below:

  1) What are the exact fields we are going to save?

  2) How do we maintain a new field in the future if we ever add more?

  3) How do we distribute the trusted chains to public?

For no (2), you must not break the old records that don't have the new
field.

For no (3), I think it's quite simple, just post the transaction
history record periodically to the group. We can use a Telegram bot
for that.

Comment?

[ Anyway, you can start writing the code. ]

-- 
Ammar Faizi

  parent reply	other threads:[~2022-06-15  9:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15  9:21 [RFC] GNU/Weeb Financial Transaction Record Design Alviro Iskandar Setiawan
2022-06-15  9:23 ` Alviro Iskandar Setiawan
2022-06-15  9:42 ` Ammar Faizi [this message]
2022-06-15 10:00   ` Alviro Iskandar Setiawan
2022-06-15 10:03     ` Ammar Faizi
2022-06-15 10:06       ` Alviro Iskandar Setiawan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox