Skip to content

Commit 407ace2

Browse files
Remove timestamp and appHash validation
1 parent cff9581 commit 407ace2

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

block/manager.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -731,18 +731,18 @@ func (m *Manager) execValidate(lastState types.State, header *types.SignedHeader
731731
return fmt.Errorf("invalid height: expected %d, got %d", expectedHeight, header.Height())
732732
}
733733

734-
// Verify that the header's timestamp is strictly greater than the last block's time
735-
headerTime := header.Time()
736-
if header.Height() > 1 && lastState.LastBlockTime.After(headerTime) {
737-
return fmt.Errorf("block time must be strictly increasing: got %v, last block time was %v",
738-
headerTime.UnixNano(), lastState.LastBlockTime)
739-
}
740-
741-
// Validate that the header's AppHash matches the lastState's AppHash
742-
// Note: Assumes deferred execution
743-
if !bytes.Equal(header.AppHash, lastState.AppHash) {
744-
return fmt.Errorf("app hash mismatch: expected %x, got %x", lastState.AppHash, header.AppHash)
745-
}
734+
// // Verify that the header's timestamp is strictly greater than the last block's time
735+
// headerTime := header.Time()
736+
// if header.Height() > 1 && lastState.LastBlockTime.After(headerTime) {
737+
// return fmt.Errorf("block time must be strictly increasing: got %v, last block time was %v",
738+
// headerTime.UnixNano(), lastState.LastBlockTime)
739+
// }
740+
741+
// // Validate that the header's AppHash matches the lastState's AppHash
742+
// // Note: Assumes deferred execution
743+
// if !bytes.Equal(header.AppHash, lastState.AppHash) {
744+
// return fmt.Errorf("app hash mismatch: expected %x, got %x", lastState.AppHash, header.AppHash)
745+
// }
746746

747747
return nil
748748
}

node/full_node_integration_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,8 @@ func (s *FullNodeTestSuite) TestSubmitBlocksToDA() {
158158
s.NoError(err, "Failed to produce second block")
159159
waitForAtLeastNDAIncludedHeight(s.node, n)
160160

161-
currentHeight, err := s.node.Store.Height(s.ctx)
162-
require.NoError(s.T(), err)
163-
164161
// Verify that all blocks are DA included
165-
for height := uint64(1); height <= currentHeight; height++ {
162+
for height := uint64(1); height <= n; height++ {
166163
header, data, err := s.node.Store.GetBlockData(s.ctx, height)
167164
require.NoError(s.T(), err)
168165

0 commit comments

Comments
 (0)