Skip to content
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

Add a first draft for core tech address/transaction/block #205

Closed
wants to merge 6 commits into from

Conversation

tdroxler
Copy link
Member

@tdroxler tdroxler commented Jun 7, 2023

Here is a very first start to add those 3 pages, let's discuss and see if we want more for this first version

sidebar_label: Address
---

An Alephium address is an identifier used to interact with an Alephium network. Addresses can be user-controlled or deployed through a contract.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nit] "An Alephium address represents a user or a contract within the Alephium network."


Alephium has two address types:

* Asset: corresponding to a public/private key pair. Controlled by the private key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asset address type includes P2SH, I guess strictly speaking it might not be controlled by private keys.

* Receive, hold and send ALPH and tokens
* Interact with deployed contracts

Assets can have three different form:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Assets can have three different form:
Assets can have three different forms:


* P2C: Pay-to-Contract

## Asset address
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this paragraph is only valid for P2PKH.


An asset address is derived from a cryptographic pair of public and private keys, using the same [secp256k1's elliptic curve](https://en.bitcoin.it/wiki/Secp256k1) as bitcoin.
Those keys play a crucial role in validating the authenticity of a transaction and safeguarding against fraudulent activities.
The private key is used to sign the transactions, as the address is derived from the public key, anyone can validate the signature.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nit] It can be used to sign any messages, including transactions.


## Prerequisites

Understanding of a [Transaction](/core-tech/transaction) is a plus.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nit] Since this is under Prerequisites, perhaps update is a plus to is required.


## Overview of a Block

Each Alephium block includes various components, such as the timestamp of creation, a record of transactions, and a reference to the dependencies blocks. Additionally, it incorporates the solution to the mining puzzle that is unique to each block, so the network can easily verify its correctness. While multiple valid solutions may exist for a given block, only one needs to be discovered to consider the block solved. As an incentive for solving each block, miners are rewarded with new generated ALPH.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • new generated ALPH -> newly generated ALPH.
  • a reference to the dependencies blocks -> references to the dependent blocks

sidebar_label: Transaction
---

A transaction refers to the act of transferring an entity from one address to another within the network. It is a fundamental operation that enables the exchange of Alephium's native cryptocurrency ALPH, or any other tokens or contract data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the value transfer aspect of the transaction, we should probably capture the execution of the smart contract as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about:

A transaction in Alephium denotes the process of transferring an entity, such as Alephium's native cryptocurrency ALPH, tokens, or contract data, from some addresses to other ones within the network. Beyond facilitating the exchange of value, transactions also play a pivotal role in executing smart contracts. These contracts allow for the implementation of programmable logic, enabling a diverse range of functionalities and decentralized applications on the Alephium blockchain.

Totally no written with ChatGPT 🙊 🙈 🙉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe replace entity by asset ? Data can be considered an asset no ? It's just the word entity feels weird to me in this context.


A transaction typically includes the following components:

* Inputs: list of previous unspent outputs, transaction's signatures will prove that those inputs can be spent.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specific to P2PKH

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's why I introduce with A transaction typically, I was not thinking of going into advanced stuff. It should be covered in other docs I think.

* Transaction Fee: A small amount of cryptocurrency paid by the sender to to get his transaction included in a block.

When a transaction is created, it undergoes a validation process to ensure that the inputs have sufficient funds, the transaction is properly signed, UTXO model is respected and other relevant conditions are met.
Once validated, the transaction is added to a [block](/core-tech/block) and subsequently added to the [BlockFlow](/core-tech/blockflow-and-sharding), becoming a permanent part of Alephium's history.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: do we say a block is added to blockflow, since blockflow is an algorithm?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we say something like: and subsequently added to one of our sharded blockchain?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blockchain in which the bloc is added is not sharded (it's a single chain) so maybe "subsequently added to one of the blockchain of the Alephium's network". You could also add at the end "according to the groups of the addresses involved in the transaction".

@MaudSimon
Copy link
Member

@tdroxler I let you check if it can now be merged :)

@tdroxler
Copy link
Member Author

tdroxler commented Feb 1, 2024

@tdroxler I let you check if it can now be merged :)

image

@tdroxler tdroxler changed the base branch from new-docs-to-add to master February 1, 2024 16:29
@polarker
Copy link
Member

polarker commented Jul 7, 2024

The latest document has covered this

@polarker polarker closed this Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants