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

use flat vm fee #4607

Merged
merged 20 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust budgets for gas
  • Loading branch information
oxade committed Oct 10, 2022
commit b3aec3cc310d000a44c1158766236370a9cfa013
2 changes: 1 addition & 1 deletion crates/sui-cost-tables/src/bytecode_tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use move_binary_format::{
};

/// VM flat fee
pub const VM_FLAT_FEE: Gas = Gas::new(1_000);
pub const VM_FLAT_FEE: Gas = Gas::new(2_000);
Copy link
Contributor

Choose a reason for hiding this comment

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

as this might need to tuned, maybe its better to put the number in some config or env files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well this leads to a potential for each validator to start with different values.
Also if we use cfg files here, why not do it for all values in the cost table?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this constant is a good place to tune this.

In the future, we might need to change this as the software upgrades, but we will need to sort out that whole problem at a later date.


/// The size in bytes for a non-string or address constant on the stack
pub const CONST_SIZE: AbstractMemorySize = AbstractMemorySize::new(16);
Expand Down
2 changes: 1 addition & 1 deletion crates/sui/tests/full_node_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ async fn get_obj_read_from_node(
}
}

#[sim_test]
#[tokio::test]
async fn test_get_objects_read() -> Result<(), anyhow::Error> {
telemetry_subscribers::init_for_testing();
let mut test_cluster = init_cluster_builder_env_aware().build().await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/test-utils/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use sui_types::object::Object;
use sui_types::object::Owner;

/// The maximum gas per transaction.
pub const MAX_GAS: u64 = 10_000;
pub const MAX_GAS: u64 = 50_000;

pub fn random_object_ref() -> ObjectRef {
(
Expand Down