Skip to content

Instantly share code, notes, and snippets.

@jrhea
Last active March 9, 2019 14:25
Show Gist options
  • Save jrhea/baa563fc8dd36387f1b497bec702d1b7 to your computer and use it in GitHub Desktop.
Save jrhea/baa563fc8dd36387f1b497bec702d1b7 to your computer and use it in GitHub Desktop.
run Artemis run
# clone and build
$ git clone --recursive https://github.com/PegaSysEng/artemis.git
$ cd artemis && ./gradlew mash
# run with formatted output
$ ./gradlew run --args='-o=foo.csv'
@GregTheGreek
Copy link

everything about this makes me lawl

@GregTheGreek
Copy link

GregTheGreek commented Mar 9, 2019

'3145944', '524324', '0x5C056C88889E4CB7032423D3DDDF5447DF84BD6B9936D5AFC461D9FC9E0FAAAB', '0x740DAD69FC4B73EF85D307D6A6BC5CC39ABE0653CEEF3418D056292275187023', '0xDC40661FF06F7CF39EE816E0AEF348FABCA8C40B987C85B71DE8F94979C8775A'

Is the format correct Time, Slot, Block Head Root, Head State Root, Head Parent root ?

@GregTheGreek
Copy link

Hey i'm stuck in a loop of errors:

[INFO ] - Begin state transition
[INFO ] -   Processing new slot: 524345
[INFO ] -   Processing new block with state root: 0x1A22E7F610B05FBC0B69C7D022054484FAC0ABFE5ACBCEEF433D22AEFB962959
[INFO ] -   Processing block header.
[INFO ] - End state transition
[INFO ] - The fork_head's state root matches the calculated state root!
[INFO ] -   new state root: 0x1A22E7F610B05FBC0B69C7D022054484FAC0ABFE5ACBCEEF433D22AEFB962959
[INFO ] -   fork_head state root: 0x1A22E7F610B05FBC0B69C7D022054484FAC0ABFE5ACBCEEF433D22AEFB962959
[INFO ] - ******* Slot Event Detected *******
[INFO ] - node time: 3146118
[INFO ] - node slot: 524353
[INFO ] - parent fork_head slot: 524345
[INFO ] - parent fork_head state root: 0x1A22E7F610B05FBC0B69C7D022054484FAC0ABFE5ACBCEEF433D22AEFB962959
[INFO ] - fork_head slot: 524346
[INFO ] - fork_head state root: 0x29C3D1D6D5A877A57BF933D8D8F36CEF250094ED6AFA7A54358D445BA35BABD3
Mar 09, 2019 10:47:49 AM com.google.common.eventbus.EventBus$LoggingHandler handleException
SEVERE: Exception thrown by subscriber method onNewSlot(java.util.Date) on subscriber tech.pegasys.artemis.statetransition.StateProcessor@34f5090e when dispatching event: Sat Mar 09 10:46:52 CET 2019
java.util.NoSuchElementException: No value present
        at java.util.Optional.get(Optional.java:135)
        at tech.pegasys.artemis.statetransition.StateProcessor.updateHeadBlockUsingLMDGhost(StateProcessor.java:289)
        at tech.pegasys.artemis.statetransition.StateProcessor.onNewSlot(StateProcessor.java:129)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
        at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:144)
        at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)

@GregTheGreek
Copy link

@GregTheGreek
Copy link

Also found a bug where the headParentRoot doesn't match blockHeadRoot

  {
    "time": "'3145980'",
    "slot": "'524330'",
    "blockHeadRoot": "'0x6D9702A3CBADDDF7C2791588C1E9E8CC3A31A02A553AD2E883051F24E9DA9CCA'",
    "headStateRoot": "'0xB60BD9499DA6399D4E1A44372D12DEBD97F083E4C679CFB01B90A6AF13A523DC'",
    "headParentRoot": "'0x83699FC96F3332543D6E58E090D23D6D7F382B484695339D987330533AB34D40'"
  },
  {
    "time": "'3145986'",
    "slot": "'524331'",
    "blockHeadRoot": "'0x7A83D9A8123243AC4C95BE9EBF6CAB5227B97833D18C049A34AD8822C14A1A71'",
    "headStateRoot": "'0x028854FCBD6963FD69590440E20AA804D7EA80396FA88CAC449B032538F157E3'",
    "headParentRoot": "'0xF8C26F5431DD2F1BCD4AE81A3642400F10A84946684127C8AAD9D600987E5F24'"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment