Skip to content

Commit

Permalink
Merge branch 'develop' into dev-tools/fix-deny
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez authored Jul 26, 2024
2 parents 8da469c + eb59dd9 commit 7fdb8c2
Show file tree
Hide file tree
Showing 35 changed files with 778 additions and 789 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,6 @@ total_stake: u64</code>
</dt>
<dd>

</dd>
<dt>
<code>
storage_fund_reinvestment: u64</code>
</dt>
<dd>

</dd>
<dt>
<code>
Expand Down Expand Up @@ -2389,8 +2382,6 @@ or smaller than the computation reward.
reference_gas_price: self.reference_gas_price,
total_stake: new_total_stake,
storage_charge: storage_charge_value,
// TODO: remove(obsolete)
storage_fund_reinvestment: 0,
storage_rebate: storage_rebate_amount,
storage_fund_balance: self.<Link to="storage_fund#0x3_storage_fund">storage_fund</Link>.total_balance(),
// TODO: remove(obsolete)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ module iota_system::iota_system_state_inner {
protocol_version: u64,
reference_gas_price: u64,
total_stake: u64,
storage_fund_reinvestment: u64,
storage_charge: u64,
storage_rebate: u64,
storage_fund_balance: u64,
Expand Down Expand Up @@ -932,8 +931,6 @@ module iota_system::iota_system_state_inner {
reference_gas_price: self.reference_gas_price,
total_stake: new_total_stake,
storage_charge: storage_charge_value,
// TODO: remove(obsolete)
storage_fund_reinvestment: 0,
storage_rebate: storage_rebate_amount,
storage_fund_balance: self.storage_fund.total_balance(),
// TODO: remove(obsolete)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE epochs ADD COLUMN storage_fund_reinvestment BIGINT;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE epochs DROP COLUMN storage_fund_reinvestment;
6 changes: 0 additions & 6 deletions crates/iota-indexer/src/models/epoch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ pub struct StoredEpochInfo {
pub epoch_total_transactions: Option<i64>,
pub last_checkpoint_id: Option<i64>,
pub epoch_end_timestamp: Option<i64>,
// TODO: remove(obsolete)
pub storage_fund_reinvestment: Option<i64>,
pub storage_charge: Option<i64>,
pub storage_rebate: Option<i64>,
// TODO: remove(obsolete)
Expand All @@ -49,8 +47,6 @@ pub struct QueryableEpochInfo {
pub epoch_total_transactions: Option<i64>,
pub last_checkpoint_id: Option<i64>,
pub epoch_end_timestamp: Option<i64>,
// TODO: remove(obsolete)
pub storage_fund_reinvestment: Option<i64>,
pub storage_charge: Option<i64>,
pub storage_rebate: Option<i64>,
// TODO: remove(obsolete)
Expand Down Expand Up @@ -90,7 +86,6 @@ impl StoredEpochInfo {
epoch_total_transactions: e.epoch_total_transactions.map(|v| v as i64),
last_checkpoint_id: e.last_checkpoint_id.map(|v| v as i64),
epoch_end_timestamp: e.epoch_end_timestamp.map(|v| v as i64),
storage_fund_reinvestment: e.storage_fund_reinvestment.map(|v| v as i64),
storage_charge: e.storage_charge.map(|v| v as i64),
storage_rebate: e.storage_rebate.map(|v| v as i64),
stake_subsidy_amount: e.stake_subsidy_amount.map(|v| v as i64),
Expand Down Expand Up @@ -127,7 +122,6 @@ impl From<&StoredEpochInfo> for Option<EndOfEpochInfo> {
total_stake: info.total_stake as u64,
storage_fund_balance: info.storage_fund_balance as u64,
epoch_end_timestamp: info.epoch_end_timestamp.map(|v| v as u64)?,
storage_fund_reinvestment: info.storage_fund_reinvestment.map(|v| v as u64)?,
storage_charge: info.storage_charge.map(|v| v as u64)?,
storage_rebate: info.storage_rebate.map(|v| v as u64)?,
stake_subsidy_amount: info.stake_subsidy_amount.map(|v| v as u64)?,
Expand Down
1 change: 0 additions & 1 deletion crates/iota-indexer/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ diesel::table! {
epoch_total_transactions -> Nullable<Int8>,
last_checkpoint_id -> Nullable<Int8>,
epoch_end_timestamp -> Nullable<Int8>,
storage_fund_reinvestment -> Nullable<Int8>,
storage_charge -> Nullable<Int8>,
storage_rebate -> Nullable<Int8>,
stake_subsidy_amount -> Nullable<Int8>,
Expand Down
2 changes: 0 additions & 2 deletions crates/iota-indexer/src/store/pg_indexer_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,6 @@ impl PgIndexerStore {
.eq(excluded(epochs::epoch_total_transactions)),
epochs::last_checkpoint_id.eq(excluded(epochs::last_checkpoint_id)),
epochs::epoch_end_timestamp.eq(excluded(epochs::epoch_end_timestamp)),
epochs::storage_fund_reinvestment
.eq(excluded(epochs::storage_fund_reinvestment)),
epochs::storage_charge.eq(excluded(epochs::storage_charge)),
epochs::storage_rebate.eq(excluded(epochs::storage_rebate)),
epochs::stake_subsidy_amount.eq(excluded(epochs::stake_subsidy_amount)),
Expand Down
3 changes: 0 additions & 3 deletions crates/iota-indexer/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ pub struct IndexedEpochInfo {
pub epoch_total_transactions: Option<u64>,
pub last_checkpoint_id: Option<u64>,
pub epoch_end_timestamp: Option<u64>,
// TODO: remove(obsolete)
pub storage_fund_reinvestment: Option<u64>,
pub storage_charge: Option<u64>,
pub storage_rebate: Option<u64>,
// TODO: remove(obsolete)
Expand Down Expand Up @@ -148,7 +146,6 @@ impl IndexedEpochInfo {
),
last_checkpoint_id: Some(*last_checkpoint_summary.sequence_number()),
epoch_end_timestamp: Some(last_checkpoint_summary.timestamp_ms),
storage_fund_reinvestment: Some(event.storage_fund_reinvestment),
storage_charge: Some(event.storage_charge),
storage_rebate: Some(event.storage_rebate),
burnt_leftover_amount: Some(event.burnt_leftover_amount),
Expand Down
3 changes: 0 additions & 3 deletions crates/iota-json-rpc-types/src/iota_extended.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ pub struct EndOfEpochInfo {
pub total_stake: u64,
#[schemars(with = "BigInt<u64>")]
#[serde_as(as = "BigInt<u64>")]
pub storage_fund_reinvestment: u64,
#[schemars(with = "BigInt<u64>")]
#[serde_as(as = "BigInt<u64>")]
pub storage_charge: u64,
#[schemars(with = "BigInt<u64>")]
#[serde_as(as = "BigInt<u64>")]
Expand Down
5 changes: 0 additions & 5 deletions crates/iota-protocol-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,6 @@ pub struct ProtocolConfig {
/// storage rebate back. In basis point.
storage_rebate_rate: Option<u64>,

/// 5% of the storage fund's share of rewards are reinvested into the
/// storage fund. In basis point.
storage_fund_reinvest_rate: Option<u64>,

/// The share of rewards that will be slashed and redistributed is 50%.
/// In basis point.
reward_slashing_rate: Option<u64>,
Expand Down Expand Up @@ -1362,7 +1358,6 @@ impl ProtocolConfig {
obj_metadata_cost_non_refundable: Some(50),
gas_model_version: Some(8),
storage_rebate_rate: Some(10000),
storage_fund_reinvest_rate: Some(0),
// Change reward slashing rate to 100%.
reward_slashing_rate: Some(10000),
storage_gas_price: Some(76),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ gas_model_version: 8
obj_data_cost_refundable: 100
obj_metadata_cost_non_refundable: 50
storage_rebate_rate: 10000
storage_fund_reinvest_rate: 0
reward_slashing_rate: 10000
storage_gas_price: 76
validator_target_reward: 767000000000000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ gas_model_version: 8
obj_data_cost_refundable: 100
obj_metadata_cost_non_refundable: 50
storage_rebate_rate: 10000
storage_fund_reinvest_rate: 0
reward_slashing_rate: 10000
storage_gas_price: 76
validator_target_reward: 767000000000000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ gas_model_version: 8
obj_data_cost_refundable: 100
obj_metadata_cost_non_refundable: 50
storage_rebate_rate: 10000
storage_fund_reinvest_rate: 0
reward_slashing_rate: 10000
storage_gas_price: 76
validator_target_reward: 767000000000000
Expand Down
2 changes: 0 additions & 2 deletions crates/iota-types/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ pub struct SystemEpochInfoEvent {
pub protocol_version: u64,
pub reference_gas_price: u64,
pub total_stake: u64,
// TODO: remove(obsolete)
pub storage_fund_reinvestment: u64,
pub storage_charge: u64,
pub storage_rebate: u64,
pub storage_fund_balance: u64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ pub struct IotaSystemStateSummary {
#[schemars(with = "BigInt<u64>")]
#[serde_as(as = "Readable<BigInt<u64>, _>")]
pub storage_fund_total_object_storage_rebates: u64,
/// The non-refundable portion of the storage fund coming from storage
/// reinvestment, non-refundable storage rebates and any leftover
/// The non-refundable portion of the storage fund coming from
/// non-refundable storage rebates and any leftover
/// staking rewards.
#[schemars(with = "BigInt<u64>")]
#[serde_as(as = "Readable<BigInt<u64>, _>")]
Expand Down
72 changes: 46 additions & 26 deletions docs/content/about-iota/about-iota.mdx
Original file line number Diff line number Diff line change
@@ -1,37 +1,57 @@
---
title: IOTA Concepts Overview
sidebar_label: Overview
title: About IOTA
---

IOTA is different than other blockchains. The concepts explored in this section provide a background to the IOTA blockchain and web3 in general.

## Move
The name IOTA is the ninth letter of the Greek alphabet (Ι, ι) and is used figuratively in English to mean a very small amount, reflecting its status as one of the smallest Greek letters.

When you read about IOTA in this documentation, it's referencing all the pieces of the system that comprise the blockchain. This includes the blockchain itself, its various networks (Mainnet, for example), the activity on the blockchain (transaction blocks), the distributed entities that verify this activity (validators), and the Full nodes that execute transaction blocks. The documentation refers to the entirety of these elements as the IOTA platform, or simply IOTA.

## The IOTA blockchain

IOTA is defined as a Layer 1 protocol blockchain. In basic terms, this means that IOTA performs its own consensus and validation for transaction blocks (activity) on its networks using its own native token (IOTA, in this case). Ethereum (ETH) and Bitcoin (BTC) are other examples of Layer 1 blockchains.

Layer 2 blockchains, by contrast, leverage the infrastructure of Layer 1 networks, relying on the Layer 1 blockchain to finalize transaction blocks. Polygon (MATIC) is an example of a Layer 2 blockchain that extends Ethereum.

## IOTA tokens

The native token for the IOTA network is IOTA. Transaction blocks on IOTA often deal with small fractions of the value of one IOTA. To make these transaction blocks easier to work with, IOTA provides NANOS. It takes one billion NANOS to equal one IOTA.

It costs money to provide computational power to process transaction blocks and store their results. The term for the cost of processing transaction blocks is "gas". You pay for gas and the cost of storing data with a blockchain's native tokens, in this case, IOTA (or NANOS).

To learn more about the tokenomics of IOTA, see the following topics:

<Cards>
<Card title="Move overview" href="/developer/iota-101/iota-move-concepts"/>
<Card title="Patterns" href="developer/iota-101/iota-move-concepts/patterns"/>
<Card title="Package upgrades" href="developer/iota-101/iota-move-concepts/packages/upgrade">
</Card>
</Cards>
- [IOTA Tokenomics](./tokenomics.mdx)
- [IOTA Token](./tokenomics/iota-token.mdx)
- [Gas in IOTA](./tokenomics/gas-in-iota.mdx)

## Objects
## Delegated proof-of-stake consensus

<Cards>
<Card title="Object Model" href="about-iota/object-model"/>
<Card title="Dynamic Fields" href="about-iota/dynamic-fields"/>
<Card title="Transfer to Object" href="about-iota/transfers/transfer-to-object"/>
</Cards>
IOTA uses a delegated proof-of-stake (DPoS) consensus mechanism to validate on-chain transaction blocks. This means that validators on the IOTA network must have a certain amount of IOTA secured on IOTA Mainnet, either with their own funds or in partnership with IOTA Foundation, to prove their interest in the security of the blockchain. This approach aligns the interest of all validators with that of IOTA users (an efficient, secure blockchain), without the high energy-resource demands of earlier blockchains.

## Cryptography
To learn more about consensus on IOTA, see the following guides and topics:

<Cards>
<Card title="Transaction authentication" href="about-iota/cryptography/transaction-auth"/>
</Cards>
- [Validator Committee](../operator/validator-committee.mdx)
- [IOTA Full Node Data Management](../operator/data-management.mdx)



## IOTA networks

IOTA has several networks available, each serving a different purpose.

- **Mainnet:** The network that processes production transaction blocks. When you trade IOTA or NFTs that are ultimately based on fiat currency, you are doing so on the Mainnet network of IOTA.
- **Testnet:** Staging network to provide quality assurance that any planned changes to IOTA do not adversely impact performance. Developers can use this network to test their code before placing it in production.
- **Devnet:** A more unstable network that is used to develop new features. Developers can leverage this network to code against the latest planned features of IOTA.
- **Localnet:** You can run an IOTA network on your local computer. Developing on a local network provides an optimized workflow in an environment you control.

To learn more about these networks and how to interact with them, see the following guides:

- [Create a Local IOTA Network](../developer/getting-started/local-network.mdx)
- [Connect to IOTA](../developer/getting-started/connect.mdx)

## Move

## Tokenomics
The Move language provides the logic for all activity on IOTA, like trading NFTs, playing IOTA-integrated games (dApps), and all other transaction-based events. The IOTA platform uses a concept novel to earlier blockchains, where blocks on the chain are actually objects that define assets rather than simple key-value stores that define addresses. The increased programmability inherent with objects required a more robust logic engine to maximize the benefits of this new approach to blockchain technology.

<Cards>
<Card title="IOTA token" href="about-iota/tokenomics/iota-coin" />
<Card title="Gas in IOTA" href="about-iota/tokenomics/gas-in-iota" />
<Card title="Storage fund" href="about-iota/tokenomics/storage-fund" />
</Cards>
To learn more about Move, see [Move Concepts](../developer/iota-101/iota-move-concepts/iota-move-concepts.mdx).
56 changes: 0 additions & 56 deletions docs/content/about-iota/components.mdx

This file was deleted.

6 changes: 0 additions & 6 deletions docs/content/about-iota/iota-architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ Narwhal and Bullshark combine to form the basis of the IOTA mempool and consensu

Go to [Mempool and Consensus Engines](./iota-architecture/consensus.mdx).

## IOTA Indexer

Running an IOTA indexer offloads data processing from your Full node and stores it in a relational database. This topic explores some of the benefits running an indexer has and points to instruction on how to run your own.

Go to [IOTA Indexer](./iota-architecture/indexer-functions.mdx).

## Protocol Upgrades

The IOTA protocol, framework, and execution engine are frequently extended to include new functionality and bug fixes. This functionality is added in the form of new code which is released to validator operators as part of our regular software releases. The IOTA protocol, however, requires that all IOTA validators agree about the results of executing each transaction.
Expand Down
4 changes: 2 additions & 2 deletions docs/content/about-iota/iota-architecture/consensus.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: IOTA Mempool and Consensus Engines
sidebar_label: Mempool and Consensus Engines
sidebar_label: Mempool and Consensus
description: Overview of the IOTA mempool and consensus engines, Narwhal and Bullshark.
---

Expand Down Expand Up @@ -80,7 +80,7 @@ Narwhal is implemented using [Tokio](https://github.com/tokio-rs/tokio), [RocksD

## Configuration

To conduct a fresh deployment of IOTA Consensus Engine, follow the instructions at [Running Benchmarks](https://github.com/iotaledger/iota/blob/main/narwhal/benchmark).
To conduct a fresh deployment of IOTA Consensus Engine, follow the instructions at [Running Benchmarks](https://github.com/iotaledger/iota/blob/develop/narwhal/benchmark).

## Further reading

Expand Down
Loading

0 comments on commit 7fdb8c2

Please sign in to comment.