Skip to content

Commit

Permalink
Merge branch 'master' into dento/storage-opcode-gas
Browse files Browse the repository at this point in the history
  • Loading branch information
xgreenx authored Oct 18, 2023
2 parents 70734d9 + 9857878 commit 52226b0
Show file tree
Hide file tree
Showing 36 changed files with 952 additions and 604 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ Description of the upcoming release here.
- [#1408](https://github.com/FuelLabs/fuel-core/pull/1408): Update gas benchmarks for storage opcodes to use a pre-populated database to get more accurate worst-case costs.

#### Breaking
- [#1407](https://github.com/FuelLabs/fuel-core/pull/1407): The recipient is a `ContractId` instead of `Address`. The block producer should deploy its contract to receive the transaction fee. The collected fee is zero until the recipient contract is set.
- [#1407](https://github.com/FuelLabs/fuel-core/pull/1407): The `Mint` transaction is reworked with new fields to support the account-base model. It affects serialization and deserialization of the transaction and also affects GraphQL schema.
- [#1407](https://github.com/FuelLabs/fuel-core/pull/1407): The `Mint` transaction is the last transaction in the block instead of the first.
- [#1374](https://github.com/FuelLabs/fuel-core/pull/1374): Renamed `base_chain_height` to `da_height` and return current relayer height instead of latest Fuel block height.
- [#1363](https://github.com/FuelLabs/fuel-core/pull/1363): Change message_proof api to take `nonce` instead of `message_id`
- [#1339](https://github.com/FuelLabs/fuel-core/pull/1339): Added a new required field called `base_asset_id` to the `FeeParameters` definition in `ConsensusParameters`, as well as default values for `base_asset_id` in the `beta` and `dev` chainspecs.
Expand Down
33 changes: 17 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fuel-core-tests = { version = "0.0.0", path = "./tests" }
fuel-core-xtask = { version = "0.0.0", path = "./xtask" }

# Fuel dependencies
fuel-vm-private = { version = "0.38.0", package = "fuel-vm", default-features = false }
fuel-vm-private = { version = "0.39.0", package = "fuel-vm", default-features = false }

# Common dependencies
anyhow = "1.0"
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/vm_set/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ pub fn run(c: &mut Criterion) {
let coin_output = Output::variable(Address::zeroed(), 100, AssetId::zeroed());
input.outputs.push(coin_output);
let predicate = op::ret(RegId::ONE).to_bytes().to_vec();
let owner = Input::predicate_owner(&predicate, &ChainId::default());
let owner = Input::predicate_owner(&predicate);
let coin_input = Input::coin_predicate(
Default::default(),
owner,
Expand Down Expand Up @@ -525,7 +525,7 @@ pub fn run(c: &mut Criterion) {
.chain(vec![2u8; i as usize]),
);
let predicate = op::ret(RegId::ONE).to_bytes().to_vec();
let owner = Input::predicate_owner(&predicate, &ChainId::default());
let owner = Input::predicate_owner(&predicate);
let coin_input = Input::coin_predicate(
Default::default(),
owner,
Expand Down
23 changes: 8 additions & 15 deletions bin/fuel-core/src/cli/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ use fuel_core::{
txpool::Config as TxPoolConfig,
types::{
blockchain::primitives::SecretKeyWrapper,
fuel_tx::Address,
fuel_tx::ContractId,
fuel_vm::SecretKey,
secrecy::{
ExposeSecret,
Secret,
},
secrecy::Secret,
},
};
use pyroscope::{
Expand All @@ -47,7 +44,6 @@ use pyroscope_pprofrs::{
use std::{
env,
net,
ops::Deref,
path::PathBuf,
str::FromStr,
};
Expand Down Expand Up @@ -285,16 +281,13 @@ impl Command {
}

let coinbase_recipient = if let Some(coinbase_recipient) = coinbase_recipient {
Address::from_str(coinbase_recipient.as_str()).map_err(|err| anyhow!(err))?
Some(
ContractId::from_str(coinbase_recipient.as_str())
.map_err(|err| anyhow!(err))?,
)
} else {
consensus_key
.as_ref()
.cloned()
.map(|key| {
let sk = key.expose_secret().deref();
Address::from(*sk.public_key().hash())
})
.unwrap_or_default()
tracing::warn!("The coinbase recipient `ContractId` is not set!");
None
};

let verifier = RelayerVerifierConfig {
Expand Down
4 changes: 4 additions & 0 deletions crates/client/assets/schema.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -840,15 +840,19 @@ type Transaction {
id: TransactionId!
inputAssetIds: [AssetId!]
inputContracts: [Contract!]
inputContract: InputContract
gasPrice: U64
gasLimit: U64
maturity: U32
mintAmount: U64
mintAssetId: AssetId
txPointer: TxPointer
isScript: Boolean!
isCreate: Boolean!
isMint: Boolean!
inputs: [Input!]
outputs: [Output!]!
outputContract: ContractOutput
witnesses: [HexString!]
receiptsRoot: Bytes32
status: TransactionStatus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ query($id: TransactionId!) {
inputContracts {
id
}
inputContract {
utxoId
balanceRoot
stateRoot
txPointer
contract {
id
}
}
inputs {
__typename
... on InputCoin {
Expand Down Expand Up @@ -79,7 +88,14 @@ query($id: TransactionId!) {
stateRoot
}
}
outputContract {
inputIndex
balanceRoot
stateRoot
}
maturity
mintAmount
mintAssetId
receiptsRoot
status {
__typename
Expand Down
Loading

0 comments on commit 52226b0

Please sign in to comment.