wal: implement initial decoding