question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

STUB: New transaction format

See original GitHub issue

See sharding doc

  • Update Transaction format (depend on #203 and #192) The format of a transaction now becomes:
    [
        chain_id,      # 1 on mainnet
        shard_id,      # the shard the transaction goes onto
        target,        # account the tx goes to
        data,          # transaction data
        start_gas,     # starting gas
        gasprice,      # gasprice
        access_list,   # access list (see below for specification)
        code           # initcode of the target (for account creation)
    ]
    

~- [ ] Update apply_transaction function procedure~

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
vbuterincommented, Jan 10, 2018

There needs to be a way to construct the access list without prior knowledge. So there should be a execution mode that works with an empty access list (or a placeholder) and that keeps track of which storage slots are accessed.

IMO doing this with an execution mode is a bad idea; it would break in any scenario where the keys accessed depend even slightly on variables that could be affected by third parties. The access lists should be generated by something which gets added to Viper; you would pass a function name and arguments and Viper would reply back with what addresses and storage keys could get read or written.

For now, I recommend that we stick to setting the access list to be the sender and receiver, including their entire storage, and possibly add a field for “manually add an additional address” for transactions to contracts that trigger payouts to third-party addresses; don’t bother doing partial storage witnesses until later. Even sender and receiver only covers a huge number of use cases.

Good point, my guess is that with stateless clients gas costs of state access in general will need to be revised significantly.

Yep! My personal preference at the moment BTW is that we charge a clean 4 gas per byte for all transaction or witness data, and we compute witness sizes based on the trie/state root at the start of collation execution (ie. part of the witness verification step of verifying a collation).

Regarding cost of SLOAD and SSTORE, I recommend just keeping the status quo for now.

I think there would be something like check_PAYGAS_execution which basically acts like execute_transaction but with a gas limit(specified by miner?) and returns True if PAYGASopcode is execute or returnFalse` if gas limit reached.

I think the solution may be simpler. Rather than just returning success or failure, we could return two kinds of failure, one where PAYGAS is executed, and if so with what gasprice, and the other where PAYGAS is not executed.

1reaction
jannikluhncommented, Dec 13, 2017

I’m gonna start working on this, but disregard any account abstraction stuff for the moment (as there’s no clear/single specification yet). So the transaction object will include nonce and signature. Removing those should be trivial later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quickbooks Desktop Bill Payment Stub Template
From the form, select the Formatting tab then select Manage Templates. Select a template to preview, then select Copy to create a new...
Read more >
Stub Ethereum JSON-RPC Server - GitHub
Purpose. Allow for easy stubbing of an Ethereum node when testing Ethereum dApp clients. It allows you to stub out a response to...
Read more >
Integration test a manual transaction with transaction template
when(transactionTemplate.execute(Mockito.any())).thenCallRealMethod();. This throws a new null pointer exception though since the transaction ...
Read more >
Don't Stub the System Under Test - Thoughtbot
Let's extract that concern. First, we'll move our tests for the private method over to a new Client class test: describe Client, '# ......
Read more >
Stub Response, Mock Service
The back-end stubbed response specifies a Stub template for stubbing and returning dynamically-generated mock data, instead of connecting to the back end ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found