Skip to content

Commit

Permalink
Adding is_transfer to the other sql init. (#1542)
Browse files Browse the repository at this point in the history
* Adding is_transfer to the other sql init.

* Reduced discount.

---------

Co-authored-by: StefanIliev545 <[email protected]>
  • Loading branch information
StefanIliev545 and StefanIliev545 authored Sep 21, 2023
1 parent 34aeae3 commit 67c7597
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go/enclave/gas/gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (gp *ObscuroGasPool) ForTransaction(tx *types.Transaction) (*gethcore.GasPo
// CalculateL1GasUsed - calculates the gas cost of having a transaction on the l1.
func CalculateL1GasUsed(data []byte, overhead *big.Int) *big.Int {
reducedTxSize := uint64(len(data))
reducedTxSize = (reducedTxSize * 75) / 100
reducedTxSize = (reducedTxSize * 90) / 100
reducedTxSize = reducedTxSize * params.TxDataNonZeroGasEIP2028

l1Gas := new(big.Int).SetUint64(reducedTxSize)
Expand Down
1 change: 1 addition & 0 deletions go/enclave/storage/init/edgelessdb/001_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ create table if not exists obsdb.l1_msg
id INTEGER AUTO_INCREMENT,
message varbinary(1024) NOT NULL,
block binary(32) NOT NULL,
is_transfer boolean NOT NULL,
INDEX (block),
primary key (id)
);
Expand Down

0 comments on commit 67c7597

Please sign in to comment.