Skip to content

Conversation

@ElliotFriend
Copy link
Contributor

No description provided.

@ElliotFriend
Copy link
Contributor Author

@Julian-dev28 I cherry-picked your commit from the other branch, so you can pick up here

@stellar-jenkins
Copy link

| Events+return value size bytes | 200 B | 8 KB |
| Network Setting | Phase 0 | Phase 1 (current) | Phase 2 |
| --- | --- | --- | --- |
| Soroban Txn per ledger | 1 | 100 | 125 |
Copy link
Contributor

@Julian-dev28 Julian-dev28 Mar 18, 2024

Choose a reason for hiding this comment

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

@leighmcculloch, @dmkozh, or @MonsieurNicolas

Would you mind providing insight here? I've done my best to translate what I understand from the following proposed config update: link but may have missed some things.


Phase 2 marks the deployment of a user-ready Mainnet where anyone can deploy and interact with smart contracts. In this phase, the network is ready for more extensive smart contract utilization, so it's the practical beginning of smart contracts on the Stellar network. But even this is not the end of the journey. At the core of smart contracts on the Stellar network is scale and sustainability, and efforts to continue to expand capacity and introduce further capabilities to enhance the network's functionalities will be ongoing. See [this blog post](https://stellar.org/blog/developers/the-stellar-network-s-phased-rollout-of-smart-contracts-the-road-to-mainnet) for more details and share your feedback in [Discord](https://discord.com/invite/zVYdY3ktTn).

| Network setting | Phase 2 Cost (stroops) |
Copy link
Contributor

Choose a reason for hiding this comment

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

@leighmcculloch, @dmkozh, or @MonsieurNicolas

Review requested here as well

Copy link
Contributor

Choose a reason for hiding this comment

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

There have been changes to the write fees (target ledger size and empty/target ledger size fees.

contractLedgerCost.bucketListTargetSizeBytes = 12500000000 //before: 13000000000
contractLedgerCost.writeFee1KbBucketListLow = -193153 //before: -1234673
contractLedgerCost.writeFee1KbBucketListHigh = 57695 //before: 115390

@stellar-jenkins
Copy link

Copy link
Contributor

@dmkozh dmkozh left a comment

Choose a reason for hiding this comment

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

We have an overhaul planned for the fee/resource documentation. I've left some comments that are hopefully in line with this overhaul (basically get rid of irrelevant information and focus only on the current configuration).

| Temporary entry minimal/initial lifetime | 16 ledgers | 1 day |
| Max ledger entry expiration bump | 61 days | 6 months |
| Events+return value size bytes | 200 B | 8 KB |
| Network Setting | Phase 0 | Phase 1 (current) | Phase 2 |
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's get rid of the phases here completely, they are not useful for anything really.

| --- | --- | --- | --- |
| Soroban Txn per ledger | 1 | 100 | 125 |
| Max CPU Instructions per Txn | 2.5 million (2M instructions for max Wasm) | 100 million (VM instantiation consumes up to 23M for a 64KB Wasm, and 46M for multiple Wasms of 130KB) | 500 million |
| Memory limit per Txn | 2 MB | 40 MB | 42 MB |
Copy link
Contributor

Choose a reason for hiding this comment

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

There has been no change here. The difference is really between MiB and MB. I guess we have 40 MiB now de facto. I think we should pick the same unit kind for all the values in the doc. I think KB/MB is a bit easier to parse (though I recognize that KB is often treated as KiB, so I don't have a very strong preference).

| Transaction size | 10 KB | 70 KB | 70 KB |
| Persistent entry minimal/initial lifetime | 4,096 ledgers (~5.68 hours) | 120 days | 120 days |
| Temporary entry minimal/initial lifetime | 16 ledgers | 1 day | 1 day |
| Max ledger entry expiration bump | 61 days | 6 months | N/A |
Copy link
Contributor

Choose a reason for hiding this comment

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

These aren't N/A, they're the same as in phase 1


The ledger rent cost ('Write 1KB' entries in the table) is based on the write fee, rent period and some coefficient. For the temporary storage, the coefficient is 10 months (in ledgers), thus 1 month of temporary entry rent is 1/10 of the rent fee. For persistent storage the coefficient is 1 month (in ledgers) and thus 1 month of rent is equivalent to the write fee.

### Phase 2 (next) {#phase-2}
Copy link
Contributor

Choose a reason for hiding this comment

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

This becomes 'current' tomorrow. I don't think this information is really necessary here.


Phase 2 marks the deployment of a user-ready Mainnet where anyone can deploy and interact with smart contracts. In this phase, the network is ready for more extensive smart contract utilization, so it's the practical beginning of smart contracts on the Stellar network. But even this is not the end of the journey. At the core of smart contracts on the Stellar network is scale and sustainability, and efforts to continue to expand capacity and introduce further capabilities to enhance the network's functionalities will be ongoing. See [this blog post](https://stellar.org/blog/developers/the-stellar-network-s-phased-rollout-of-smart-contracts-the-road-to-mainnet) for more details and share your feedback in [Discord](https://discord.com/invite/zVYdY3ktTn).

| Network setting | Phase 2 Cost (stroops) |
Copy link
Contributor

Choose a reason for hiding this comment

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

There have been changes to the write fees (target ledger size and empty/target ledger size fees.

contractLedgerCost.bucketListTargetSizeBytes = 12500000000 //before: 13000000000
contractLedgerCost.writeFee1KbBucketListLow = -193153 //before: -1234673
contractLedgerCost.writeFee1KbBucketListHigh = 57695 //before: 115390


Phase 2 marks the deployment of a user-ready Mainnet where anyone can deploy and interact with smart contracts. In this phase, the network is ready for more extensive smart contract utilization, so it's the practical beginning of smart contracts on the Stellar network. But even this is not the end of the journey. At the core of smart contracts on the Stellar network is scale and sustainability, and efforts to continue to expand capacity and introduce further capabilities to enhance the network's functionalities will be ongoing. See [this blog post](https://stellar.org/blog/developers/the-stellar-network-s-phased-rollout-of-smart-contracts-the-road-to-mainnet) for more details and share your feedback in [Discord](https://discord.com/invite/zVYdY3ktTn).

| Network setting | Phase 2 Cost (stroops) |
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to separate this by phase, let's just update the values in-place.

@stellar-jenkins
Copy link


Soroban introduces smart contracts, marking the most transformative upgrade to the Stellar network to date. To maintain network performance, the ecosystem has decided to upgrade the network in a phased approach where network capacity is increased gradually over time. See [this blog post](https://stellar.org/blog/developers/the-stellar-network-s-phased-rollout-of-smart-contracts-the-road-to-mainnet) for more details and [Discord](https://discord.com/invite/zVYdY3ktTn) for current status.

| Network Setting | Phase 0 | Phase 1 (current) |
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't meant to remove the whole table, I meant we should just remove mentions of the phases and just have a single two column table (setting-value). Sorry for the confusion.
We don't need 2 separate tables for fees though, just one (with current value) would suffice.

Phase 2 marks the deployment of a user-ready Mainnet where anyone can deploy and interact with smart contracts. In this phase, the network is ready for more extensive smart contract utilization, so it's the practical beginning of smart contracts on the Stellar network. But even this is not the end of the journey. At the core of smart contracts on the Stellar network is scale and sustainability, and efforts to continue to expand capacity and introduce further capabilities to enhance the network's functionalities will be ongoing. See [this blog post](https://stellar.org/blog/developers/the-stellar-network-s-phased-rollout-of-smart-contracts-the-road-to-mainnet) for more details and share your feedback in [Discord](https://discord.com/invite/zVYdY3ktTn).

| Network setting | Phase 2 Cost (stroops) |
| Network setting | Cost (stroops) |
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @dmkozh thanks for the feedback.

Does this commit address the following correctly?:

I don't think we need to separate this by phase, let's just update the values in-place.

@stellar-jenkins
Copy link

@gre3n3yes34
Copy link

gre3n3yes34 commented Mar 19, 2024 via email


## Resource Fees

Note that write fees grow linearly from empty ledger to ledger "target size", and then grow linearly, but with a 1000x factor after exceeding the target. This is to bound the ledger size growth.
Copy link
Contributor

Choose a reason for hiding this comment

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

This may just be me, but the first sentence doesn't read quite right. We say that the "...write fees grow linearly from empty ledger to ledger "target size", and then grow linearly..." so we say that write fees grow linearly twice. Is that purposeful?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The distinction is in the next half of the sentence: "... but with a 1000x factor after exceeding the target." As it's written, it is quite confusing, but I'm not sure a better way to say it.

Essentially, the write fee can be affected by the current size of the blockchain (that's what ledger "target size" is referring to [i'm pretty sure...]):

  1. while size_of_blockchain >= "target size" ... write fee = fee_that_grows_linearly
  2. while size_of_blockchain > "target size" ... write fee = fee_that_grows_linearly * 1000

@dmkozh Could probably say definitively if I understand it correctly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Your understanding is correct. Also please feel free to come up with a better term than 'target ledger size'. Maybe we should use something like 'ledger growth threshold' and clarify that the threshold will grow over time and it's introduced only to prevent explosive state growth.

Comment on lines 16 to 29
| Network Setting | Phase 0 | Phase 1 (current) | Phase 2 |
| --- | --- | --- | --- |
| Soroban Txn per ledger | 1 | 100 | 125 |
| Max CPU Instructions per Txn | 2.5 million (2M instructions for max Wasm) | 100 million (VM instantiation consumes up to 23M for a 64KB Wasm, and 46M for multiple Wasms of 130KB) | 500 million |
| Memory limit per Txn | 2 MB | 40 MB | 42 MB |
| Ledger entry size (including Wasm entries) per Txn | 2 KB | 64 KB | 66 KB |
| Read/Write Ledger entries per Txn | 3 read; 2 write | 40 read; 25 write | 40 read; 25 write |
| Read/Write bytes per Txn | 3.2 KB read; 3.2 KB write | 130 KB read; 65 KB write | 133 KB read; 66 KB write |
| Transaction size | 10 KB | 70 KB | 70 KB |
| Persistent entry minimal/initial lifetime | 4,096 ledgers (~5.68 hours) | 120 days | 120 days |
| Temporary entry minimal/initial lifetime | 16 ledgers | 1 day | 1 day |
| Max ledger entry expiration bump | 61 days | 6 months | N/A |
| Events+return value size bytes | 200 B | 8 KB | N/A |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we'll actually want to keep this table (at least some? most?). Rather, just remove the Phase 0 and Phase 1 columns, and just have:

| Network Setting | Value |
| --- | --- |
| Soroban Txn per ledger | 100 |
| etc. | etc. |

@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

1 similar comment
@stellar-jenkins
Copy link

@stellar-jenkins
Copy link

@ElliotFriend ElliotFriend requested a review from briwylde08 March 19, 2024 16:00
@ElliotFriend ElliotFriend merged commit 350c391 into main Mar 19, 2024
@ElliotFriend ElliotFriend deleted the phase-2-fees-limits branch March 19, 2024 16:01
janewang pushed a commit that referenced this pull request Mar 26, 2024
* add phase 2 references

* Update resource-limits-fees.mdx

* remove comparative table; update P2 costs

* Remove phases

* added resource limit table & changed "phase 1" to "phase 2"

* formatting, removing phase language

* update table values

* update network settings values

---------

Co-authored-by: Julian Martinez <julian_martinez28@outlook.com>
Co-authored-by: Bri <92327786+briwylde08@users.noreply.github.com>
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.

7 participants