-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add V0 algorithm to actual services #2025
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
Changes from 191 commits
ac1aa41
bc9efa0
31ea5c4
7e6546a
6707c3e
09a0c95
da3c887
cdfc206
15a45ed
03c6a4a
459f8fd
b713739
91fe558
5c3c277
da7ea98
f05c594
644c2da
9c40f42
0783439
d7d7d55
106569d
6db37a6
781424f
88793e9
b7c10c6
e245f98
95ed269
95ab959
53eebfe
5d8d7bb
8ecd034
72a4ff8
2b29292
41ed222
18019ba
8625caa
6677f03
33fe1a3
5ea4c26
9d4cda7
20a8b11
a28c653
37fa17d
220d5e4
19fe50b
507e12e
a8bcab1
54e48f4
e228fa1
cfc8538
cc01db7
a240657
6e9dc0d
305ceaa
1f2be1c
ebae0f7
8bfd2bc
dd660b3
c6b1e7b
5d1bd21
b4d65b7
0cc38cb
209e3b8
395a91b
31450f9
158b663
6caa7f7
2e76450
1088ff1
c28ceea
3ffe2cb
392054a
975db7d
0d741b3
336993c
284d900
5357520
05d8323
8a6d266
b496406
b48a6be
f9e82c8
0fa30af
ba3becc
a417616
9d424a1
7145cea
1b40ff5
f731a86
1cb11cb
4437a79
0f824a9
e3dbdbe
76c2964
be65d2c
f9add03
dd1b3d0
5f8a149
c5d3b07
02138df
cfcc578
ac296d8
77fff14
4ea636e
5805a23
2406993
3129fe9
dd16cf3
eeb5150
ce8d34d
144acfa
c4c649a
2528ac2
5a4ee34
d9dd3b4
d4c5106
ae9c425
cebfb13
0cfad43
78b0675
0d42d5b
ddaf65d
b424c62
f80e4c6
8e71718
06d66f3
e4cb0bb
52c6cb6
322c790
a98885a
1b1825f
200e946
1cd7da2
4249fb5
f117695
b280ad5
737aa78
d6dde40
149f666
ccd2246
31b7fcf
e9c49e3
08a12cb
d2adec3
267ddde
6ad67d4
d6cc3e7
bc84ece
acfb2f3
ceb9ab9
bd40645
42db5f3
91647e1
d929a7d
2601823
a090362
6c2d971
4f6f27e
b34f318
447f59b
34f56ec
9f906b5
57dbe88
75f5cce
4773a71
0d79a8f
f003d12
cfc04cc
fac77cb
dbce725
05cfb2d
328419f
b55f8d3
c457cf0
d9f3a80
5ddd673
f93a460
98c5c12
669a5e5
c8a8e0a
a0f1aee
ba4a947
3334ba5
a612351
f254c91
0c90101
cb4262a
349d283
1d99650
d2d0e7a
0b3cdd0
c9e1fcc
627e6cb
fa060f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,13 +15,14 @@ use fuel_core_types::{ | |
| UniqueIdentifier, | ||
| }, | ||
| fuel_types::{ | ||
| canonical::Deserialize, | ||
| canonical::{ | ||
| Deserialize, | ||
| Serialize, | ||
| }, | ||
| Salt, | ||
| }, | ||
| services::executor::TransactionExecutionResult, | ||
| }; | ||
|
|
||
| use fuel_core_types::fuel_types::canonical::Serialize; | ||
| use libtest_mimic::Failed; | ||
| use std::{ | ||
| path::Path, | ||
|
|
@@ -145,7 +146,6 @@ pub async fn run_contract_large_state(ctx: &TestContext) -> Result<(), Failed> { | |
| pub async fn arbitrary_transaction(ctx: &TestContext) -> Result<(), Failed> { | ||
| const RAW_PATH: &str = "src/tests/test_data/arbitrary_tx.raw"; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed this because I don't see what it has to do with test and it was blocking my update. If we want to add some roundtrip conversion test somewhere between raw/json, that should be separate from this logic.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e2e binary is not a test. It is a binary that runs some tests on a real network. One of the tests is to run an arbitrary transaction where the transaction is hex-encoded from the canonical representation. The source of the transaction should be I agree that we need to document the use case of the |
||
| const JSON_PATH: &str = "src/tests/test_data/arbitrary_tx.json"; | ||
|
|
||
| let dry_run_raw = | ||
| std::fs::read_to_string(RAW_PATH).expect("Should read the raw transaction"); | ||
| let dry_run_json = | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ | |
| 0, | ||
| 0, | ||
| 0, | ||
| 100000 | ||
| 30000000 | ||
| ] | ||
| }, | ||
| "inputs": [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 000000000000000000000000000186a00000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000008000000000000000100000000000000020000000000000001240000000000000000000000000186a000000000000000008b5a47933cbb7ddbc0392a45a124a2a01f17c657d34d4951324003a2f9aff24a000000000000000157cd0f26d30e6e0361742800f0cb39b87d2bd58e052c4389d7e507e39e504a01000000001d34a76ef8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeb709945b9058c3d50f3922bd1b49f92ced2950a9ecaf810aa7829295550cd20000000000002710f8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07000000000000000357cd0f26d30e6e0361742800f0cb39b87d2bd58e052c4389d7e507e39e504a01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | ||
| 000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000800000000000000010000000000000002000000000000000124000000000000000000000001c9c38000000000000000008b5a47933cbb7ddbc0392a45a124a2a01f17c657d34d4951324003a2f9aff24a000000000000000157cd0f26d30e6e0361742800f0cb39b87d2bd58e052c4389d7e507e39e504a01000000001d34a76ef8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeb709945b9058c3d50f3922bd1b49f92ced2950a9ecaf810aa7829295550cd20000000000002710f8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07000000000000000357cd0f26d30e6e0361742800f0cb39b87d2bd58e052c4389d7e507e39e504a01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4138,7 +4138,7 @@ | |
| 0, | ||
| 0, | ||
| 0, | ||
| 100000 | ||
| 12390831 | ||
| ] | ||
| }, | ||
| "inputs": [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,10 +165,22 @@ pub struct Command { | |
| #[arg(long = "native-executor-version", env)] | ||
| pub native_executor_version: Option<StateTransitionBytecodeVersion>, | ||
|
|
||
| /// The starting gas price for the network | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Taking into account that we also need some configuration for DA as well, maybe it makes sense to move all price-related fields into their config. What do yu think?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you thinking that we'd submit all the fields for the config in a single CLI argument? I'm not sure how that affects this specific piece of code. |
||
| #[arg(long = "starting-gas-price", default_value = "0", env)] | ||
| pub starting_gas_price: u64, | ||
|
|
||
| /// The percentage change in gas price per block | ||
| #[arg(long = "gas-price-change-percent", default_value = "0", env)] | ||
| pub gas_price_change_percent: u64, | ||
|
|
||
| /// The minimum allowed gas price | ||
| #[arg(long = "min-gas-price", default_value = "0", env)] | ||
| pub min_gas_price: u64, | ||
|
|
||
| /// The percentage threshold for gas price increase | ||
| #[arg(long = "gas-price-threshold-percent", default_value = "50", env)] | ||
| pub gas_price_threshold_percent: u64, | ||
|
|
||
| /// The signing key used when producing blocks. | ||
| /// Setting via the `CONSENSUS_KEY_SECRET` ENV var is preferred. | ||
| #[arg(long = "consensus-key", env)] | ||
|
|
@@ -245,7 +257,10 @@ impl Command { | |
| debug, | ||
| utxo_validation, | ||
| native_executor_version, | ||
| starting_gas_price, | ||
| gas_price_change_percent, | ||
| min_gas_price, | ||
| gas_price_threshold_percent, | ||
| consensus_key, | ||
| poa_trigger, | ||
| coinbase_recipient, | ||
|
|
@@ -408,7 +423,10 @@ impl Command { | |
| coinbase_recipient, | ||
| metrics, | ||
| }, | ||
| static_gas_price: min_gas_price, | ||
| starting_gas_price, | ||
| gas_price_change_percent, | ||
| min_gas_price, | ||
| gas_price_threshold_percent, | ||
| block_importer, | ||
| #[cfg(feature = "relayer")] | ||
| relayer: relayer_cfg, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you document new CLI arguments please?